Skip to content

Commit ad915b8

Browse files
committed
Move cyw32 pin definitions
It was probably not a good idea to put the default pin definitions in cyw43_configport.h as they're specific to pico_w and Micropython needs these but it has it's own version of cyw43_configport.h
1 parent fa91723 commit ad915b8

File tree

3 files changed

+70
-30
lines changed

3 files changed

+70
-30
lines changed

src/boards/include/boards/pico2_w.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,39 @@
113113
#define PICO_RP2350_A2_SUPPORTED 1
114114
#endif
115115

116+
// PICO_CONFIG: CYW43_PIN_WL_DYNAMIC, flag to indicate if cyw43 SPI pins can be changed at runtime, type=bool, default=false, advanced=true, group=pico_cyw43_driver
117+
#ifndef CYW43_PIN_WL_DYNAMIC
118+
#define CYW43_PIN_WL_DYNAMIC 0
119+
#endif
120+
121+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_REG_ON, gpio pin to power up the cyw43 chip, type=int, default=23, advanced=true, group=pico_cyw43_driver
122+
#ifndef CYW43_DEFAULT_PIN_WL_REG_ON
123+
#define CYW43_DEFAULT_PIN_WL_REG_ON 23
124+
#endif
125+
126+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_DATA_OUT, gpio pin for spi data out to the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
127+
#ifndef CYW43_DEFAULT_PIN_WL_DATA_OUT
128+
#define CYW43_DEFAULT_PIN_WL_DATA_OUT 24u
129+
#endif
130+
131+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_DATA_IN, gpio pin for spi data in from the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
132+
#ifndef CYW43_DEFAULT_PIN_WL_DATA_IN
133+
#define CYW43_DEFAULT_PIN_WL_DATA_IN 24u
134+
#endif
135+
136+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_HOST_WAKE, gpio (irq) pin for the irq line from the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
137+
#ifndef CYW43_DEFAULT_PIN_WL_HOST_WAKE
138+
#define CYW43_DEFAULT_PIN_WL_HOST_WAKE 24u
139+
#endif
140+
141+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_CLOCK, gpio pin for the spi clock line to the cyw43 chip, type=int, default=29, advanced=true, group=pico_cyw43_driver
142+
#ifndef CYW43_DEFAULT_PIN_WL_CLOCK
143+
#define CYW43_DEFAULT_PIN_WL_CLOCK 29u
144+
#endif
145+
146+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_CS, gpio pin for the spi chip select to the cyw43 chip, type=int, default=25, advanced=true, group=pico_cyw43_driver
147+
#ifndef CYW43_DEFAULT_PIN_WL_CS
148+
#define CYW43_DEFAULT_PIN_WL_CS 25u
149+
#endif
150+
116151
#endif

src/boards/include/boards/pico_w.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,39 @@
114114
#define PICO_VSYS_PIN 29
115115
#endif
116116

117+
// PICO_CONFIG: CYW43_PIN_WL_DYNAMIC, flag to indicate if cyw43 SPI pins can be changed at runtime, type=bool, default=false, advanced=true, group=pico_cyw43_driver
118+
#ifndef CYW43_PIN_WL_DYNAMIC
119+
#define CYW43_PIN_WL_DYNAMIC 0
120+
#endif
121+
122+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_REG_ON, gpio pin to power up the cyw43 chip, type=int, default=23, advanced=true, group=pico_cyw43_driver
123+
#ifndef CYW43_DEFAULT_PIN_WL_REG_ON
124+
#define CYW43_DEFAULT_PIN_WL_REG_ON 23
125+
#endif
126+
127+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_DATA_OUT, gpio pin for spi data out to the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
128+
#ifndef CYW43_DEFAULT_PIN_WL_DATA_OUT
129+
#define CYW43_DEFAULT_PIN_WL_DATA_OUT 24u
130+
#endif
131+
132+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_DATA_IN, gpio pin for spi data in from the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
133+
#ifndef CYW43_DEFAULT_PIN_WL_DATA_IN
134+
#define CYW43_DEFAULT_PIN_WL_DATA_IN 24u
135+
#endif
136+
137+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_HOST_WAKE, gpio (irq) pin for the irq line from the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
138+
#ifndef CYW43_DEFAULT_PIN_WL_HOST_WAKE
139+
#define CYW43_DEFAULT_PIN_WL_HOST_WAKE 24u
140+
#endif
141+
142+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_CLOCK, gpio pin for the spi clock line to the cyw43 chip, type=int, default=29, advanced=true, group=pico_cyw43_driver
143+
#ifndef CYW43_DEFAULT_PIN_WL_CLOCK
144+
#define CYW43_DEFAULT_PIN_WL_CLOCK 29u
145+
#endif
146+
147+
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_CS, gpio pin for the spi chip select to the cyw43 chip, type=int, default=25, advanced=true, group=pico_cyw43_driver
148+
#ifndef CYW43_DEFAULT_PIN_WL_CS
149+
#define CYW43_DEFAULT_PIN_WL_CS 25u
150+
#endif
151+
117152
#endif

src/rp2_common/pico_cyw43_driver/include/cyw43_configport.h

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -99,36 +99,6 @@ static inline uint32_t cyw43_hal_ticks_ms(void) {
9999
return to_ms_since_boot(get_absolute_time());
100100
}
101101

102-
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_REG_ON, gpio pin to power up the cyw43 chip, type=int, default=23, advanced=true, group=pico_cyw43_driver
103-
#ifndef CYW43_DEFAULT_PIN_WL_REG_ON
104-
#define CYW43_DEFAULT_PIN_WL_REG_ON 23
105-
#endif
106-
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_DATA_OUT, gpio pin for spi data out to the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
107-
#ifndef CYW43_DEFAULT_PIN_WL_DATA_OUT
108-
#define CYW43_DEFAULT_PIN_WL_DATA_OUT 24u
109-
#endif
110-
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_DATA_IN, gpio pin for spi data in from the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
111-
#ifndef CYW43_DEFAULT_PIN_WL_DATA_IN
112-
#define CYW43_DEFAULT_PIN_WL_DATA_IN 24u
113-
#endif
114-
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_HOST_WAKE, gpio (irq) pin for the irq line from the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
115-
#ifndef CYW43_DEFAULT_PIN_WL_HOST_WAKE
116-
#define CYW43_DEFAULT_PIN_WL_HOST_WAKE 24u
117-
#endif
118-
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_CLOCK, gpio pin for the spi clock line to the cyw43 chip, type=int, default=29, advanced=true, group=pico_cyw43_driver
119-
#ifndef CYW43_DEFAULT_PIN_WL_CLOCK
120-
#define CYW43_DEFAULT_PIN_WL_CLOCK 29u
121-
#endif
122-
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_CS, gpio pin for the spi chip select to the cyw43 chip, type=int, default=25, advanced=true, group=pico_cyw43_driver
123-
#ifndef CYW43_DEFAULT_PIN_WL_CS
124-
#define CYW43_DEFAULT_PIN_WL_CS 25u
125-
#endif
126-
127-
// PICO_CONFIG: CYW43_PIN_WL_DYNAMIC, flag to indicate if cyw43 SPI pins can be changed at runtime, type=bool, default=false, advanced=true, group=pico_cyw43_driver
128-
#ifndef CYW43_PIN_WL_DYNAMIC
129-
#define CYW43_PIN_WL_DYNAMIC 0
130-
#endif
131-
132102
#if CYW43_PIN_WL_DYNAMIC
133103
// these are just an index into an array
134104
typedef enum cyw43_pin_index_t {

0 commit comments

Comments
 (0)