From ea9bc9b4b64e276e0fa00b3d0c4c48579533a66b Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Wed, 29 Jul 2020 13:46:10 -0400 Subject: [PATCH 1/2] set screen orientation to portrait --- ports/atmel-samd/boards/openbook_m4/board.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/atmel-samd/boards/openbook_m4/board.c b/ports/atmel-samd/boards/openbook_m4/board.c index 9c71ee5640..f0010f6d78 100644 --- a/ports/atmel-samd/boards/openbook_m4/board.c +++ b/ports/atmel-samd/boards/openbook_m4/board.c @@ -76,13 +76,13 @@ void board_init(void) { sizeof(start_sequence), stop_sequence, sizeof(stop_sequence), - 400, // width - 300, // height - 400, // RAM width - 300, // RAM height + 300, // width + 400, // height + 300, // RAM width + 400, // RAM height 0, // colstart 0, // rowstart - 0, // rotation + 270, // rotation NO_COMMAND, // set_column_window_command NO_COMMAND, // set_row_window_command NO_COMMAND, // set_current_column_command From 8acec2ca356f0d8a74f5497ace5ea69c27a76d03 Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Wed, 29 Jul 2020 13:49:08 -0400 Subject: [PATCH 2/2] add descriptive pin names --- ports/atmel-samd/boards/openbook_m4/pins.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/atmel-samd/boards/openbook_m4/pins.c b/ports/atmel-samd/boards/openbook_m4/pins.c index 3fbb67860b..47de3043d9 100644 --- a/ports/atmel-samd/boards/openbook_m4/pins.c +++ b/ports/atmel-samd/boards/openbook_m4/pins.c @@ -53,6 +53,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_EBSY), MP_ROM_PTR(&pin_PA01) }, // Special named pins + { MP_OBJ_NEW_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PB01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_USB), MP_ROM_PTR(&pin_PB00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MICIN), MP_ROM_PTR(&pin_PB04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MICOUT), MP_ROM_PTR(&pin_PA07) }, { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) }, { MP_OBJ_NEW_QSTR(MP_QSTR_LOCK_BUTTON), MP_ROM_PTR(&pin_PA27) }, { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_LATCH), MP_ROM_PTR(&pin_PB12) },