ChibiOS/HAL
6.1.0
|
SDC Driver macros and structures. More...
#include "hal_sdc_lld.h"
Go to the source code of this file.
Macros | |
SD card types | |
#define | SDC_MODE_CARDTYPE_MASK 0xFU |
#define | SDC_MODE_CARDTYPE_SDV11 0U |
#define | SDC_MODE_CARDTYPE_SDV20 1U |
#define | SDC_MODE_CARDTYPE_MMC 2U |
#define | SDC_MODE_HIGH_CAPACITY 0x10U |
SDC bus error conditions | |
#define | SDC_NO_ERROR 0U |
#define | SDC_CMD_CRC_ERROR 1U |
#define | SDC_DATA_CRC_ERROR 2U |
#define | SDC_DATA_TIMEOUT 4U |
#define | SDC_COMMAND_TIMEOUT 8U |
#define | SDC_TX_UNDERRUN 16U |
#define | SDC_RX_OVERRUN 32U |
#define | SDC_STARTBIT_ERROR 64U |
#define | SDC_OVERFLOW_ERROR 128U |
#define | SDC_UNHANDLED_ERROR 0xFFFFFFFFU |
SDC configuration options | |
#define | SDC_INIT_RETRY 100 |
Number of initialization attempts before rejecting the card. More... | |
#define | SDC_MMC_SUPPORT FALSE |
Include support for MMC cards. More... | |
#define | SDC_NICE_WAITING TRUE |
Delays insertions. More... | |
#define | SDC_INIT_OCR_V20 0x50FF8000U |
OCR initialization constant for V20 cards. More... | |
#define | SDC_INIT_OCR 0x80100000U |
OCR initialization constant for non-V20 cards. More... | |
Macro Functions | |
#define | sdcIsCardInserted(sdcp) (sdc_lld_is_card_inserted(sdcp)) |
Returns the card insertion status. More... | |
#define | sdcIsWriteProtected(sdcp) (sdc_lld_is_write_protected(sdcp)) |
Returns the write protect status. More... | |
Enumerations |
Functions | |
void | sdcInit (void) |
SDC Driver initialization. More... | |
void | sdcObjectInit (SDCDriver *sdcp) |
Initializes the standard part of a SDCDriver structure. More... | |
void | sdcStart (SDCDriver *sdcp, const SDCConfig *config) |
Configures and activates the SDC peripheral. More... | |
void | sdcStop (SDCDriver *sdcp) |
Deactivates the SDC peripheral. More... | |
bool | sdcConnect (SDCDriver *sdcp) |
Performs the initialization procedure on the inserted card. More... | |
bool | sdcDisconnect (SDCDriver *sdcp) |
Brings the driver in a state safe for card removal. More... | |
bool | sdcRead (SDCDriver *sdcp, uint32_t startblk, uint8_t *buf, uint32_t n) |
Reads one or more blocks. More... | |
bool | sdcWrite (SDCDriver *sdcp, uint32_t startblk, const uint8_t *buf, uint32_t n) |
Writes one or more blocks. More... | |
sdcflags_t | sdcGetAndClearErrors (SDCDriver *sdcp) |
Returns the errors mask associated to the previous operation. More... | |
bool | sdcSync (SDCDriver *sdcp) |
Waits for card idle condition. More... | |
bool | sdcGetInfo (SDCDriver *sdcp, BlockDeviceInfo *bdip) |
Returns the media info. More... | |
bool | sdcErase (SDCDriver *sdcp, uint32_t startblk, uint32_t endblk) |
Erases the supplied blocks. More... | |
bool | _sdc_wait_for_transfer_state (SDCDriver *sdcp) |
Wait for the card to complete pending operations. More... | |
SDC Driver macros and structures.
Definition in file hal_sdc.h.