Fix CI errors by adding CIRCUITPY_BOOT_BUTTON_NO_GPIO for boards w/o BOOTSEL GPIO connection.

This commit is contained in:
eightycc 2025-04-08 13:27:30 -07:00
parent 3c6056f252
commit fd9af9145a
3 changed files with 4 additions and 4 deletions

View file

@ -56,7 +56,7 @@
#include "RP2350.h" // CMSIS
#endif
#ifdef CIRCUITPY_BOOT_BUTTON
#ifdef CIRCUITPY_BOOT_BUTTON_NO_GPIO
#include "hardware/gpio.h"
#include "hardware/sync.h"
#include "hardware/structs/ioqspi.h"
@ -584,7 +584,7 @@ void port_boot_info(void) {
#endif
}
#if defined(CIRCUITPY_BOOT_BUTTON)
#if defined(CIRCUITPY_BOOT_BUTTON_NO_GPIO)
bool __no_inline_not_in_flash_func(port_boot_button_pressed)(void) {
// Sense the state of the boot button. Because this function
// disables flash, it cannot be safely called once the second

View file

@ -67,7 +67,7 @@ MP_WEAK size_t port_heap_get_largest_free_size(void) {
}
MP_WEAK bool port_boot_button_pressed(void) {
#if defined(CIRCUITPY_BOOT_BUTTON) && CIRCUITPY_BOOT_BUTTON != 1
#if defined(CIRCUITPY_BOOT_BUTTON)
// Init/deinit the boot button every time in case it is used for LEDs.
digitalio_digitalinout_obj_t boot_button;
common_hal_digitalio_digitalinout_construct(&boot_button, CIRCUITPY_BOOT_BUTTON);

View file

@ -129,7 +129,7 @@ void print_safe_mode_message(safe_mode_t reason) {
case SAFE_MODE_USER:
#if defined(BOARD_USER_SAFE_MODE_ACTION)
message = BOARD_USER_SAFE_MODE_ACTION;
#elif defined(CIRCUITPY_BOOT_BUTTON)
#elif defined(CIRCUITPY_BOOT_BUTTON) || defined(CIRCUITPY_BOOT_BUTTON_NO_GPIO)
message = MP_ERROR_TEXT("You pressed the BOOT button at start up");
#else
message = MP_ERROR_TEXT("You pressed the reset button during boot.");