![]() |
NANO100_BSP V3.04.002
The Board Support Package for Nano100BN Series
|
Functions | |
void | SD_Delay (uint32_t count) |
Delay function. More... | |
static uint32_t | GenerateCRC (uint32_t u32Data, uint32_t u32GenPoly, uint32_t u32Accum) |
This function is used to generate CRC value. More... | |
static uint32_t | SingleWrite (uint32_t u32Data) |
This function is used to send data though SPI to general clock for SDCARD operation. More... | |
uint32_t | MMC_Command_Exec (uint8_t nCmd, uint32_t nArg, uint8_t *pchar, uint32_t *response) |
This function is used to Send SDCARD CMD and Receive Response. More... | |
void | MMC_FLASH_Init (void) |
This function is used to initialize the flash card. More... | |
uint32_t | SDCARD_Open (void) |
This function is used to Open GPIO function and initial SDCARD. More... | |
void | SDCARD_Close (void) |
This function is used to close SDCARD. More... | |
uint32_t | SDCARD_GetCardSize (uint32_t *pu32TotSecCnt) |
This function is used to get card total sector after SDCARD is opened. More... | |
uint32_t | GetLogicSector (void) |
This function is used to get logic sector size. More... | |
void | SpiRead (uint32_t addr, uint32_t size, uint8_t *buffer) |
This function is used to Get data from SD card. More... | |
void | SpiWrite (uint32_t addr, uint32_t size, uint8_t *buffer) |
This function is used to store data into SD card. More... | |
uint32_t | SDCARD_GetVersion (void) |
Variables | |
uint32_t | UINT32::l |
uint8_t | UINT32::b [4] |
uint16_t | UINT16::i |
uint8_t | UINT16::b [2] |
uint8_t | COMMAND::command_byte |
uint8_t | COMMAND::arg_required |
uint8_t | COMMAND::CRC |
uint8_t | COMMAND::trans_type |
uint8_t | COMMAND::response |
uint8_t | COMMAND::var_length |
|
static |
uint32_t GetLogicSector | ( | void | ) |
uint32_t MMC_Command_Exec | ( | uint8_t | nCmd, |
uint32_t | nArg, | ||
uint8_t * | pchar, | ||
uint32_t * | response | ||
) |
This function is used to Send SDCARD CMD and Receive Response.
[in] | nCmd | Set command register |
[in] | nArg | Set command argument |
[out] | *pchar | Get register and data |
[out] | *response | Get response |
TRUE | get response |
FALSE | 1.SD Card busy, 2.Card moved, 3.Timeout |
Definition at line 140 of file SDCard.c.
void MMC_FLASH_Init | ( | void | ) |
void SD_Delay | ( | uint32_t | count | ) |
void SDCARD_Close | ( | void | ) |
uint32_t SDCARD_GetCardSize | ( | uint32_t * | pu32TotSecCnt | ) |
uint32_t SDCARD_GetVersion | ( | void | ) |
uint32_t SDCARD_Open | ( | void | ) |
|
static |
void SpiRead | ( | uint32_t | addr, |
uint32_t | size, | ||
uint8_t * | buffer | ||
) |
void SpiWrite | ( | uint32_t | addr, |
uint32_t | size, | ||
uint8_t * | buffer | ||
) |
uint8_t COMMAND::arg_required |
uint8_t COMMAND::trans_type |