view stm32_eval.h @ 89:fc21fb5b171b default tip

Make error message more useful
author Daniel O'Connor <darius@dons.net.au>
date Fri, 13 Mar 2015 11:39:59 +1030
parents f0563086040d
children
line wrap: on
line source

/* SDIO Intialization divisor (400KHz max) */
#define SDIO_INIT_CLK_DIV                ((uint8_t)0xb2)
/* SDIO Data Transfer Frequency (25MHz max) */
#define SDIO_TRANSFER_CLK_DIV            ((uint8_t)0x01)

#undef SD_HAVE_DETECT

/* Going to 4 bit mode gives CRC errors in PIO mode or hangs in DMA */
#define SD_NO_4BIT
#define SD_DMA_MODE                                ((uint32_t)0x00000000)
//#define SD_POLLING_MODE                            ((uint32_t)0x00000002)

/* No idea if this is for all SD cards. The one I have has 1024 byte blocks but 512 byte reads work
 * Note that SD_ReadBlock forces blocksize to be 512 and divides the address by 512 but only for SDIO_HIGH_CAPACITY_SD_CARD's
 */
#define SD_BLOCK_SIZE 512

void SD_LowLevel_DeInit(void);
void SD_LowLevel_Init(void);
void SD_LowLevel_DMA_RxConfig(uint32_t *BufferDST, uint32_t BufferSize);
void SD_LowLevel_DMA_TxConfig(uint32_t *BufferSRC, uint32_t BufferSize);
uint32_t SD_DMAEndOfTransferStatus(void);