annotate stm32_eval.h @ 80:1a4573062b37

Reshuffle in preparation for being able to have a common API for SPI flash and (emulated) EEPROM.
author Daniel O'Connor <darius@dons.net.au>
date Sun, 07 Jul 2013 22:49:02 +0930
parents f0563086040d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
1 /* SDIO Intialization divisor (400KHz max) */
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
2 #define SDIO_INIT_CLK_DIV ((uint8_t)0xb2)
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
3 /* SDIO Data Transfer Frequency (25MHz max) */
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
4 #define SDIO_TRANSFER_CLK_DIV ((uint8_t)0x01)
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
5
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
6 #undef SD_HAVE_DETECT
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
7
56
f0563086040d Fix more warnings. Note the 'buf might be used uninitialised' warning appears to be a GCC bug.
Daniel O'Connor <darius@dons.net.au>
parents: 55
diff changeset
8 /* Going to 4 bit mode gives CRC errors in PIO mode or hangs in DMA */
49
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
9 #define SD_NO_4BIT
55
b21db2b47a27 Enable DMA mode by initing DMA channel and enabling IRQ handler.
Daniel O'Connor <darius@dons.net.au>
parents: 52
diff changeset
10 #define SD_DMA_MODE ((uint32_t)0x00000000)
b21db2b47a27 Enable DMA mode by initing DMA channel and enabling IRQ handler.
Daniel O'Connor <darius@dons.net.au>
parents: 52
diff changeset
11 //#define SD_POLLING_MODE ((uint32_t)0x00000002)
49
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
12
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
13 /* No idea if this is for all SD cards. The one I have has 1024 byte blocks but 512 byte reads work
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
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
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
15 */
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
16 #define SD_BLOCK_SIZE 512
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
17
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
18 void SD_LowLevel_DeInit(void);
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
19 void SD_LowLevel_Init(void);
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
20 void SD_LowLevel_DMA_RxConfig(uint32_t *BufferDST, uint32_t BufferSize);
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
21 void SD_LowLevel_DMA_TxConfig(uint32_t *BufferSRC, uint32_t BufferSize);
52
9521be9b391e Fix various warnings.
Daniel O'Connor <darius@dons.net.au>
parents: 50
diff changeset
22 uint32_t SD_DMAEndOfTransferStatus(void);
49
ace431a0d0f5 Add SDIO code poached from STM. Use FatFS to read from SD card.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
23