We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7e1c91f + 394045f commit 0569188Copy full SHA for 0569188
hw/bsp/rp2040/family.c
@@ -79,7 +79,13 @@ bool __no_inline_not_in_flash_func(get_bootsel_button)(void) {
79
80
// The HI GPIO registers in SIO can observe and control the 6 QSPI pins.
81
// Note the button pulls the pin *low* when pressed.
82
- bool button_state = (sio_hw->gpio_hi_in & (1u << CS_PIN_INDEX));
+
83
+ #ifdef __ARM_ARCH_6M__ // CM0 for rp2040
84
+ #define CS_BIT (1u << 1)
85
+ #else // rp2350 (cm33/risv)
86
+ #define CS_BIT SIO_GPIO_HI_IN_QSPI_CSN_BITS
87
+ #endif
88
+ bool button_state = (sio_hw->gpio_hi_in & CS_BIT);
89
90
// Need to restore the state of chip select, else we are going to have a
91
// bad time when we return to code in flash!
0 commit comments