Fixed structfoo

This commit is contained in:
Mario Hüttel 2015-11-24 12:14:45 +01:00
parent 6b3920ede2
commit 7065af6477
2 changed files with 9 additions and 2 deletions

View File

@ -67,7 +67,7 @@ void SDIO_DMA_Init(){
DMASTREAM->CR = DMAM2P;
//Address Conffiguration
//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->CR |= DMA_SxCR_EN;
@ -129,7 +129,7 @@ int SDIO_getResp(uint8_t expectedCMD, uint8_t typeOfAns, uint32_t *responseBuffe
while (1) {
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(expectedCMD == 41) {
//This command does not have a CRC...Doushite....

View File

@ -19,6 +19,8 @@ DRESULT SDIO_disk_write(const BYTE *buff, DWORD sector, UINT count);
DRESULT SDIO_disk_ioctl(BYTE cmd, void* buff);
DWORD get_fattime();
//Defines for Card Status in struct _CardStatus
#define CURRENT_STATE_IDLE 0
#define CURRENT_STATE_READY 1
#define CURRENT_STATE_IDENT 2
@ -30,6 +32,7 @@ DWORD get_fattime();
#define CURRENT_STATE_DIS 8
typedef struct _CardStatus {
uint32_t reserved : 3;
uint32_t AKE_SEQ_ERROR : 1;
@ -63,9 +66,13 @@ typedef struct _CardStatus {
#define CARD_MMC 2//Never use. MMC not supported
#define CARD_NONE 0
#define CCS_SC 0
#define CCS_HC 1
typedef struct _SDInfo {
uint32_t rca;
uint8_t type;
uint8_t CCS;
}SDInfo_t;
typedef union _StatusConv {