28#if (HAL_USE_SDC == TRUE) || defined(__DOXYGEN__)
38#define SDC_MODE_CARDTYPE_MASK 0xFU
39#define SDC_MODE_CARDTYPE_SDV11 0U
40#define SDC_MODE_CARDTYPE_SDV20 1U
41#define SDC_MODE_CARDTYPE_MMC 2U
42#define SDC_MODE_HIGH_CAPACITY 0x10U
49#define SDC_NO_ERROR 0U
50#define SDC_CMD_CRC_ERROR 1U
51#define SDC_DATA_CRC_ERROR 2U
52#define SDC_DATA_TIMEOUT 4U
53#define SDC_COMMAND_TIMEOUT 8U
54#define SDC_TX_UNDERRUN 16U
55#define SDC_RX_OVERRUN 32U
56#define SDC_STARTBIT_ERROR 64U
57#define SDC_OVERFLOW_ERROR 128U
58#define SDC_UNHANDLED_ERROR 0xFFFFFFFFU
73#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
74#define SDC_INIT_RETRY 100
82#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
83#define SDC_MMC_SUPPORT FALSE
92#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
93#define SDC_NICE_WAITING TRUE
99#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
100#define SDC_INIT_OCR_V20 0x50FF8000U
106#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
107#define SDC_INIT_OCR 0x80100000U
160#define sdcIsCardInserted(sdcp) (sdc_lld_is_card_inserted(sdcp))
176#define sdcIsWriteProtected(sdcp) (sdc_lld_is_write_protected(sdcp))
193 uint8_t *buf, uint32_t n);
195 const uint8_t *buf, uint32_t n);
int32_t msg_t
Type of a message.
void sdcObjectInit(SDCDriver *sdcp)
Initializes the standard part of a SDCDriver structure.
void sdcStop(SDCDriver *sdcp)
Deactivates the SDC peripheral.
sdcbusmode_t
Type of SDIO bus mode.
msg_t sdcStart(SDCDriver *sdcp, const SDCConfig *config)
Configures and activates the SDC peripheral.
bool sdcRead(SDCDriver *sdcp, uint32_t startblk, uint8_t *buf, uint32_t n)
Reads one or more blocks.
bool sdcConnect(SDCDriver *sdcp)
Performs the initialization procedure on the inserted card.
bool sdcWrite(SDCDriver *sdcp, uint32_t startblk, const uint8_t *buf, uint32_t n)
Writes one or more blocks.
bool sdcDisconnect(SDCDriver *sdcp)
Brings the driver in a state safe for card removal.
sdcbusclk_t
Max supported clock.
void sdcInit(void)
SDC Driver initialization.
sdcflags_t sdcGetAndClearErrors(SDCDriver *sdcp)
Returns the errors mask associated to the previous operation.
bool _sdc_wait_for_transfer_state(SDCDriver *sdcp)
Wait for the card to complete pending operations with CRC check.
bool sdcSync(SDCDriver *sdcp)
Waits for card idle condition.
uint32_t sdcflags_t
SDC Driver condition flags type.
bool _sdc_wait_for_transfer_state_nocrc(SDCDriver *sdcp)
Wait for the card to complete pending operations without CRC check.
bool sdcGetInfo(SDCDriver *sdcp, BlockDeviceInfo *bdip)
Returns the media info.
bool sdcErase(SDCDriver *sdcp, uint32_t startblk, uint32_t endblk)
Erases the supplied blocks.
PLATFORM SDC subsystem low level driver header.
Driver configuration structure.
Structure representing an SDC driver.