![]() |
NANO100_BSP V3.04.002
The Board Support Package for Nano100BN Series
|
Nano100 series SD Card driver header file. More...
#include "Nano100Series.h"
Go to the source code of this file.
Data Structures | |
union | UINT32 |
union | UINT16 |
struct | COMMAND |
Macros | |
#define | DBG_PRINTF(...) |
#define | PHYSICAL_BLOCK_SIZE 512 |
#define | EMPTY 0 |
#define | YES 1 |
#define | NO 0 |
#define | CMD 0 |
#define | RD 1 |
#define | WR 2 |
#define | RDB 3 |
#define | WDB 4 |
#define | R1 0 |
#define | R1b 1 |
#define | R2 2 |
#define | R3 3 |
#define | R7 4 |
#define | START_SBR 0xFE |
#define | START_MBR 0xFE |
#define | START_SBW 0xFE |
#define | START_MBW 0xFC |
#define | STOP_MBW 0xFD |
#define | DATA_RESP_MASK 0x11 |
#define | BUSY_BIT 0x80 |
#define | BACK_FROM_ERROR { SingleWrite(0xFF); SPI_SET_SS0_HIGH(SPI1); return FALSE;} |
#define | SD_SUCCESS (0) |
#define | SD_FAIL (1) |
#define | SDv1 1<<1 |
#define | SDv2 1<<2 |
#define | MMCv3 1<<3 |
#define | SDBlock 1<<4 |
#define | GO_IDLE_STATE 0 |
#define | SEND_OP_COND 1 |
#define | SEND_IF_COND 2 |
#define | SEND_CSD 3 |
#define | SEND_CID 4 |
#define | STOP_TRANSMISSION 5 |
#define | SEND_STATUS 6 |
#define | SET_BLOCKLEN 7 |
#define | READ_SINGLE_BLOCK 8 |
#define | READ_MULTIPLE_BLOCK 9 |
#define | SET_BLOCK_COUNT 10 |
#define | WRITE_BLOCK 11 |
#define | WRITE_MULTIPLE_BLOCK 12 |
#define | PROGRAM_CSD 13 |
#define | SET_WRITE_PROT 14 |
#define | CLR_WRITE_PROT 15 |
#define | SEND_WRITE_PROT 16 |
#define | TAG_SECTOR_START 17 |
#define | TAG_SECTOR_END 18 |
#define | UNTAG_SECTOR 19 |
#define | TAG_ERASE_GROUP_START 20 |
#define | TAG_ERASE_GROUP_END 21 |
#define | UNTAG_ERASE_GROUP 22 |
#define | ERASE 23 |
#define | LOCK_UNLOCK 24 |
#define | APP_CMD 25 |
#define | READ_OCR 26 |
#define | CRC_ON_OFF 27 |
#define | SD_SEND_STATUS 28 |
#define | SD_SET_WR_BLK_ERASE_COUNT 29 |
#define | SD_SEND_OP_COND 30 |
Functions | |
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_GetVersion (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. More... | |
uint32_t | GetLogicSector (void) |
This function is used to get logic sector size. More... | |
uint32_t | SDCARD_GetCardSize (uint32_t *pu32TotSecCnt) |
This function is used to get card total sector after SDCARD is opened. 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... | |
Nano100 series SD Card driver header file.
Definition in file SDCard.h.