Skip to content

Commit e31afc6

Browse files
committed
Remove SD core dependencies
STM32SD will be able to handle properly SD detect pin and FatFs options. SD_DETECT_PIN pinnumber definition could be added in variant.h SD_DATATIMEOUT could be redefined in variant.h Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent a320623 commit e31afc6

File tree

5 files changed

+13
-300
lines changed

5 files changed

+13
-300
lines changed

variants/DISCO_F746NG/ffconf.h

Lines changed: 0 additions & 247 deletions
This file was deleted.

variants/DISCO_F746NG/sd_conf.h

Lines changed: 0 additions & 51 deletions
This file was deleted.

variants/DISCO_F746NG/variant.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ const PinName digitalPin[] = {
4848
PF_6, //D21/A5
4949
PI_11, //D22 User btn
5050
PB_7, //D23 ST-Link Rx
51-
PA_9 //D24 ST-Link Tx
51+
PA_9, //D24 ST-Link Tx
52+
PC_13 //D25 SD detect
5253
};
5354

5455
#ifdef __cplusplus

variants/DISCO_F746NG/variant.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ enum {
5959
PI11, //D22 User btn
6060
PB7, //D23 ST-Link Rx
6161
PA9, //D24 ST-Link Tx
62+
PC13, //D25 SD detect
6263
PEND
6364
};
6465

6566
// This must be a literal with the same value as PEND
66-
#define NUM_DIGITAL_PINS 25
67+
#define NUM_DIGITAL_PINS 26
6768
// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
6869
#define NUM_ANALOG_INPUTS 6
6970
#define NUM_ANALOG_FIRST 16
@@ -89,6 +90,9 @@ enum {
8990
#define PIN_SERIAL_RX PB7
9091
#define PIN_SERIAL_TX PA9
9192

93+
// SD detect signal
94+
#define SD_DETECT_PIN PC13
95+
9296
#ifdef __cplusplus
9397
} // extern "C"
9498
#endif

variants/board_template/variant.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ enum {
144144
//#define PIN_SERIALLP1_RX x // For LPUART1 RX
145145
//#define PIN_SERIALLP1_TX x // For LPUART1 TX
146146

147+
// SD card slot Definitions
148+
// SD detect signal can be defined if required
149+
//#define SD_DETECT_PIN x
150+
// SD Read/Write timeout, default value defined in STM32SD library
151+
//#define SD_DATATIMEOUT x
152+
147153
#ifdef __cplusplus
148154
} // extern "C"
149155
#endif

0 commit comments

Comments
 (0)