File tree Expand file tree Collapse file tree 2 files changed +28
-6
lines changed Expand file tree Collapse file tree 2 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 17
17
#ifndef MBED_FLASH_CONFIGS_H
18
18
#define MBED_FLASH_CONFIGS_H
19
19
20
+ enum MemoryType {
21
+ MX25R6435F ,
22
+ N25Q128A ,
23
+ MT25Q
24
+ };
25
+
26
+ #if defined(QSPI_FLASH_CHIP )
27
+
28
+ #if (QSPI_FLASH_CHIP == MX25R6435F )
29
+ #include "MX25RXX35F_config.h"
30
+
31
+ #elif (QSPI_FLASH_CHIP == N25Q128A )
32
+ #include "N25Q128A_config.h"
33
+
34
+ #elif (QSPI_FLASH_CHIP == MT25Q )
35
+ #include "MT25Q_config.h"
36
+
37
+ #endif
38
+
39
+ #else // QSPI_FLASH_CHIP not defined
40
+
20
41
#if defined(TARGET_DISCO_L475VG_IOT01A )
21
42
#include "MX25RXX35F_config.h" // MX25R6435F
22
43
88
109
#include "S25FL128S_config.h"
89
110
90
111
#endif
112
+ #endif // QSPI_FLASH_CHIP
91
113
#endif // MBED_FLASH_CONFIGS_H
92
114
Original file line number Diff line number Diff line change @@ -70,12 +70,12 @@ uint8_t rx_buf[DATA_SIZE_1024];
70
70
71
71
72
72
// some target defines QSPI pins as integers thus conversion needed
73
- #define QPIN_0 static_cast <PinName>(QSPI_FLASH1_IO0 )
74
- #define QPIN_1 static_cast <PinName>(QSPI_FLASH1_IO1 )
75
- #define QPIN_2 static_cast <PinName>(QSPI_FLASH1_IO2 )
76
- #define QPIN_3 static_cast <PinName>(QSPI_FLASH1_IO3 )
77
- #define QSCK static_cast <PinName>(QSPI_FLASH1_SCK )
78
- #define QCSN static_cast <PinName>(QSPI_FLASH1_CSN )
73
+ #define QPIN_0 static_cast <PinName>(MBED_CONF_DRIVERS_QSPI_IO0 )
74
+ #define QPIN_1 static_cast <PinName>(MBED_CONF_DRIVERS_QSPI_IO1 )
75
+ #define QPIN_2 static_cast <PinName>(MBED_CONF_DRIVERS_QSPI_IO2 )
76
+ #define QPIN_3 static_cast <PinName>(MBED_CONF_DRIVERS_QSPI_IO3 )
77
+ #define QSCK static_cast <PinName>(MBED_CONF_DRIVERS_QSPI_SCK )
78
+ #define QCSN static_cast <PinName>(MBED_CONF_DRIVERS_QSPI_CSN )
79
79
80
80
81
81
static uint32_t gen_flash_address ()
You can’t perform that action at this time.
0 commit comments