#ifndef FATFS_SHIMATTA_SDIO_DRIVER_SHIMATTA_SDIO_CONFIG_H_ #define FATFS_SHIMATTA_SDIO_DRIVER_SHIMATTA_SDIO_CONFIG_H_ #include //General Definitions //Blocksize: 512 = 2^9 => 9 #define BLOCKSIZE 9 //9 //Hardware Flow: Prevents over- and underruns. #define HW_FLOW 0 //0 //1 bit: !=4 //4 bit: 4 #define BUSWIDTH 4 //4 //Initial Transfer CLK (ca. 400kHz) #define INITCLK 130 //120 //Working CLK (Maximum) #define WORKCLK 2 //0 //Data Timeout in CLK Cycles #define DTIMEOUT 0x8000 //150 //DMA Stream used for TX and RX DMA2 Stream 3 or 6 possible #define USE_DMA 1 #define DMASTREAM DMA2_Stream6 #define DMASTREAM_NO 6 /* Port Definitions */ #define PORTCLKMASK (RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOCEN) #define ALTFUNC 12 #define CLKPORT GPIOC #define D0PORT GPIOC #define D1PORT GPIOC #define D2PORT GPIOC #define D3PORT GPIOC #define CMDPORT GPIOD #define CLKPIN 12 #define D0PIN 8 #define D1PIN 9 #define D2PIN 10 #define D3PIN 11 #define CMDPIN 2 // Write Protection #define SDIO_ENABLE_WRITEPROT 0 #define WRITEPROT_PORT GPIOD // Add this port to port clock mask! #define WRITEPROT_PIN 0 #define WRITEPROT_PULLUP 0 #define WRITEPROT_ACTIVE_LEVEL 0 // Card inserted pin #define SDIO_ENABLE_INS 0 #define INS_PORT GPIOD // Add this port to port clock mask! #define INS_PIN 0 #define INS_PULLUP 0 #define INS_ACTIVE_LEVEL 0 #endif /* FATFS_SHIMATTA_SDIO_DRIVER_SHIMATTA_SDIO_CONFIG_H_ */