Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef TM_DEFINES_H
- #define TM_DEFINES_H
- // Use detect pin: PB6 - Pin low when card detected
- #define FATFS_USE_DETECT_PIN 1
- // Use writeprotect pin: PB7 - Pin low when write is enabled
- #define FATFS_USE_WRITEPROTECT_PIN 0
- // CD and WP pin
- #define FATFS_USE_DETECT_PIN_PORT GPIOB
- #define FATFS_USE_DETECT_PIN_PIN GPIO_PIN_6
- #define FATFS_USE_WRITEPROTECT_PIN_PORT GPIOB
- #define FATFS_USE_WRITEPROTECT_PIN_PIN GPIO_PIN_7
- // Enable SPI communication for SD card
- #define FATFS_USE_SDIO 0
- // Set your SPI, for corresponding pins look at TM SPI library
- #define FATFS_SPI SPI1
- #define FATFS_SPI_PINSPACK TM_SPI_PinsPack_1
- // Set your CS pin for SPI
- #define FATFS_CS_PORT GPIOB
- #define FATFS_CS_PIN GPIO_PIN_5
- #endif
Advertisement
Add Comment
Please, Sign In to add comment