Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison stm32_eval.h @ 55:b21db2b47a27
Enable DMA mode by initing DMA channel and enabling IRQ handler.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Sun, 07 Apr 2013 22:34:05 +0930 |
parents | 9521be9b391e |
children | f0563086040d |
comparison
equal
deleted
inserted
replaced
54:79c7892d07b3 | 55:b21db2b47a27 |
---|---|
5 | 5 |
6 #undef SD_HAVE_DETECT | 6 #undef SD_HAVE_DETECT |
7 | 7 |
8 /* Going to 4 bit mode gives CRC errors */ | 8 /* Going to 4 bit mode gives CRC errors */ |
9 #define SD_NO_4BIT | 9 #define SD_NO_4BIT |
10 //#define SD_DMA_MODE ((uint32_t)0x00000000) | 10 #define SD_DMA_MODE ((uint32_t)0x00000000) |
11 #define SD_POLLING_MODE ((uint32_t)0x00000002) | 11 //#define SD_POLLING_MODE ((uint32_t)0x00000002) |
12 | 12 |
13 /* No idea if this is for all SD cards. The one I have has 1024 byte blocks but 512 byte reads work | 13 /* No idea if this is for all SD cards. The one I have has 1024 byte blocks but 512 byte reads work |
14 * Note that SD_ReadBlock forces blocksize to be 512 and divides the address by 512 but only for SDIO_HIGH_CAPACITY_SD_CARD's | 14 * Note that SD_ReadBlock forces blocksize to be 512 and divides the address by 512 but only for SDIO_HIGH_CAPACITY_SD_CARD's |
15 */ | 15 */ |
16 #define SD_BLOCK_SIZE 512 | 16 #define SD_BLOCK_SIZE 512 |
19 void SD_LowLevel_Init(void); | 19 void SD_LowLevel_Init(void); |
20 void SD_LowLevel_DMA_RxConfig(uint32_t *BufferDST, uint32_t BufferSize); | 20 void SD_LowLevel_DMA_RxConfig(uint32_t *BufferDST, uint32_t BufferSize); |
21 void SD_LowLevel_DMA_TxConfig(uint32_t *BufferSRC, uint32_t BufferSize); | 21 void SD_LowLevel_DMA_TxConfig(uint32_t *BufferSRC, uint32_t BufferSize); |
22 uint32_t SD_DMAEndOfTransferStatus(void); | 22 uint32_t SD_DMAEndOfTransferStatus(void); |
23 | 23 |
24 |