use arm arch to detect rp2040
This commit is contained in:
		| @@ -80,9 +80,9 @@ bool __no_inline_not_in_flash_func(get_bootsel_button)(void) { | |||||||
|   // The HI GPIO registers in SIO can observe and control the 6 QSPI pins. |   // The HI GPIO registers in SIO can observe and control the 6 QSPI pins. | ||||||
|   // Note the button pulls the pin *low* when pressed. |   // Note the button pulls the pin *low* when pressed. | ||||||
|  |  | ||||||
|   #if PICO_RP2040 |   #ifdef __ARM_ARCH_6M__ // CM0 for rp2040 | ||||||
|     #define CS_BIT (1u << 1) |     #define CS_BIT (1u << 1) | ||||||
|   #else |   #else // rp2350 (cm33/risv) | ||||||
|     #define CS_BIT SIO_GPIO_HI_IN_QSPI_CSN_BITS |     #define CS_BIT SIO_GPIO_HI_IN_QSPI_CSN_BITS | ||||||
|   #endif |   #endif | ||||||
|   bool button_state = (sio_hw->gpio_hi_in & CS_BIT); |   bool button_state = (sio_hw->gpio_hi_in & CS_BIT); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 hathach
					hathach