Skip to content

Commit 93aa3fb

Browse files
committed
clean up, rename PIN_QSPI_DATAx to PIN_QSPI_IOx
1 parent a18c380 commit 93aa3fb

File tree

6 files changed

+22
-34
lines changed

6 files changed

+22
-34
lines changed

cores/nRF5/flash/flash_qspi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ void flash_qspi_init (void)
128128
.pins = {
129129
.sck_pin = g_ADigitalPinMap[PIN_QSPI_SCK],
130130
.csn_pin = g_ADigitalPinMap[PIN_QSPI_CS],
131-
.io0_pin = g_ADigitalPinMap[PIN_QSPI_DATA0],
132-
.io1_pin = g_ADigitalPinMap[PIN_QSPI_DATA1],
133-
.io2_pin = g_ADigitalPinMap[PIN_QSPI_DATA2],
134-
.io3_pin = g_ADigitalPinMap[PIN_QSPI_DATA3],
131+
.io0_pin = g_ADigitalPinMap[PIN_QSPI_IO0],
132+
.io1_pin = g_ADigitalPinMap[PIN_QSPI_IO1],
133+
.io2_pin = g_ADigitalPinMap[PIN_QSPI_IO2],
134+
.io3_pin = g_ADigitalPinMap[PIN_QSPI_IO3],
135135
},
136136
.prot_if = {
137137
.readoc = NRF_QSPI_READOC_READ4IO,

variants/feather_nrf52840_express/variant.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,5 @@ void initVariant()
104104

105105
pinMode(PIN_LED2, OUTPUT);
106106
ledOff(PIN_LED2);
107-
108-
// Init External Flash
109-
flash_qspi_init();
110107
}
111108

variants/feather_nrf52840_express/variant.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,13 @@ static const uint8_t SCK = PIN_SPI_SCK ;
122122
#define PIN_WIRE_SDA (22)
123123
#define PIN_WIRE_SCL (23)
124124

125-
/*
126-
* QSPI interface for external flash
127-
*/
125+
// QSPI Pins
128126
#define PIN_QSPI_SCK 27
129127
#define PIN_QSPI_CS 28
130-
#define PIN_QSPI_DATA0 29
131-
#define PIN_QSPI_DATA1 30
132-
#define PIN_QSPI_DATA2 31
133-
#define PIN_QSPI_DATA3 32
128+
#define PIN_QSPI_IO0 29
129+
#define PIN_QSPI_IO1 30
130+
#define PIN_QSPI_IO2 31
131+
#define PIN_QSPI_IO3 32
134132

135133
// On-board QSPI Flash
136134
#define EXTERNAL_FLASH_DEVICES GD25Q16C

variants/metro_nrf52840_express/variant.h

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,13 @@ static const uint8_t SCK = PIN_SPI_SCK ;
122122
#define PIN_WIRE_SDA (22)
123123
#define PIN_WIRE_SCL (23)
124124

125-
/*
126-
* QSPI interface for external flash
127-
*/
128-
#define PIN_QSPI_SCK 27
129-
#define PIN_QSPI_CS 28
130-
#define PIN_QSPI_DATA0 29
131-
#define PIN_QSPI_DATA1 30
132-
#define PIN_QSPI_DATA2 31
133-
#define PIN_QSPI_DATA3 32
125+
// QSPI Pins
126+
#define PIN_QSPI_SCK 27
127+
#define PIN_QSPI_CS 28
128+
#define PIN_QSPI_IO0 29
129+
#define PIN_QSPI_IO1 30
130+
#define PIN_QSPI_IO2 31
131+
#define PIN_QSPI_IO3 32
134132

135133
// On-board QSPI Flash
136134
// If EXTERNAL_FLASH_DEVICES is not defined, all supported devices will be used

variants/pca10056/variant.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ void initVariant()
4545
ledOff(PIN_LED1);
4646

4747
pinMode(PIN_LED2, OUTPUT);
48-
ledOff(PIN_LED2);
49-
50-
// Init External Flash
51-
flash_qspi_init();
48+
ledOff(PIN_LED2);;
5249
}
5350

variants/pca10056/variant.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,13 @@ static const uint8_t SCK = PIN_SPI_SCK ;
114114
#define PIN_WIRE_SDA (26)
115115
#define PIN_WIRE_SCL (27)
116116

117-
/*
118-
* QSPI interface for external flash
119-
*/
117+
// QSPI Pins
120118
#define PIN_QSPI_SCK 19
121119
#define PIN_QSPI_CS 17
122-
#define PIN_QSPI_DATA0 20
123-
#define PIN_QSPI_DATA1 21
124-
#define PIN_QSPI_DATA2 22
125-
#define PIN_QSPI_DATA3 23
120+
#define PIN_QSPI_IO0 20
121+
#define PIN_QSPI_IO1 21
122+
#define PIN_QSPI_IO2 22
123+
#define PIN_QSPI_IO3 23
126124

127125
// On-board QSPI Flash
128126
#define EXTERNAL_FLASH_DEVICES MX25R6435F

0 commit comments

Comments
 (0)