ChibiOS 21.11.4
|
MMC over SPI driver header. More...
Go to the source code of this file.
Data Structures | |
struct | mmc_spi_config_t |
Type of a MMC/SD over SPI driver configuration structure. More... | |
struct | mmc_spi_driver_vmt |
MMCDriver virtual methods table. More... | |
struct | mmc_spi_driver_t |
Structure representing a MMC/SD over SPI driver. More... |
Macros | |
#define | MMC_CMD0_RETRY 10U |
#define | MMC_CMD1_RETRY 100U |
#define | MMC_ACMD41_RETRY 100U |
#define | MMC_WAIT_DATA 10000U |
#define | MMC_BUFFER_SIZE 16U |
Size of the buffer to be supplied to the driver. | |
#define | __mmc_driver_methods _mmcsd_block_device_methods |
MMCDriver specific methods. | |
MMC_SPI configuration options | |
#define | MMC_IDLE_TIMEOUT_MS 1000 |
Timeout before assuming a failure while waiting for card idle. | |
#define | MMC_USE_MUTUAL_EXCLUSION TRUE |
Mutual exclusion on the SPI bus. | |
Macro Functions | |
#define | mmcIsCardInserted(mmcp) |
Returns the card insertion status. | |
#define | mmcIsWriteProtected(mmcp) |
Returns the write protect status. |
Typedefs | |
typedef mmc_spi_config_t | MMCConfig |
Legacy name for compatibility. | |
typedef mmc_spi_driver_t | MMCDriver |
Legacy name for compatibility. |
Functions | |
void | mmcInit (void) |
MMC over SPI driver initialization. | |
void | mmcObjectInit (MMCDriver *mmcp, uint8_t *buffer) |
Initializes an instance. | |
msg_t | mmcStart (MMCDriver *mmcp, const MMCConfig *config) |
Configures and activates the MMC peripheral. | |
void | mmcStop (MMCDriver *mmcp) |
Disables the MMC peripheral. | |
bool | mmcConnect (MMCDriver *mmcp) |
Performs the initialization procedure on the inserted card. | |
bool | mmcDisconnect (MMCDriver *mmcp) |
Brings the driver in a state safe for card removal. | |
bool | mmcStartSequentialRead (MMCDriver *mmcp, uint32_t startblk) |
Starts a sequential read. | |
bool | mmcSequentialRead (MMCDriver *mmcp, uint8_t *buffer) |
Reads a block within a sequential read operation. | |
bool | mmcStopSequentialRead (MMCDriver *mmcp) |
Stops a sequential read gracefully. | |
bool | mmcStartSequentialWrite (MMCDriver *mmcp, uint32_t startblk) |
Starts a sequential write. | |
bool | mmcSequentialWrite (MMCDriver *mmcp, const uint8_t *buffer) |
Writes a block within a sequential write operation. | |
bool | mmcStopSequentialWrite (MMCDriver *mmcp) |
Stops a sequential write gracefully. | |
bool | mmcSync (MMCDriver *mmcp) |
Waits for card idle condition. | |
bool | mmcGetInfo (MMCDriver *mmcp, BlockDeviceInfo *bdip) |
Returns the media info. | |
bool | mmcErase (MMCDriver *mmcp, uint32_t startblk, uint32_t endblk) |
Erases blocks. | |
bool | mmc_lld_is_card_inserted (MMCDriver *mmcp) |
bool | mmc_lld_is_write_protected (MMCDriver *mmcp) |
MMC over SPI driver header.
Definition in file hal_mmc_spi.h.