mirror of
https://github.com/micropython/micropython.git
synced 2026-03-11 03:10:17 +01:00
alif/boards/ALIF_ENSEMBLE: Add all SW1 pins and enable pull-ups on them.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -54,3 +54,12 @@ const ospi_flash_settings_t ospi_flash_settings[] = {
|
||||
},
|
||||
};
|
||||
const size_t ospi_flash_settings_len = 1;
|
||||
|
||||
void board_early_init(void) {
|
||||
// Configure the joystick buttons as an input with pull-up enabled.
|
||||
mp_hal_pin_config(pin_JOY_LEFT, MP_HAL_PIN_MODE_INPUT, MP_HAL_PIN_PULL_UP, 0, 0, 0, true);
|
||||
mp_hal_pin_config(pin_JOY_RIGHT, MP_HAL_PIN_MODE_INPUT, MP_HAL_PIN_PULL_UP, 0, 0, 0, true);
|
||||
mp_hal_pin_config(pin_JOY_DOWN, MP_HAL_PIN_MODE_INPUT, MP_HAL_PIN_PULL_UP, 0, 0, 0, true);
|
||||
mp_hal_pin_config(pin_JOY_UP, MP_HAL_PIN_MODE_INPUT, MP_HAL_PIN_PULL_UP, 0, 0, 0, true);
|
||||
mp_hal_pin_config(pin_JOY_SW, MP_HAL_PIN_MODE_INPUT, MP_HAL_PIN_PULL_UP, 0, 0, 0, true);
|
||||
}
|
||||
|
||||
@@ -54,3 +54,7 @@
|
||||
#define MICROPY_HW_FLASH_STORAGE_BYTES (32 * 1024 * 1024)
|
||||
#define MICROPY_HW_FLASH_STORAGE_FS_BYTES (16 * 1024 * 1024)
|
||||
#define MICROPY_HW_FLASH_STORAGE_ROMFS_BYTES (16 * 1024 * 1024)
|
||||
|
||||
#define MICROPY_BOARD_EARLY_INIT board_early_init
|
||||
|
||||
void board_early_init(void);
|
||||
|
||||
@@ -12,10 +12,16 @@ OSPI1_D6,P10_3
|
||||
OSPI1_D7,P10_4
|
||||
OSPI1_RXDS,P10_7
|
||||
|
||||
# LEDs
|
||||
LED_BLUE,P12_0
|
||||
LED_RED,P12_3
|
||||
|
||||
# SW1 joystick
|
||||
JOY_LEFT,P15_0
|
||||
JOY_RIGHT,P15_1
|
||||
JOY_DOWN,P15_2
|
||||
JOY_UP,P15_3
|
||||
JOY_SW,P15_4
|
||||
|
||||
# UART buses
|
||||
UART0_TX,P0_1
|
||||
|
||||
|
Reference in New Issue
Block a user