Classes | Macros | Enumerations | Functions | Variables
Implementation of SD/MMC/SDIO Stack

Classes

struct  sd_mmc_card
 SD/MMC card information structure. More...
 

Macros

#define driver_adtc_start   ATPASTE2(driver, _adtc_start)
 
#define driver_adtc_stop   ATPASTE2(driver, _send_cmd)
 
#define driver_deselect_device   ATPASTE2(driver, _deselect_device)
 
#define driver_get_bus_width   ATPASTE2(driver, _get_bus_width)
 
#define driver_get_response   ATPASTE2(driver, _get_response)
 
#define driver_get_response_128   ATPASTE2(driver, _get_response_128)
 
#define driver_init   ATPASTE2(driver, _init)
 
#define driver_is_high_speed_capable   ATPASTE2(driver, _is_high_speed_capable)
 
#define driver_read_word   ATPASTE2(driver, _read_word)
 
#define driver_select_device   ATPASTE2(driver, _select_device)
 
#define driver_send_clock   ATPASTE2(driver, _send_clock)
 
#define driver_send_cmd   ATPASTE2(driver, _send_cmd)
 
#define driver_start_read_blocks   ATPASTE2(driver, _start_read_blocks)
 
#define driver_start_write_blocks   ATPASTE2(driver, _start_write_blocks)
 
#define driver_wait_end_of_read_blocks   ATPASTE2(driver, _wait_end_of_read_blocks)
 
#define driver_wait_end_of_write_blocks   ATPASTE2(driver, _wait_end_of_write_blocks)
 
#define driver_write_word   ATPASTE2(driver, _write_word)
 
#define IS_SDIO()   false
 
#define sd_mmc_debug(...)
 
#define SD_MMC_HSMCI_MEM_CNT   0
 
#define sd_mmc_is_mci()   (!sd_mmc_is_spi())
 
#define SD_MMC_MCI_MEM_CNT   0
 
#define SD_MMC_SPI_MEM_CNT   0
 
#define SD_MMC_VOLTAGE_SUPPORT
 This SD MMC stack supports only the high voltage. More...
 

Enumerations

enum  card_state {
  SD_MMC_CARD_STATE_READY = 0, SD_MMC_CARD_STATE_DEBOUNCE = 1, SD_MMC_CARD_STATE_INIT = 2, SD_MMC_CARD_STATE_UNUSABLE = 3,
  SD_MMC_CARD_STATE_NO_CARD = 4
}
 SD/MMC card states. More...
 

Functions

sd_mmc_err_t sd_mmc_check (uint8_t slot)
 Performs a card checks. More...
 
uint32_t sd_mmc_get_capacity (uint8_t slot)
 Get the memory capacity. More...
 
card_type_t sd_mmc_get_type (uint8_t slot)
 Get the card type. More...
 
card_version_t sd_mmc_get_version (uint8_t slot)
 Get the card version. More...
 
void sd_mmc_init (void)
 Initialize the SD/MMC stack and low level driver required. More...
 
sd_mmc_err_t sd_mmc_init_read_blocks (uint8_t slot, uint32_t start, uint16_t nb_block)
 Initialize the read blocks of data from the card. More...
 
sd_mmc_err_t sd_mmc_init_write_blocks (uint8_t slot, uint32_t start, uint16_t nb_block)
 Initialize the write blocks of data. More...
 
bool sd_mmc_is_write_protected (uint8_t slot)
 Get the card write protection status. More...
 
uint8_t sd_mmc_nb_slot (void)
 Return the number of slot available. More...
 
sd_mmc_err_t sd_mmc_start_read_blocks (void *dest, uint16_t nb_block)
 Start the read blocks of data from the card. More...
 
sd_mmc_err_t sd_mmc_start_write_blocks (const void *src, uint16_t nb_block)
 Start the write blocks of data. More...
 
sd_mmc_err_t sd_mmc_wait_end_of_read_blocks (bool abort)
 Wait the end of read blocks of data from the card. More...
 
sd_mmc_err_t sd_mmc_wait_end_of_write_blocks (bool abort)
 Wait the end of write blocks of data. More...
 

Variables

const uint32_t mmc_trans_multipliers [16]
 MMC transfer multiplier factor codes (1/10) list. More...
 
static struct sd_mmc_cardsd_mmc_card
 Pointer on current slot configurated. More...
 
static struct sd_mmc_card sd_mmc_cards [SD_MMC_MEM_CNT]
 
static uint16_t sd_mmc_nb_block_remaining = 0
 Number of block remaining to read or write on the current transfer. More...
 
static uint16_t sd_mmc_nb_block_to_tranfer = 0
 Number of block to read or write on the current transfer. More...
 
static uint8_t sd_mmc_slot_sel
 Index of current slot configurated. More...
 
const uint32_t sd_mmc_trans_units [7]
 SD/MMC transfer rate unit codes (10K) list. More...
 
const uint32_t sd_trans_multipliers [16]
 SD transfer multiplier factor codes (1/10) list. More...
 

MMC, SD and SDIO commands process

static bool mmc_spi_op_cond (void)
 Sends operation condition command and read OCR (SPI only) More...
 
static bool mmc_mci_op_cond (void)
 Sends operation condition command and read OCR (MCI only) More...
 
static bool sd_spi_op_cond (uint8_t v2)
 Ask to all cards to send their operations conditions (SPI only). More...
 
static bool sd_mci_op_cond (uint8_t v2)
 Ask to all cards to send their operations conditions (MCI only). More...
 
static bool sdio_op_cond (void)
 
static bool sdio_get_max_speed (void)
 
static bool sdio_cmd52_set_bus_width (void)
 
static bool sdio_cmd52_set_high_speed (void)
 
static bool sd_cm6_set_high_speed (void)
 CMD6 for SD - Switch card in high speed mode. More...
 
static bool mmc_cmd6_set_bus_width (uint8_t bus_width)
 CMD6 for MMC - Switches the bus width mode. More...
 
static bool mmc_cmd6_set_high_speed (void)
 CMD6 for MMC - Switches in high speed mode. More...
 
static bool sd_cmd8 (uint8_t *v2)
 CMD8 for SD card - Send Interface Condition Command. More...
 
static bool mmc_cmd8 (uint8_t *b_authorize_high_speed)
 CMD8 - The card sends its EXT_CSD register as a block of data. More...
 
static bool sd_mmc_cmd9_spi (void)
 CMD9: Addressed card sends its card-specific data (CSD) on the CMD line spi. More...
 
static bool sd_mmc_cmd9_mci (void)
 CMD9: Addressed card sends its card-specific data (CSD) on the CMD line mci. More...
 
static void mmc_decode_csd (void)
 Decodes MMC CSD register. More...
 
static void sd_decode_csd (void)
 Decodes SD CSD register. More...
 
static bool sd_mmc_cmd13 (void)
 CMD13 - Addressed card sends its status register. This function waits the clear of the busy flag. More...
 
static bool sd_acmd6 (void)
 ACMD6 - Define the data bus width to 4 bits bus. More...
 
static bool sd_acmd51 (void)
 ACMD51 - Read the SD Configuration Register. More...
 

Internal function to process the initialization and install

static sd_mmc_err_t sd_mmc_select_slot (uint8_t slot)
 Select a card slot and initialize the associated driver. More...
 
static void sd_mmc_configure_slot (void)
 Configures the driver with the selected card configuration. More...
 
static void sd_mmc_deselect_slot (void)
 Deselect the current card slot. More...
 
static bool sd_mmc_spi_card_init (void)
 Initialize the SD card in SPI mode. More...
 
static bool sd_mmc_mci_card_init (void)
 Initialize the SD card in MCI mode. More...
 
static bool sd_mmc_spi_install_mmc (void)
 Initialize the MMC card in SPI mode. More...
 
static bool sd_mmc_mci_install_mmc (void)
 Initialize the MMC card in MCI mode. More...
 

Internal functions to manage a large timeout after a card insertion

#define SD_MMC_DEBOUNCE_TIMEOUT   1000
 

Detailed Description

Macro Definition Documentation

◆ driver_adtc_start

#define driver_adtc_start   ATPASTE2(driver, _adtc_start)

Definition at line 115 of file sd_mmc.c.

◆ driver_adtc_stop

#define driver_adtc_stop   ATPASTE2(driver, _send_cmd)

Definition at line 116 of file sd_mmc.c.

◆ driver_deselect_device

#define driver_deselect_device   ATPASTE2(driver, _deselect_device)

Definition at line 108 of file sd_mmc.c.

◆ driver_get_bus_width

#define driver_get_bus_width   ATPASTE2(driver, _get_bus_width)

Definition at line 109 of file sd_mmc.c.

◆ driver_get_response

#define driver_get_response   ATPASTE2(driver, _get_response)

Definition at line 113 of file sd_mmc.c.

◆ driver_get_response_128

#define driver_get_response_128   ATPASTE2(driver, _get_response_128)

Definition at line 114 of file sd_mmc.c.

◆ driver_init

#define driver_init   ATPASTE2(driver, _init)

Definition at line 106 of file sd_mmc.c.

◆ driver_is_high_speed_capable

#define driver_is_high_speed_capable   ATPASTE2(driver, _is_high_speed_capable)

Definition at line 110 of file sd_mmc.c.

◆ driver_read_word

#define driver_read_word   ATPASTE2(driver, _read_word)

Definition at line 117 of file sd_mmc.c.

◆ driver_select_device

#define driver_select_device   ATPASTE2(driver, _select_device)

Definition at line 107 of file sd_mmc.c.

◆ driver_send_clock

#define driver_send_clock   ATPASTE2(driver, _send_clock)

Definition at line 111 of file sd_mmc.c.

◆ driver_send_cmd

#define driver_send_cmd   ATPASTE2(driver, _send_cmd)

Definition at line 112 of file sd_mmc.c.

◆ driver_start_read_blocks

#define driver_start_read_blocks   ATPASTE2(driver, _start_read_blocks)

Definition at line 119 of file sd_mmc.c.

◆ driver_start_write_blocks

#define driver_start_write_blocks   ATPASTE2(driver, _start_write_blocks)

Definition at line 121 of file sd_mmc.c.

◆ driver_wait_end_of_read_blocks

#define driver_wait_end_of_read_blocks   ATPASTE2(driver, _wait_end_of_read_blocks)

Definition at line 120 of file sd_mmc.c.

◆ driver_wait_end_of_write_blocks

#define driver_wait_end_of_write_blocks   ATPASTE2(driver, _wait_end_of_write_blocks)

Definition at line 122 of file sd_mmc.c.

◆ driver_write_word

#define driver_write_word   ATPASTE2(driver, _write_word)

Definition at line 118 of file sd_mmc.c.

◆ IS_SDIO

#define IS_SDIO ( )    false

Definition at line 133 of file sd_mmc.c.

◆ SD_MMC_DEBOUNCE_TIMEOUT

#define SD_MMC_DEBOUNCE_TIMEOUT   1000

Definition at line 259 of file sd_mmc.c.

◆ sd_mmc_debug

#define sd_mmc_debug (   ...)

Definition at line 64 of file sd_mmc.c.

◆ SD_MMC_HSMCI_MEM_CNT

#define SD_MMC_HSMCI_MEM_CNT   0

Definition at line 74 of file sd_mmc.c.

◆ sd_mmc_is_mci

#define sd_mmc_is_mci ( )    (!sd_mmc_is_spi())

Definition at line 136 of file sd_mmc.c.

◆ SD_MMC_MCI_MEM_CNT

#define SD_MMC_MCI_MEM_CNT   0

Definition at line 71 of file sd_mmc.c.

◆ SD_MMC_SPI_MEM_CNT

#define SD_MMC_SPI_MEM_CNT   0

Definition at line 68 of file sd_mmc.c.

◆ SD_MMC_VOLTAGE_SUPPORT

#define SD_MMC_VOLTAGE_SUPPORT
Value:
OCR_VDD_29_30 | OCR_VDD_30_31 | \
OCR_VDD_31_32 | OCR_VDD_32_33)
#define OCR_VDD_30_31
#define OCR_VDD_32_33
#define OCR_VDD_28_29
#define OCR_VDD_27_28

This SD MMC stack supports only the high voltage.

Definition at line 139 of file sd_mmc.c.

Enumeration Type Documentation

◆ card_state

enum card_state

SD/MMC card states.

Enumerator
SD_MMC_CARD_STATE_READY 

Ready to use.

SD_MMC_CARD_STATE_DEBOUNCE 

Debounce on going.

SD_MMC_CARD_STATE_INIT 

Initialization on going.

SD_MMC_CARD_STATE_UNUSABLE 

Unusable card.

SD_MMC_CARD_STATE_NO_CARD 

No SD/MMC card inserted.

Definition at line 145 of file sd_mmc.c.

Function Documentation

◆ mmc_cmd6_set_bus_width()

static bool mmc_cmd6_set_bus_width ( uint8_t  bus_width)
static

CMD6 for MMC - Switches the bus width mode.

Note
CMD6 is valid under the "trans" state.
sd_mmc_card->bus_width is updated.
Parameters
bus_widthBus width to set
Returns
true if success, otherwise false

Definition at line 820 of file sd_mmc.c.

◆ mmc_cmd6_set_high_speed()

static bool mmc_cmd6_set_high_speed ( void  )
static

CMD6 for MMC - Switches in high speed mode.

Note
CMD6 is valid under the "trans" state.
sd_mmc_card->high_speed is updated.
sd_mmc_card->clock is updated.
Returns
true if success, otherwise false

Definition at line 863 of file sd_mmc.c.

◆ mmc_cmd8()

static bool mmc_cmd8 ( uint8_t *  b_authorize_high_speed)
static

CMD8 - The card sends its EXT_CSD register as a block of data.

Parameters
b_authorize_high_speedPointer to update with the high speed support information
Returns
true if success, otherwise false

Definition at line 929 of file sd_mmc.c.

◆ mmc_decode_csd()

static void mmc_decode_csd ( void  )
static

Decodes MMC CSD register.

Definition at line 1006 of file sd_mmc.c.

◆ mmc_mci_op_cond()

static bool mmc_mci_op_cond ( void  )
static

Sends operation condition command and read OCR (MCI only)

  • CMD1 sends operation condition command
  • CMD1 reads OCR
Returns
true if success, otherwise false

Definition at line 382 of file sd_mmc.c.

◆ mmc_spi_op_cond()

static bool mmc_spi_op_cond ( void  )
static

Sends operation condition command and read OCR (SPI only)

  • CMD1 sends operation condition command
  • CMD58 reads OCR
Returns
true if success, otherwise false

Definition at line 335 of file sd_mmc.c.

◆ sd_acmd51()

static bool sd_acmd51 ( void  )
static

ACMD51 - Read the SD Configuration Register.

Note
SD Card Configuration Register (SCR) provides information on the SD Memory Card's special features that were configured into the given card. The size of SCR register is 64 bits.
Returns
true if success, otherwise false

Definition at line 1251 of file sd_mmc.c.

◆ sd_acmd6()

static bool sd_acmd6 ( void  )
static

ACMD6 - Define the data bus width to 4 bits bus.

Returns
true if success, otherwise false

Definition at line 1224 of file sd_mmc.c.

◆ sd_cm6_set_high_speed()

static bool sd_cm6_set_high_speed ( void  )
static

CMD6 for SD - Switch card in high speed mode.

Note
CMD6 for SD is valid under the "trans" state.
sd_mmc_card->high_speed is updated.
sd_mmc_card->clock is updated.
Returns
true if success, otherwise false

Definition at line 767 of file sd_mmc.c.

◆ sd_cmd8()

static bool sd_cmd8 ( uint8_t *  v2)
static

CMD8 for SD card - Send Interface Condition Command.

Note
Send SD Memory Card interface condition, which includes host supply voltage information and asks the card whether card supports voltage. Should be performed at initialization time to detect the card type.
Parameters
v2Pointer to v2 flag to update
Returns
true if success, otherwise false with a update of sd_mmc_err.

Definition at line 894 of file sd_mmc.c.

◆ sd_decode_csd()

static void sd_decode_csd ( void  )
static

Decodes SD CSD register.

Definition at line 1066 of file sd_mmc.c.

◆ sd_mci_op_cond()

static bool sd_mci_op_cond ( uint8_t  v2)
static

Ask to all cards to send their operations conditions (MCI only).

  • ACMD41 sends operation condition command.
  • ACMD41 reads OCR
Parameters
v2Shall be 1 if it is a SD card V2
Returns
true if success, otherwise false

Definition at line 486 of file sd_mmc.c.

◆ sd_mmc_check()

sd_mmc_err_t sd_mmc_check ( uint8_t  slot)

Performs a card checks.

Parameters
slotCard slot to use
Return values
SD_MMC_OKCard ready
SD_MMC_INIT_ONGOINGInitialization on going
SD_MMC_ERR_NO_CARDCard not present in slot
Othervalue for error cases, see sd_mmc_err_t

Definition at line 1776 of file sd_mmc.c.

◆ sd_mmc_cmd13()

static bool sd_mmc_cmd13 ( void  )
static

CMD13 - Addressed card sends its status register. This function waits the clear of the busy flag.

Returns
true if success, otherwise false

Definition at line 1110 of file sd_mmc.c.

◆ sd_mmc_cmd9_mci()

static bool sd_mmc_cmd9_mci ( void  )
static

CMD9: Addressed card sends its card-specific data (CSD) on the CMD line mci.

Returns
true if success, otherwise false

Definition at line 994 of file sd_mmc.c.

◆ sd_mmc_cmd9_spi()

static bool sd_mmc_cmd9_spi ( void  )
static

CMD9: Addressed card sends its card-specific data (CSD) on the CMD line spi.

Returns
true if success, otherwise false

Definition at line 976 of file sd_mmc.c.

◆ sd_mmc_configure_slot()

static void sd_mmc_configure_slot ( void  )
static

Configures the driver with the selected card configuration.

Definition at line 1370 of file sd_mmc.c.

◆ sd_mmc_deselect_slot()

static void sd_mmc_deselect_slot ( void  )
static

Deselect the current card slot.

Definition at line 1379 of file sd_mmc.c.

◆ sd_mmc_get_capacity()

uint32_t sd_mmc_get_capacity ( uint8_t  slot)

Get the memory capacity.

Parameters
slotCard slot
Returns
Capacity (unit KB)

Definition at line 1820 of file sd_mmc.c.

◆ sd_mmc_get_type()

card_type_t sd_mmc_get_type ( uint8_t  slot)

Get the card type.

Parameters
slotCard slot
Returns
Card type (card_type_t)

Definition at line 1802 of file sd_mmc.c.

◆ sd_mmc_get_version()

card_version_t sd_mmc_get_version ( uint8_t  slot)

Get the card version.

Parameters
slotCard slot
Returns
Card version (card_version_t)

Definition at line 1811 of file sd_mmc.c.

◆ sd_mmc_init()

void sd_mmc_init ( void  )

Initialize the SD/MMC stack and low level driver required.

Enable the PMC clock for the card detect pins

Enable the PMC clock for the card write protection pins

Definition at line 1746 of file sd_mmc.c.

◆ sd_mmc_init_read_blocks()

sd_mmc_err_t sd_mmc_init_read_blocks ( uint8_t  slot,
uint32_t  start,
uint16_t  nb_block 
)

Initialize the read blocks of data from the card.

Parameters
slotCard slot to use
startStart block number to to read.
nb_blockTotal number of blocks to be read.
Returns
return SD_MMC_OK if success, otherwise return an error code (sd_mmc_err_t).

Definition at line 1842 of file sd_mmc.c.

◆ sd_mmc_init_write_blocks()

sd_mmc_err_t sd_mmc_init_write_blocks ( uint8_t  slot,
uint32_t  start,
uint16_t  nb_block 
)

Initialize the write blocks of data.

Parameters
slotCard slot to use
startStart block number to be written.
nb_blockTotal number of blocks to be written.
Returns
return SD_MMC_OK if success, otherwise return an error code (sd_mmc_err_t).

Definition at line 1932 of file sd_mmc.c.

◆ sd_mmc_is_write_protected()

bool sd_mmc_is_write_protected ( uint8_t  slot)

Get the card write protection status.

Parameters
slotCard slot
Returns
true, if write portected

Definition at line 1829 of file sd_mmc.c.

◆ sd_mmc_mci_card_init()

static bool sd_mmc_mci_card_init ( void  )
static

Initialize the SD card in MCI mode.

Note
This function runs the initialization procedure and the identification process, then it sets the SD/MMC card in transfer state. At last, it will automaticly enable maximum bus width and transfer speed.
Returns
true if success, otherwise false

Definition at line 1485 of file sd_mmc.c.

◆ sd_mmc_mci_install_mmc()

static bool sd_mmc_mci_install_mmc ( void  )
static

Initialize the MMC card in MCI mode.

Note
This function runs the initialization procedure and the identification process, then it sets the SD/MMC card in transfer state. At last, it will automaticly enable maximum bus width and transfer speed.
Returns
true if success, otherwise false

Definition at line 1668 of file sd_mmc.c.

◆ sd_mmc_nb_slot()

uint8_t sd_mmc_nb_slot ( void  )

Return the number of slot available.

Returns
Number of card slot available

Definition at line 1771 of file sd_mmc.c.

◆ sd_mmc_select_slot()

static sd_mmc_err_t sd_mmc_select_slot ( uint8_t  slot)
static

Select a card slot and initialize the associated driver.

Parameters
slotCard slot number
Return values
SD_MMC_ERR_SLOTWrong slot number
SD_MMC_ERR_NO_CARDNo card present on slot
SD_MMC_ERR_UNUSABLEUnusable card
SD_MMC_INIT_ONGOINGCard initialization requested
SD_MMC_OKCard present

Definition at line 1307 of file sd_mmc.c.

◆ sd_mmc_spi_card_init()

static bool sd_mmc_spi_card_init ( void  )
static

Initialize the SD card in SPI mode.

Note
This function runs the initialization procedure and the identification process, then it sets the SD/MMC card in transfer state. At last, it will automaticly enable maximum bus width and transfer speed.
Returns
true if success, otherwise false

Definition at line 1396 of file sd_mmc.c.

◆ sd_mmc_spi_install_mmc()

static bool sd_mmc_spi_install_mmc ( void  )
static

Initialize the MMC card in SPI mode.

Note
This function runs the initialization procedure and the identification process, then it sets the SD/MMC card in transfer state. At last, it will automaticly enable maximum bus width and transfer speed.
Returns
true if success, otherwise false

Definition at line 1615 of file sd_mmc.c.

◆ sd_mmc_start_read_blocks()

sd_mmc_err_t sd_mmc_start_read_blocks ( void *  dest,
uint16_t  nb_block 
)

Start the read blocks of data from the card.

Parameters
destPointer to read buffer.
nb_blockNumber of blocks to be read.
Returns
return SD_MMC_OK if started, otherwise return an error code (sd_mmc_err_t).

Definition at line 1893 of file sd_mmc.c.

◆ sd_mmc_start_write_blocks()

sd_mmc_err_t sd_mmc_start_write_blocks ( const void *  src,
uint16_t  nb_block 
)

Start the write blocks of data.

Parameters
srcPointer to write buffer.
nb_blockNumber of blocks to be written.
Returns
return SD_MMC_OK if started, otherwise return an error code (sd_mmc_err_t).

Definition at line 1980 of file sd_mmc.c.

◆ sd_mmc_wait_end_of_read_blocks()

sd_mmc_err_t sd_mmc_wait_end_of_read_blocks ( bool  abort)

Wait the end of read blocks of data from the card.

Parameters
abortAbort reading process initialized by sd_mmc_init_read_blocks() after the reading issued by sd_mmc_start_read_blocks() is done
Returns
return SD_MMC_OK if success, otherwise return an error code (sd_mmc_err_t).

Definition at line 1905 of file sd_mmc.c.

◆ sd_mmc_wait_end_of_write_blocks()

sd_mmc_err_t sd_mmc_wait_end_of_write_blocks ( bool  abort)

Wait the end of write blocks of data.

Parameters
abortAbort writing process initialized by sd_mmc_init_write_blocks() after the writing issued by sd_mmc_start_write_blocks() is done
Returns
return SD_MMC_OK if success, otherwise return an error code (sd_mmc_err_t).

Definition at line 1991 of file sd_mmc.c.

◆ sd_spi_op_cond()

static bool sd_spi_op_cond ( uint8_t  v2)
static

Ask to all cards to send their operations conditions (SPI only).

  • ACMD41 sends operation condition command.
  • CMD58 reads OCR
Parameters
v2Shall be 1 if it is a SD card V2
Returns
true if success, otherwise false

Definition at line 426 of file sd_mmc.c.

◆ sdio_cmd52_set_bus_width()

static bool sdio_cmd52_set_bus_width ( void  )
static

Definition at line 748 of file sd_mmc.c.

◆ sdio_cmd52_set_high_speed()

static bool sdio_cmd52_set_high_speed ( void  )
static

Definition at line 752 of file sd_mmc.c.

◆ sdio_get_max_speed()

static bool sdio_get_max_speed ( void  )
static

Definition at line 744 of file sd_mmc.c.

◆ sdio_op_cond()

static bool sdio_op_cond ( void  )
static

Definition at line 740 of file sd_mmc.c.

Variable Documentation

◆ mmc_trans_multipliers

const uint32_t mmc_trans_multipliers[16]
Initial value:
= {
0, 10, 12, 13, 15, 20, 26, 30, 35, 40, 45, 52, 55, 60, 70, 80
}

MMC transfer multiplier factor codes (1/10) list.

Definition at line 211 of file sd_mmc.c.

◆ sd_mmc_card

struct sd_mmc_card* sd_mmc_card
static

Pointer on current slot configurated.

Definition at line 196 of file sd_mmc.c.

◆ sd_mmc_cards

struct sd_mmc_card sd_mmc_cards[SD_MMC_MEM_CNT]
static

SD/MMC card list Note: Initialize card detect pin fields if present

Definition at line 174 of file sd_mmc.c.

◆ sd_mmc_nb_block_remaining

uint16_t sd_mmc_nb_block_remaining = 0
static

Number of block remaining to read or write on the current transfer.

Definition at line 200 of file sd_mmc.c.

◆ sd_mmc_nb_block_to_tranfer

uint16_t sd_mmc_nb_block_to_tranfer = 0
static

Number of block to read or write on the current transfer.

Definition at line 198 of file sd_mmc.c.

◆ sd_mmc_slot_sel

uint8_t sd_mmc_slot_sel
static

Index of current slot configurated.

Definition at line 194 of file sd_mmc.c.

◆ sd_mmc_trans_units

const uint32_t sd_mmc_trans_units[7]
Initial value:
= {
10, 100, 1000, 10000, 0, 0, 0
}

SD/MMC transfer rate unit codes (10K) list.

Definition at line 203 of file sd_mmc.c.

◆ sd_trans_multipliers

const uint32_t sd_trans_multipliers[16]
Initial value:
= {
0, 10, 12, 13, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 70, 80
}

SD transfer multiplier factor codes (1/10) list.

Definition at line 207 of file sd_mmc.c.



inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:18:00