8000 Merge pull request #7021 from jepler/pico-w-vbus-sense · adafruit/circuitpython@8d34445 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8d34445

Browse files
authored
Merge pull request #7021 from jepler/pico-w-vbus-sense
pico w: pins improvements
2 parents fc549fe + f882571 commit 8d34445

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

ports/raspberrypi/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ INC_CYW43 := \
6565
-isystem sdk/src/rp2_common/pico_cyw43_arch/include/ \
6666
-isystem sdk/src/rp2_common/pico_lwip/include/ \
6767

68-
CFLAGS_CYW43 := -DCYW43_LWIP=1 -DPICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 -DCYW43_USE_SPI -DIGNORE_GPIO25 -DIGNORE_GPIO23 -DCYW43_LOGIC_DEBUG=0
68+
CFLAGS_CYW43 := -DCYW43_LWIP=1 -DPICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 -DCYW43_USE_SPI -DIGNORE_GPIO25 -DIGNORE_GPIO23 -DIGNORE_GPIO24 -DCYW43_LOGIC_DEBUG=0
6969
SRC_SDK_CYW43 := \
7070
src/common/pico_sync/sem.c \
7171
src/rp2_common/cyw43_driver/cyw43_bus_pio_spi.c \

ports/raspberrypi/boards/raspberry_pi_pico_w/pins.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
2828
{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) },
2929

3030
{ MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_CYW1) },
31-
{ MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_CYW1) },
32-
33-
{ MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO24) },
34-
{ MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) },
3531

3632
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_CYW0) },
37-
{ MP_ROM_QSTR(MP_QSTR_CYW0), MP_ROM_PTR(&pin_CYW0) },
33+
34+
{ MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_CYW2) },
3835

3936
{ MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) },
4037
{ MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) },
@@ -47,8 +44,5 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
4744
{ MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) },
4845
{ MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) },
4946
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) },
50-
51-
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) },
52-
{ MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) },
5347
};
5448
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

ports/raspberrypi/common-hal/microcontroller/__init__.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ const mp_rom_map_elem_t mcu_pin_global_dict_table[TOTAL_GPIO_COUNT] = {
176176
#if !defined(IGNORE_GPIO23)
177177
{ MP_ROM_QSTR(MP_QSTR_GPIO23), MP_ROM_PTR(&pin_GPIO23) },
178178
#endif
179+
#if !defined(IGNORE_GPIO24)
179180
{ MP_ROM_QSTR(MP_QSTR_GPIO24), MP_ROM_PTR(&pin_GPIO24) },
181+
#endif
180182
#if !defined(IGNORE_GPIO25)
181183
{ MP_ROM_QSTR(MP_QSTR_GPIO25), MP_ROM_PTR(&pin_GPIO25) },
182184
#endif
@@ -187,6 +189,7 @@ const mp_rom_map_elem_t mcu_pin_global_dict_table[TOTAL_GPIO_COUNT] = {
187189
#if CIRCUITPY_CYW43
188190
{ MP_ROM_QSTR(MP_QSTR_CYW0), MP_ROM_PTR(&pin_CYW0) },
189191
{ MP_ROM_QSTR(MP_QSTR_CYW1), MP_ROM_PTR(&pin_CYW1) },
192+
{ MP_ROM_QSTR(MP_QSTR_CYW2), MP_ROM_PTR(&pin_CYW2) },
190193
#endif
191194
};
192195
MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_global_dict_table);

ports/raspberrypi/peripherals/pins.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,12 @@ PIN(19);
6464
PIN(20);
6565
PIN(21);
6666
PIN(22);
67+
#if !defined(IGNORE_GPIO23)
6768
PIN(23);
69+
#endif
70+
#if !defined(IGNORE_GPIO24)
6871
PIN(24);
72+
#endif
6973
#if !defined(IGNORE_GPIO25)
7074
PIN(25);
7175
#endif
@@ -76,4 +80,5 @@ PIN(29);
7680
#if CIRCUITPY_CYW43
7781
CYW_PIN(0);
7882
CYW_PIN(1);
83+
CYW_PIN(2);
7984
#endif

ports/raspberrypi/peripherals/pins.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ extern const mcu_pin_obj_t pin_GPIO29;
7373
#if CIRCUITPY_CYW43
7474
extern const mcu_pin_obj_t pin_CYW0;
7575
extern const mcu_pin_obj_t pin_CYW1;
76+
extern const mcu_pin_obj_t pin_CYW2;
7677
#endif
7778

7879
#endif // MICROPY_INCLUDED_RASPBERRYPI_PERIPHERALS_PINS_H

0 commit comments

Comments
 (0)
0