Guest User

define.h

a guest
Mar 22nd, 2018
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.79 KB | None | 0 0
  1. #ifndef TM_DEFINES_H
  2. #define TM_DEFINES_H
  3.  
  4. // Use detect pin: PB6 - Pin low when card detected
  5. #define FATFS_USE_DETECT_PIN                1
  6.  
  7. // Use writeprotect pin: PB7 - Pin low when write is enabled
  8. #define FATFS_USE_WRITEPROTECT_PIN          0
  9.  
  10. // CD and WP pin
  11. #define FATFS_USE_DETECT_PIN_PORT           GPIOB
  12. #define FATFS_USE_DETECT_PIN_PIN            GPIO_PIN_6
  13.  
  14. #define FATFS_USE_WRITEPROTECT_PIN_PORT     GPIOB
  15. #define FATFS_USE_WRITEPROTECT_PIN_PIN      GPIO_PIN_7
  16.  
  17. // Enable SPI communication for SD card
  18. #define FATFS_USE_SDIO                      0
  19.  
  20. // Set your SPI, for corresponding pins look at TM SPI library
  21. #define FATFS_SPI                           SPI1
  22. #define FATFS_SPI_PINSPACK                  TM_SPI_PinsPack_1
  23.    
  24. // Set your CS pin for SPI
  25. #define FATFS_CS_PORT                       GPIOB
  26. #define FATFS_CS_PIN                        GPIO_PIN_5
  27.  
  28. #endif
Advertisement
Add Comment
Please, Sign In to add comment