34#define DBG_PRINTF(...)
37#define PHYSICAL_BLOCK_SIZE 512
65#define DATA_RESP_MASK 0x11
70#define BACK_FROM_ERROR { SingleWrite(0xFF); SPI_SET_SS0_HIGH(SPI1); return FALSE;}
95#define GO_IDLE_STATE 0
100#define STOP_TRANSMISSION 5
102#define SET_BLOCKLEN 7
103#define READ_SINGLE_BLOCK 8
104#define READ_MULTIPLE_BLOCK 9
105#define SET_BLOCK_COUNT 10
106#define WRITE_BLOCK 11
107#define WRITE_MULTIPLE_BLOCK 12
108#define PROGRAM_CSD 13
109#define SET_WRITE_PROT 14
110#define CLR_WRITE_PROT 15
111#define SEND_WRITE_PROT 16
112#define TAG_SECTOR_START 17
113#define TAG_SECTOR_END 18
114#define UNTAG_SECTOR 19
115#define TAG_ERASE_GROUP_START 20
116#define TAG_ERASE_GROUP_END 21
117#define UNTAG_ERASE_GROUP 22
119#define LOCK_UNLOCK 24
123#define SD_SEND_STATUS 28
124#define SD_SET_WR_BLK_ERASE_COUNT 29
125#define SD_SEND_OP_COND 30
149uint32_t
MMC_Command_Exec (uint8_t cmd_loc, uint32_t argument,uint8_t *pchar, uint32_t* response);
152void SpiRead(uint32_t addr, uint32_t size, uint8_t* buffer);
153void SpiWrite(uint32_t addr, uint32_t size, uint8_t* buffer);
Nano100 series peripheral access layer header file. This file contains all the peripheral register's ...
uint32_t SDCARD_GetVersion(void)
uint32_t SDCARD_Open(void)
This function is used to Open GPIO function and initial SDCARD.
uint32_t GetLogicSector(void)
This function is used to get logic sector size.
void SpiWrite(uint32_t addr, uint32_t size, uint8_t *buffer)
This function is used to store data into SD card.
void SpiRead(uint32_t addr, uint32_t size, uint8_t *buffer)
This function is used to Get data from SD card.
void SDCARD_Close(void)
This function is used to close SDCARD.
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.
uint32_t SDCARD_GetCardSize(uint32_t *pu32TotSecCnt)
This function is used to get card total sector after SDCARD is opened.