Fixed structfoo
This commit is contained in:
parent
6b3920ede2
commit
7065af6477
@ -67,7 +67,7 @@ void SDIO_DMA_Init(){
|
|||||||
DMASTREAM->CR = DMAM2P;
|
DMASTREAM->CR = DMAM2P;
|
||||||
//Address Conffiguration
|
//Address Conffiguration
|
||||||
//Memory address is set by write and read block functions
|
//Memory address is set by write and read block functions
|
||||||
//DMASTREAM->M0AR = (uint32_t)&rxtxbuffer;
|
//DMASTREAM->M0AR = (uint32_t)&rxtxbuffer; //Has to be set in red/write func
|
||||||
DMASTREAM->PAR = (uint32_t)&SDIO->FIFO; //Not sure if this works
|
DMASTREAM->PAR = (uint32_t)&SDIO->FIFO; //Not sure if this works
|
||||||
//DMASTREAM->CR |= DMA_SxCR_EN;
|
//DMASTREAM->CR |= DMA_SxCR_EN;
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ int SDIO_getResp(uint8_t expectedCMD, uint8_t typeOfAns, uint32_t *responseBuffe
|
|||||||
while (1) {
|
while (1) {
|
||||||
if (SDIO->STA & SDIO_STA_CMDREND) break; //Corrct Respone Received
|
if (SDIO->STA & SDIO_STA_CMDREND) break; //Corrct Respone Received
|
||||||
|
|
||||||
//Exclude 41 from valid CRC check
|
//Exclude ACMD41 from valid CRC check
|
||||||
if ((SDIO->STA & SDIO_STA_CCRCFAIL)) {
|
if ((SDIO->STA & SDIO_STA_CCRCFAIL)) {
|
||||||
if(expectedCMD == 41) {
|
if(expectedCMD == 41) {
|
||||||
//This command does not have a CRC...Doushite....
|
//This command does not have a CRC...Doushite....
|
||||||
|
@ -19,6 +19,8 @@ DRESULT SDIO_disk_write(const BYTE *buff, DWORD sector, UINT count);
|
|||||||
DRESULT SDIO_disk_ioctl(BYTE cmd, void* buff);
|
DRESULT SDIO_disk_ioctl(BYTE cmd, void* buff);
|
||||||
DWORD get_fattime();
|
DWORD get_fattime();
|
||||||
|
|
||||||
|
|
||||||
|
//Defines for Card Status in struct _CardStatus
|
||||||
#define CURRENT_STATE_IDLE 0
|
#define CURRENT_STATE_IDLE 0
|
||||||
#define CURRENT_STATE_READY 1
|
#define CURRENT_STATE_READY 1
|
||||||
#define CURRENT_STATE_IDENT 2
|
#define CURRENT_STATE_IDENT 2
|
||||||
@ -30,6 +32,7 @@ DWORD get_fattime();
|
|||||||
#define CURRENT_STATE_DIS 8
|
#define CURRENT_STATE_DIS 8
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _CardStatus {
|
typedef struct _CardStatus {
|
||||||
uint32_t reserved : 3;
|
uint32_t reserved : 3;
|
||||||
uint32_t AKE_SEQ_ERROR : 1;
|
uint32_t AKE_SEQ_ERROR : 1;
|
||||||
@ -63,9 +66,13 @@ typedef struct _CardStatus {
|
|||||||
#define CARD_MMC 2//Never use. MMC not supported
|
#define CARD_MMC 2//Never use. MMC not supported
|
||||||
#define CARD_NONE 0
|
#define CARD_NONE 0
|
||||||
|
|
||||||
|
#define CCS_SC 0
|
||||||
|
#define CCS_HC 1
|
||||||
|
|
||||||
typedef struct _SDInfo {
|
typedef struct _SDInfo {
|
||||||
uint32_t rca;
|
uint32_t rca;
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
|
uint8_t CCS;
|
||||||
}SDInfo_t;
|
}SDInfo_t;
|
||||||
|
|
||||||
typedef union _StatusConv {
|
typedef union _StatusConv {
|
||||||
|
Loading…
Reference in New Issue
Block a user