From 68ac14b3097291ba3c2f0c7edc61f93beebc783d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 4 Mar 2021 09:29:01 -0600 Subject: [PATCH 01/49] StateMachine: Add in_available property I named the property `in_available` because it is similar to pyserial. However, it indicates the number of words in the fifo, not the number of bytes. --- .../bindings/rp2pio/StateMachine.c | 21 ++++++++++++++++++- .../bindings/rp2pio/StateMachine.h | 1 + .../common-hal/rp2pio/StateMachine.c | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.c b/ports/raspberrypi/bindings/rp2pio/StateMachine.c index 444e00ace3..e242889252 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.c +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.c @@ -548,6 +548,24 @@ const mp_obj_property_t rp2pio_statemachine_rxstall_obj = { (mp_obj_t)&mp_const_none_obj}, }; +//| in_waiting: int +//| """The number of words available to readinto""" +//| + +STATIC mp_obj_t rp2pio_statemachine_obj_get_in_waiting(mp_obj_t self_in) { + rp2pio_statemachine_obj_t *self = MP_OBJ_TO_PTR(self_in); + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_rp2pio_statemachine_get_in_waiting(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_get_in_waiting_obj, rp2pio_statemachine_obj_get_in_waiting); + +const mp_obj_property_t rp2pio_statemachine_in_waiting_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&rp2pio_statemachine_get_in_waiting_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj}, +}; + STATIC const mp_rom_map_elem_t rp2pio_statemachine_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&rp2pio_statemachine_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) }, @@ -563,7 +581,8 @@ STATIC const mp_rom_map_elem_t rp2pio_statemachine_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_write_readinto), MP_ROM_PTR(&rp2pio_statemachine_write_readinto_obj) }, { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_PTR(&rp2pio_statemachine_frequency_obj) }, - { MP_ROM_QSTR(MP_QSTR_rxstall), MP_ROM_PTR(&rp2pio_statemachine_rxstall_obj) } + { MP_ROM_QSTR(MP_QSTR_rxstall), MP_ROM_PTR(&rp2pio_statemachine_rxstall_obj) }, + { MP_ROM_QSTR(MP_QSTR_in_waiting), MP_ROM_PTR(&rp2pio_statemachine_in_waiting_obj) }, }; STATIC MP_DEFINE_CONST_DICT(rp2pio_statemachine_locals_dict, rp2pio_statemachine_locals_dict_table); diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.h b/ports/raspberrypi/bindings/rp2pio/StateMachine.h index 36e44f1918..229e37ca70 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.h +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.h @@ -69,5 +69,6 @@ void common_hal_rp2pio_statemachine_set_frequency(rp2pio_statemachine_obj_t* sel bool common_hal_rp2pio_statemachine_get_rxstall(rp2pio_statemachine_obj_t* self); void common_hal_rp2pio_statemachine_clear_rxfifo(rp2pio_statemachine_obj_t *self); +size_t common_hal_rp2pio_statemachine_get_in_waiting(rp2pio_statemachine_obj_t *self); #endif // MICROPY_INCLUDED_RASPBERRYPI_BINDINGS_RP2PIO_STATEMACHINE_H diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index e81d721c61..6a115d9c63 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -728,3 +728,8 @@ void common_hal_rp2pio_statemachine_clear_rxfifo(rp2pio_statemachine_obj_t *self } self->pio->fdebug = stall_mask; } + +size_t common_hal_rp2pio_statemachine_get_in_waiting(rp2pio_statemachine_obj_t *self) { + uint8_t level = pio_sm_get_rx_fifo_level(self->pio, self->state_machine); + return level; +} From ff62b0d2c020cffb910ad15e81897b41e92380fa Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 4 Mar 2021 10:03:31 -0600 Subject: [PATCH 02/49] StateMachine: Add pull up/down for inputs --- .../bindings/rp2pio/StateMachine.c | 9 ++++++- .../bindings/rp2pio/StateMachine.h | 2 +- .../common-hal/audiobusio/I2SOut.c | 1 + .../raspberrypi/common-hal/audiobusio/PDMIn.c | 1 + .../common-hal/neopixel_write/__init__.c | 1 + .../common-hal/rp2pio/StateMachine.c | 24 +++++++++++++++++++ .../common-hal/rp2pio/StateMachine.h | 3 +++ 7 files changed, 39 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.c b/ports/raspberrypi/bindings/rp2pio/StateMachine.c index e242889252..90fd7f95e7 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.c +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.c @@ -69,6 +69,8 @@ //| initial_out_pin_direction: int = 0xffffffff, //| first_in_pin: Optional[microcontroller.Pin] = None, //| in_pin_count: int = 1, +//| pull_in_pin_up: int = 0, +//| pull_in_pin_down: int = 0, //| first_set_pin: Optional[microcontroller.Pin] = None, //| set_pin_count: int = 1, //| initial_set_pin_state: int = 0, @@ -99,6 +101,8 @@ //| :param int initial_out_pin_direction: the initial output direction for out pins starting at first_out_pin //| :param ~microcontroller.Pin first_in_pin: the first pin to use with the IN instruction //| :param int in_pin_count: the count of consecutive pins to use with IN starting at first_in_pin +//| :param int pull_in_pin_up: a 1-bit in this mask sets pull up on the corresponding in pin +//| :param int pull_in_pin_down: a 1-bit in this mask sets pull up on the corresponding in pin. Setting both pulls enables a "bus keep" function, i.e. a weak pull to whatever is current high/low state of GPIO. //| :param ~microcontroller.Pin first_set_pin: the first pin to use with the SET instruction //| :param int set_pin_count: the count of consecutive pins to use with SET starting at first_set_pin //| :param int initial_set_pin_state: the initial output value for set pins starting at first_set_pin @@ -133,6 +137,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n enum { ARG_program, ARG_frequency, ARG_init, ARG_first_out_pin, ARG_out_pin_count, ARG_initial_out_pin_state, ARG_initial_out_pin_direction, ARG_first_in_pin, ARG_in_pin_count, + ARG_pull_in_pin_up, ARG_pull_in_pin_down, ARG_first_set_pin, ARG_set_pin_count, ARG_initial_set_pin_state, ARG_initial_set_pin_direction, ARG_first_sideset_pin, ARG_sideset_pin_count, ARG_initial_sideset_pin_state, ARG_initial_sideset_pin_direction, ARG_exclusive_pin_use, @@ -151,6 +156,8 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n { MP_QSTR_first_in_pin, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, { MP_QSTR_in_pin_count, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} }, + { MP_QSTR_pull_in_pin_up, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, + { MP_QSTR_pull_in_pin_down, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, { MP_QSTR_first_set_pin, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, { MP_QSTR_set_pin_count, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} }, @@ -233,7 +240,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n args[ARG_frequency].u_int, init_bufinfo.buf, init_bufinfo.len / 2, first_out_pin, args[ARG_out_pin_count].u_int, args[ARG_initial_out_pin_state].u_int, args[ARG_initial_out_pin_direction].u_int, - first_in_pin, args[ARG_in_pin_count].u_int, + first_in_pin, args[ARG_in_pin_count].u_int, args[ARG_pull_in_pin_up].u_int, args[ARG_pull_in_pin_down].u_int, first_set_pin, args[ARG_set_pin_count].u_int, args[ARG_initial_set_pin_state].u_int, args[ARG_initial_set_pin_direction].u_int, first_sideset_pin, args[ARG_sideset_pin_count].u_int, args[ARG_initial_sideset_pin_state].u_int, args[ARG_initial_sideset_pin_direction].u_int, args[ARG_exclusive_pin_use].u_bool, diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.h b/ports/raspberrypi/bindings/rp2pio/StateMachine.h index 229e37ca70..d17b4b0b50 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.h +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.h @@ -41,7 +41,7 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, size_t frequency, const uint16_t* init, size_t init_len, const mcu_pin_obj_t * first_out_pin, uint8_t out_pin_count, uint32_t initial_out_pin_state, uint32_t initial_out_pin_direction, - const mcu_pin_obj_t * first_in_pin, uint8_t in_pin_count, + const mcu_pin_obj_t * first_in_pin, uint8_t in_pin_count, uint32_t pull_pin_up, uint32_t pull_pin_down, const mcu_pin_obj_t * first_set_pin, uint8_t set_pin_count, uint32_t initial_set_pin_state, uint32_t initial_set_pin_direction, const mcu_pin_obj_t * first_sideset_pin, uint8_t sideset_pin_count, uint32_t initial_sideset_pin_state, uint32_t initial_sideset_pin_direction, bool exclusive_pin_use, diff --git a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c index 83a443834e..fa5852fce5 100644 --- a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c +++ b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -122,6 +122,7 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t* self, NULL, 0, data, 1, 0, 0xffffffff, // out pin NULL, 0, // in pins + 0, 0, // in pulls NULL, 0, 0, 0x1f, // set pins bit_clock, 2, 0, 0x1f, // sideset pins true, // exclusive pin use diff --git a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c index ffe09326f3..6aee8b4df3 100644 --- a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c +++ b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c @@ -68,6 +68,7 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t* self, NULL, 0, NULL, 1, 0, 0xffffffff, // out pin data_pin, 1, // in pins + 0, 0, // in pulls NULL, 0, 0, 0x1f, // set pins clock_pin, 1, 0, 0x1f, // sideset pins true, // exclusive pin use diff --git a/ports/raspberrypi/common-hal/neopixel_write/__init__.c b/ports/raspberrypi/common-hal/neopixel_write/__init__.c index 1f0b71ca09..b57cb2bdea 100644 --- a/ports/raspberrypi/common-hal/neopixel_write/__init__.c +++ b/ports/raspberrypi/common-hal/neopixel_write/__init__.c @@ -67,6 +67,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t* digitalinout, NULL, 0, // init program NULL, 1, // out NULL, 1, // in + 0, 0, // in pulls NULL, 1, // set digitalinout->pin, 1, // sideset 0, pins_we_use, // initial pin state diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index 6a115d9c63..78eb6e1e5a 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -53,6 +53,17 @@ STATIC uint32_t _current_sm_pins[NUM_PIOS][NUM_PIO_STATE_MACHINES]; STATIC PIO pio_instances[2] = {pio0, pio1}; +static void rp2pio_statemachine_set_pull(uint32_t pull_pin_up, uint32_t pull_pin_down, uint32_t pins_we_use) { + for (int i=0; ipio, state_machine, initial_pin_state, pins_we_use); pio_sm_set_pindirs_with_mask(self->pio, state_machine, initial_pin_direction, pins_we_use); + rp2pio_statemachine_set_pull(pull_pin_up, pull_pin_down, pins_we_use); self->initial_pin_state = initial_pin_state; self->initial_pin_direction = initial_pin_direction; + self->pull_pin_up = pull_pin_up; + self->pull_pin_down = pull_pin_down; for (size_t pin_number = 0; pin_number < TOTAL_GPIO_COUNT; pin_number++) { if ((pins_we_use & (1 << pin_number)) == 0) { @@ -302,6 +317,7 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, const uint16_t* init, size_t init_len, const mcu_pin_obj_t * first_out_pin, uint8_t out_pin_count, uint32_t initial_out_pin_state, uint32_t initial_out_pin_direction, const mcu_pin_obj_t * first_in_pin, uint8_t in_pin_count, + uint32_t pull_pin_up, uint32_t pull_pin_down, const mcu_pin_obj_t * first_set_pin, uint8_t set_pin_count, uint32_t initial_set_pin_state, uint32_t initial_set_pin_direction, const mcu_pin_obj_t * first_sideset_pin, uint8_t sideset_pin_count, uint32_t initial_sideset_pin_state, uint32_t initial_sideset_pin_direction, bool exclusive_pin_use, @@ -444,12 +460,19 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, initial_pin_state = (initial_pin_state & ~sideset_mask) | mask_and_rotate(first_sideset_pin, sideset_pin_count, initial_sideset_pin_state); initial_pin_direction = (initial_pin_direction & ~sideset_mask) | mask_and_rotate(first_sideset_pin, sideset_pin_count, initial_sideset_pin_direction); + // Deal with pull up/downs + uint32_t pull_up = mask_and_rotate(first_in_pin, in_pin_count, pull_pin_up); + uint32_t pull_down = mask_and_rotate(first_in_pin, in_pin_count, pull_pin_down); + if (initial_pin_direction & (pull_up | pull_down)) { + mp_raise_ValueError(translate("pull masks conflict with direction masks")); + } bool ok = rp2pio_statemachine_construct(self, program, program_len, frequency, init, init_len, first_out_pin, out_pin_count, first_in_pin, in_pin_count, + pull_up, pull_down, first_set_pin, set_pin_count, first_sideset_pin, sideset_pin_count, initial_pin_state, initial_pin_direction, @@ -470,6 +493,7 @@ void common_hal_rp2pio_statemachine_restart(rp2pio_statemachine_obj_t *self) { uint32_t pins_we_use = _current_sm_pins[pio_index][self->state_machine]; pio_sm_set_pins_with_mask(self->pio, self->state_machine, self->initial_pin_state, pins_we_use); pio_sm_set_pindirs_with_mask(self->pio, self->state_machine, self->initial_pin_direction, pins_we_use); + rp2pio_statemachine_set_pull(self->pull_pin_up, self->pull_pin_down, pins_we_use); common_hal_rp2pio_statemachine_run(self, self->init, self->init_len); pio_sm_set_enabled(self->pio, self->state_machine, true); } diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.h b/ports/raspberrypi/common-hal/rp2pio/StateMachine.h index f084e09860..1a73a3ac7b 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.h +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.h @@ -40,6 +40,8 @@ typedef struct { size_t init_len; uint32_t initial_pin_state; uint32_t initial_pin_direction; + uint32_t pull_pin_up; + uint32_t pull_pin_down; bool in; bool out; bool wait_for_txstall; @@ -59,6 +61,7 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, const uint16_t* init, size_t init_len, const mcu_pin_obj_t * first_out_pin, uint8_t out_pin_count, const mcu_pin_obj_t * first_in_pin, uint8_t in_pin_count, + uint32_t pull_pin_up, uint32_t pull_pin_down, const mcu_pin_obj_t * first_set_pin, uint8_t set_pin_count, const mcu_pin_obj_t * first_sideset_pin, uint8_t sideset_pin_count, uint32_t initial_pin_state, uint32_t initial_pin_direction, From bd01d31542f1d83797ecb2ac4a4a16ba0235a988 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 4 Mar 2021 11:13:55 -0600 Subject: [PATCH 03/49] rp2pio: Add pins_are_sequential This can be used where the standard API calls for a list of pins, to check that they satisfy the requirements of the rp2pio state machine, e.g., ```python def __init__(self, pin_a, pin_b): if not rp2pio.pins_are_sequential([pin_a, pin_b]): raise ValueError("Pins must be sequential") ``` --- ports/raspberrypi/bindings/rp2pio/__init__.c | 15 +++++++ ports/raspberrypi/bindings/rp2pio/__init__.h | 29 ++++++++++++ .../raspberrypi/common-hal/rp2pio/__init__.c | 44 ++++++++++++++++++- 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 ports/raspberrypi/bindings/rp2pio/__init__.h diff --git a/ports/raspberrypi/bindings/rp2pio/__init__.c b/ports/raspberrypi/bindings/rp2pio/__init__.c index dd5808cd5e..7eab423e9e 100644 --- a/ports/raspberrypi/bindings/rp2pio/__init__.c +++ b/ports/raspberrypi/bindings/rp2pio/__init__.c @@ -28,13 +28,28 @@ #include "py/runtime.h" #include "bindings/rp2pio/StateMachine.h" +#include "bindings/rp2pio/__init__.h" //| """Hardware interface to RP2 series' programmable IO (PIO) peripheral.""" //| +//| def pins_are_sequential(pins: List[microcontroller.Pin]) -> bool: +//| """Return True if the pins have sequential GPIO numbers, False otherwise""" +//| ... +//| +STATIC mp_obj_t rp2pio_pins_are_sequential(const mp_obj_t pins) { + size_t len; + mp_obj_t *items; + mp_obj_get_array(pins, &len, &items); + return mp_obj_new_bool(common_hal_rp2pio_pins_are_sequential(len, items)); +} + +STATIC MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_pins_are_sequential_obj, rp2pio_pins_are_sequential); + STATIC const mp_rom_map_elem_t rp2pio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_rp2pio) }, { MP_ROM_QSTR(MP_QSTR_StateMachine), MP_ROM_PTR(&rp2pio_statemachine_type) }, + { MP_ROM_QSTR(MP_QSTR_pins_are_sequential), MP_ROM_PTR(&rp2pio_pins_are_sequential_obj) }, }; STATIC MP_DEFINE_CONST_DICT(rp2pio_module_globals, rp2pio_module_globals_table); diff --git a/ports/raspberrypi/bindings/rp2pio/__init__.h b/ports/raspberrypi/bindings/rp2pio/__init__.h new file mode 100644 index 0000000000..89dc7ff98f --- /dev/null +++ b/ports/raspberrypi/bindings/rp2pio/__init__.h @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +bool common_hal_rp2pio_pins_are_sequential(size_t len, mp_obj_t *items); diff --git a/ports/raspberrypi/common-hal/rp2pio/__init__.c b/ports/raspberrypi/common-hal/rp2pio/__init__.c index 21699dfa36..5ad52c751c 100644 --- a/ports/raspberrypi/common-hal/rp2pio/__init__.c +++ b/ports/raspberrypi/common-hal/rp2pio/__init__.c @@ -1 +1,43 @@ -// Nothing yet. +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/obj.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "bindings/rp2pio/__init__.h" + +bool common_hal_rp2pio_pins_are_sequential(size_t len, mp_obj_t *items) { + if(len == 0) { + return true; + } + mcu_pin_obj_t *last_pin = validate_obj_is_pin(items[0]); + for(int i=1; inumber != last_pin->number + 1) { + return false; + } + } + return true; +} From c023ec03fff59bae159469645edbe2662da8820f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 4 Mar 2021 12:28:06 -0600 Subject: [PATCH 04/49] PDMIn: Add missing deinit call --- ports/raspberrypi/common-hal/audiobusio/PDMIn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c index 6aee8b4df3..8836602712 100644 --- a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c +++ b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c @@ -93,6 +93,7 @@ void common_hal_audiobusio_pdmin_deinit(audiobusio_pdmin_obj_t* self) { if (common_hal_audiobusio_pdmin_deinited(self)) { return; } + return common_hal_rp2pio_statemachine_deinit(&self->state_machine); } uint8_t common_hal_audiobusio_pdmin_get_bit_depth(audiobusio_pdmin_obj_t* self) { From bc14ed31f659ade034ac78a8ce3e19831e9e7000 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 4 Mar 2021 12:28:46 -0600 Subject: [PATCH 05/49] StateMachine.h: Add header for declaration of mcu_pin_obj_t typedef --- ports/raspberrypi/common-hal/rp2pio/StateMachine.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.h b/ports/raspberrypi/common-hal/rp2pio/StateMachine.h index 1a73a3ac7b..f40db61ea3 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.h +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.h @@ -29,6 +29,7 @@ #include "py/obj.h" +#include "common-hal/microcontroller/Pin.h" #include "src/rp2_common/hardware_pio/include/hardware/pio.h" typedef struct { From c9dea3d72deac11309987654b0751b8cf07cbf57 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 4 Mar 2021 14:23:06 -0600 Subject: [PATCH 06/49] make translate --- locale/circuitpython.pot | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 2e31d5dfc1..afff80687e 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1042,10 +1042,6 @@ msgstr "" msgid "Group already used" msgstr "" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1787,6 +1783,10 @@ msgid "" "constructor" msgstr "" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3743,6 +3743,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" From 2ab13d6d1ee7dfde93c3fe164d09cbd91b7e68f8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 4 Mar 2021 15:52:31 -0600 Subject: [PATCH 07/49] bump xtensa cache timestamp again --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a3f1a8d27..7fa2953b37 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -475,7 +475,7 @@ jobs: id: idf-cache with: path: ${{ github.workspace }}/.idf_tools - key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210303 + key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210304 - name: Clone IDF submodules run: | (cd $IDF_PATH && git submodule update --init) From 2ae1e7de61485bc9167996a63c32bf7b14c4c80c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 5 Mar 2021 09:00:03 -0600 Subject: [PATCH 08/49] WIPrp2040: Implement IncrementalEncoder Any two consecutive pins can be used for an IncrementalEncoder Testing performed: Put a synthesized (few hundred counts per second) quadrature signal into GP2/3 and read the encoder out. Performed filesystem operations at the same time to stress test it. The reasons for not using common_hal_rp2pio_statemachine_readinto are commented on. --- .../bindings/rp2pio/StateMachine.h | 2 + .../common-hal/rotaryio/IncrementalEncoder.c | 170 ++++++++++++++++++ .../common-hal/rotaryio/IncrementalEncoder.h | 40 +++++ .../common-hal/rotaryio/__init__.c | 1 + .../common-hal/rotaryio/__init__.h | 0 .../common-hal/rp2pio/StateMachine.c | 42 +++++ ports/raspberrypi/mpconfigport.mk | 3 +- 7 files changed, 257 insertions(+), 1 deletion(-) create mode 100644 ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c create mode 100644 ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h create mode 100644 ports/raspberrypi/common-hal/rotaryio/__init__.c create mode 100644 ports/raspberrypi/common-hal/rotaryio/__init__.h diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.h b/ports/raspberrypi/bindings/rp2pio/StateMachine.h index d17b4b0b50..3a0d4290d5 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.h +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.h @@ -71,4 +71,6 @@ bool common_hal_rp2pio_statemachine_get_rxstall(rp2pio_statemachine_obj_t* self) void common_hal_rp2pio_statemachine_clear_rxfifo(rp2pio_statemachine_obj_t *self); size_t common_hal_rp2pio_statemachine_get_in_waiting(rp2pio_statemachine_obj_t *self); +void common_hal_rp2pio_statemachine_set_interrupt_handler(rp2pio_statemachine_obj_t *self, void(*handler)(void*), void *arg, int mask); + #endif // MICROPY_INCLUDED_RASPBERRYPI_BINDINGS_RP2PIO_STATEMACHINE_H diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c new file mode 100644 index 0000000000..b2225991d6 --- /dev/null +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -0,0 +1,170 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/runtime.h" + +#include +#include "common-hal/rotaryio/IncrementalEncoder.h" +#include "bindings/rp2pio/__init__.h" +#include "bindings/rp2pio/StateMachine.h" + +STATIC const uint16_t encoder[] = { + // again: + // in pins, 2 + 0x4002, + // mov x, isr + 0xa026, + // jmp x!=y, push_data + 0x00a5, + // mov isr, null + 0xa0c3, + // jmp again + 0x0000, + // push_data: + // push + 0x8020, + // mov y, x + 0xa041, +}; + +STATIC const uint16_t encoder_init[] = { + // set y, 31 + 0xe05f, +}; + +STATIC void incrementalencoder_interrupt_handler(void *self_in); + +void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencoder_obj_t* self, + const mcu_pin_obj_t* pin_a, const mcu_pin_obj_t* pin_b) { + mp_obj_t pins[] = {MP_OBJ_FROM_PTR(pin_a), MP_OBJ_FROM_PTR(pin_b)}; + if (!common_hal_rp2pio_pins_are_sequential(2, pins)) { + mp_raise_RuntimeError(translate("Pins must be sequential")); + } + + self->position = 0; + self->quarter_count = 0; + + common_hal_rp2pio_statemachine_construct(&self->state_machine, + encoder, MP_ARRAY_SIZE(encoder), + 1000000, + encoder_init, MP_ARRAY_SIZE(encoder_init), // init + NULL, 1, 0, 0xffffffff, // out pin + pin_a, 2, // in pins + 3, 0, // in pulls + NULL, 0, 0, 0x1f, // set pins + NULL, 0, 0, 0x1f, // sideset pins + true, // exclusive pin use + false, 32, false, // out settings + false, // Wait for txstall + false, 32, false); // in settings + + common_hal_rp2pio_statemachine_run(&self->state_machine, encoder_init, MP_ARRAY_SIZE(encoder_init)); + + // We're guaranteed by the init code that some output will be available promptly + uint8_t state; + common_hal_rp2pio_statemachine_readinto(&self->state_machine, &state, 1, 1); + // Top two bits of self->last_state don't matter, because they'll be gone as soon as + // interrupt handler is called. + self->last_state = state & 3; + + common_hal_rp2pio_statemachine_set_interrupt_handler(&self->state_machine, incrementalencoder_interrupt_handler, self, PIO_IRQ0_INTF_SM0_RXNEMPTY_BITS); +} + +bool common_hal_rotaryio_incrementalencoder_deinited(rotaryio_incrementalencoder_obj_t* self) { + return common_hal_rp2pio_statemachine_deinited(&self->state_machine); +} + +void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_obj_t* self) { + if (common_hal_rotaryio_incrementalencoder_deinited(self)) { + return; + } + common_hal_rp2pio_statemachine_deinit(&self->state_machine); +} + +mp_int_t common_hal_rotaryio_incrementalencoder_get_position(rotaryio_incrementalencoder_obj_t* self) { + return self->position; +} + +void common_hal_rotaryio_incrementalencoder_set_position(rotaryio_incrementalencoder_obj_t* self, + mp_int_t new_position) { + self->position = new_position; +} + +STATIC void incrementalencoder_interrupt_handler(void *self_in) { + rotaryio_incrementalencoder_obj_t* self = self_in; + // This table also works for detent both at 11 and 00 + // For 11 at detent: + // Turning cw: 11->01->00->10->11 + // Turning ccw: 11->10->00->01->11 + // For 00 at detent: + // Turning cw: 00->10->11->10->00 + // Turning ccw: 00->01->11->10->00 + + // index table by state + #define BAD 7 + static const int8_t transitions[16] = { + 0, // 00 -> 00 no movement + -1, // 00 -> 01 3/4 ccw (11 detent) or 1/4 ccw (00 at detent) + +1, // 00 -> 10 3/4 cw or 1/4 cw + BAD, // 00 -> 11 non-Gray-code transition + +1, // 01 -> 00 2/4 or 4/4 cw + 0, // 01 -> 01 no movement + BAD, // 01 -> 10 non-Gray-code transition + -1, // 01 -> 11 4/4 or 2/4 ccw + -1, // 10 -> 00 2/4 or 4/4 ccw + BAD, // 10 -> 01 non-Gray-code transition + 0, // 10 -> 10 no movement + +1, // 10 -> 11 4/4 or 2/4 cw + BAD, // 11 -> 00 non-Gray-code transition + +1, // 11 -> 01 1/4 or 3/4 cw + -1, // 11 -> 10 1/4 or 3/4 ccw + 0, // 11 -> 11 no movement + }; + + while (common_hal_rp2pio_statemachine_get_in_waiting(&self->state_machine)) { + // Bypass all the logic of StateMachine.c:_transfer, we need something + // very simple and fast for an interrupt! + uint8_t new = self->state_machine.pio->rxf[self->state_machine.state_machine]; + + // Shift the old AB bits to the "old" position, and set the new AB bits. + self->last_state = (self->last_state & 0x3) << 2 | (new & 0x3); + + int8_t quarter_incr = transitions[self->last_state]; + if (quarter_incr == BAD) { + // Missed a transition. We don't know which way we're going, so do nothing. + return; + } + + self->quarter_count += quarter_incr; + if (self->quarter_count >= 4) { + self->position += 1; + self->quarter_count = 0; + } else if (self->quarter_count <= -4) { + self->position -= 1; + self->quarter_count = 0; + } + } +} diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h new file mode 100644 index 0000000000..ff5c874c83 --- /dev/null +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.h @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "common-hal/rp2pio/StateMachine.h" +#include "common-hal/microcontroller/Pin.h" + +#include "py/obj.h" + +typedef struct { + mp_obj_base_t base; + rp2pio_statemachine_obj_t state_machine; + uint8_t last_state:4; // + int8_t quarter_count:4; // count intermediate transitions between detents + mp_int_t position; +} rotaryio_incrementalencoder_obj_t; diff --git a/ports/raspberrypi/common-hal/rotaryio/__init__.c b/ports/raspberrypi/common-hal/rotaryio/__init__.c new file mode 100644 index 0000000000..0aae79c26a --- /dev/null +++ b/ports/raspberrypi/common-hal/rotaryio/__init__.c @@ -0,0 +1 @@ +// No rotaryio module functions. diff --git a/ports/raspberrypi/common-hal/rotaryio/__init__.h b/ports/raspberrypi/common-hal/rotaryio/__init__.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index 78eb6e1e5a..672cd4d3cf 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -27,6 +27,7 @@ #include "bindings/rp2pio/StateMachine.h" #include "common-hal/microcontroller/__init__.h" +#include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/Pin.h" #include "src/rp2040/hardware_regs/include/hardware/platform_defs.h" @@ -52,6 +53,11 @@ STATIC uint32_t _current_pins[NUM_PIOS]; STATIC uint32_t _current_sm_pins[NUM_PIOS][NUM_PIO_STATE_MACHINES]; STATIC PIO pio_instances[2] = {pio0, pio1}; +typedef void (*interrupt_handler_type)(void*); +STATIC interrupt_handler_type _interrupt_handler[NUM_PIOS][NUM_PIO_STATE_MACHINES]; +STATIC void *_interrupt_arg[NUM_PIOS][NUM_PIO_STATE_MACHINES]; + +STATIC void rp2pio_statemachine_interrupt_handler(void); static void rp2pio_statemachine_set_pull(uint32_t pull_pin_up, uint32_t pull_pin_down, uint32_t pins_we_use) { for (int i=0; iinte0 &= ~((PIO_IRQ0_INTF_SM0_RXNEMPTY_BITS | PIO_IRQ0_INTF_SM0_TXNFULL_BITS | PIO_IRQ0_INTF_SM0_BITS) << sm); pio_sm_unclaim(pio, sm); } @@ -535,6 +542,10 @@ void common_hal_rp2pio_statemachine_set_frequency(rp2pio_statemachine_obj_t* sel void rp2pio_statemachine_deinit(rp2pio_statemachine_obj_t *self, bool leave_pins) { uint8_t sm = self->state_machine; uint8_t pio_index = pio_get_index(self->pio); + common_hal_mcu_disable_interrupts(); + _interrupt_arg[pio_index][sm] = NULL; + _interrupt_handler[pio_index][sm] = NULL; + common_hal_mcu_enable_interrupts(); _never_reset[pio_index][sm] = false; _reset_statemachine(self->pio, sm, leave_pins); self->state_machine = NUM_PIO_STATE_MACHINES; @@ -757,3 +768,34 @@ size_t common_hal_rp2pio_statemachine_get_in_waiting(rp2pio_statemachine_obj_t * uint8_t level = pio_sm_get_rx_fifo_level(self->pio, self->state_machine); return level; } + +void common_hal_rp2pio_statemachine_set_interrupt_handler(rp2pio_statemachine_obj_t *self, void(*handler)(void*), void *arg, int mask) { + uint8_t pio_index = pio_get_index(self->pio); + uint8_t sm = self->state_machine; + + common_hal_mcu_disable_interrupts(); + uint32_t inte = self->pio->inte0; + inte &= ~((PIO_IRQ0_INTF_SM0_RXNEMPTY_BITS | PIO_IRQ0_INTF_SM0_TXNFULL_BITS | PIO_IRQ0_INTF_SM0_BITS) << sm); + inte |= (mask << sm); + self->pio->inte0 = inte; + _interrupt_arg[pio_index][sm] = arg; + _interrupt_handler[pio_index][sm] = handler; + irq_set_exclusive_handler(PIO0_IRQ_0 + 2 * pio_index, rp2pio_statemachine_interrupt_handler); + irq_set_enabled(PIO0_IRQ_0 + 2 * pio_index, true); + common_hal_mcu_enable_interrupts(); +} + +STATIC void rp2pio_statemachine_interrupt_handler(void) { + for (size_t pio_index = 0; pio_index < NUM_PIOS; pio_index++) { + PIO pio = pio_instances[pio_index]; + for (size_t sm = 0; sm < NUM_PIO_STATE_MACHINES; sm++) { + if (!_interrupt_handler[pio_index][sm]) { + continue; + } + uint32_t intf = (PIO_IRQ0_INTF_SM0_RXNEMPTY_BITS | PIO_IRQ0_INTF_SM0_TXNFULL_BITS | PIO_IRQ0_INTF_SM0_BITS) << sm; + if (pio->ints0 & intf) { + _interrupt_handler[pio_index][sm](_interrupt_arg[pio_index][sm]); + } + } + } +} diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index 4c149cb2b8..00aae80a0b 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -28,13 +28,14 @@ CIRCUITPY_FULL_BUILD = 1 CIRCUITPY_BITOPS = 1 CIRCUITPY_PWMIO = 1 CIRCUITPY_RGBMATRIX = 1 +CIRCUITPY_ROTARYIO = 1 # Things that need to be implemented. +# (Remember to remove any comment when changing a 0 to a 1, make gets confused otherwise) CIRCUITPY_FREQUENCYIO = 0 # Use PWM interally CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NVM = 1 CIRCUITPY_PULSEIO = 0 # Use PIO interally -CIRCUITPY_ROTARYIO = 0 # Use PIO interally CIRCUITPY_WATCHDOG = 1 # Audio via PWM From cd1f19020fefd024c4aeef6a26ea61a11c26ab27 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 5 Mar 2021 12:59:55 -0600 Subject: [PATCH 09/49] raspberrypi: move landmine Makefile comments --- ports/raspberrypi/mpconfigport.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index 00aae80a0b..03de6ce5ee 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -31,11 +31,12 @@ CIRCUITPY_RGBMATRIX = 1 CIRCUITPY_ROTARYIO = 1 # Things that need to be implemented. -# (Remember to remove any comment when changing a 0 to a 1, make gets confused otherwise) -CIRCUITPY_FREQUENCYIO = 0 # Use PWM interally +# Use PWM interally +CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NVM = 1 -CIRCUITPY_PULSEIO = 0 # Use PIO interally +# Use PIO interally +CIRCUITPY_PULSEIO = 0 CIRCUITPY_WATCHDOG = 1 # Audio via PWM From 6cf9c5158c128994bad81a161ade142a1d28f368 Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Sat, 6 Mar 2021 17:15:54 -0300 Subject: [PATCH 10/49] adding port for Franzininho WIFI board --- .github/workflows/build.yml | 1 + .../boards/franzininho_wifi_wroom/board.c | 52 +++++++++++++++++++ .../franzininho_wifi_wroom/mpconfigboard.h | 38 ++++++++++++++ .../franzininho_wifi_wroom/mpconfigboard.mk | 17 ++++++ .../boards/franzininho_wifi_wroom/pins.c | 48 +++++++++++++++++ .../boards/franzininho_wifi_wroom/sdkconfig | 0 6 files changed, 156 insertions(+) create mode 100644 ports/esp32s2/boards/franzininho_wifi_wroom/board.c create mode 100644 ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h create mode 100644 ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/franzininho_wifi_wroom/pins.c create mode 100644 ports/esp32s2/boards/franzininho_wifi_wroom/sdkconfig diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32e3bc900c..04d49ce51b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -234,6 +234,7 @@ jobs: - "feather_radiofruit_zigbee" - "feather_stm32f405_express" - "fluff_m0" + - "franzininho_wifi_wroom" - "gemma_m0" - "grandcentral_m4_express" - "hallowing_m0_express" diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/board.c b/ports/esp32s2/boards/franzininho_wifi_wroom/board.c new file mode 100644 index 0000000000..aaef97c7d1 --- /dev/null +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/board.c @@ -0,0 +1,52 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART +#ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); +#endif /* DEBUG */ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h new file mode 100644 index 0000000000..0960e96b60 --- /dev/null +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +//Micropython setup + +#define MICROPY_HW_BOARD_NAME "Franzininho WIFI w/Wroom" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk new file mode 100644 index 0000000000..2642cebca9 --- /dev/null +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x239A +USB_PID = 0x80AA +USB_PRODUCT = "Franzininho WIFI" +USB_MANUFACTURER = "Espressif" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wroom diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c b/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c new file mode 100644 index 0000000000..0562d9331f --- /dev/null +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/sdkconfig b/ports/esp32s2/boards/franzininho_wifi_wroom/sdkconfig new file mode 100644 index 0000000000..e69de29bb2 From 48e727f7d6b10b84cbd2782d101504756d52af80 Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Sat, 6 Mar 2021 17:47:27 -0300 Subject: [PATCH 11/49] adding port for Franzininho WIFI board ESP32S2 w/Wrover --- .github/workflows/build.yml | 1 + .../boards/franzininho_wifi_wrover/board.c | 52 +++++++++++++++++++ .../franzininho_wifi_wrover/mpconfigboard.h | 38 ++++++++++++++ .../franzininho_wifi_wrover/mpconfigboard.mk | 17 ++++++ .../boards/franzininho_wifi_wrover/pins.c | 48 +++++++++++++++++ .../boards/franzininho_wifi_wrover/sdkconfig | 33 ++++++++++++ 6 files changed, 189 insertions(+) create mode 100644 ports/esp32s2/boards/franzininho_wifi_wrover/board.c create mode 100644 ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h create mode 100644 ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/franzininho_wifi_wrover/pins.c create mode 100644 ports/esp32s2/boards/franzininho_wifi_wrover/sdkconfig diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04d49ce51b..45b59f0de6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -235,6 +235,7 @@ jobs: - "feather_stm32f405_express" - "fluff_m0" - "franzininho_wifi_wroom" + - "franzininho_wifi_wrover" - "gemma_m0" - "grandcentral_m4_express" - "hallowing_m0_express" diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/board.c b/ports/esp32s2/boards/franzininho_wifi_wrover/board.c new file mode 100644 index 0000000000..aaef97c7d1 --- /dev/null +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/board.c @@ -0,0 +1,52 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART +#ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); +#endif /* DEBUG */ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h b/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h new file mode 100644 index 0000000000..fd10ee0b58 --- /dev/null +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +//Micropython setup + +#define MICROPY_HW_BOARD_NAME "Franzininho WIFI w/Wrover" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk b/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk new file mode 100644 index 0000000000..60a3ea6f08 --- /dev/null +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x239A +USB_PID = 0x80AA +USB_PRODUCT = "Franzininho WIFI Wrover" +USB_MANUFACTURER = "Espressif" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c b/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c new file mode 100644 index 0000000000..0562d9331f --- /dev/null +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/sdkconfig b/ports/esp32s2/boards/franzininho_wifi_wrover/sdkconfig new file mode 100644 index 0000000000..9d8bbde967 --- /dev/null +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/sdkconfig @@ -0,0 +1,33 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config From 67e598a863bd52f8a13f8e035c09dea23d63b8f5 Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Sat, 6 Mar 2021 18:26:13 -0300 Subject: [PATCH 12/49] Fix build.yml wifi Franzininho WIFI wroom Board --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04d49ce51b..4608073a3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -234,7 +234,6 @@ jobs: - "feather_radiofruit_zigbee" - "feather_stm32f405_express" - "fluff_m0" - - "franzininho_wifi_wroom" - "gemma_m0" - "grandcentral_m4_express" - "hallowing_m0_express" @@ -451,6 +450,7 @@ jobs: - "espressif_kaluga_1" - "espressif_saola_1_wroom" - "espressif_saola_1_wrover" + - "franzininho_wifi_wroom" - "lilygo_ttgo_t8_s2_st7789" - "microdev_micro_s2" - "muselab_nanoesp32_s2" From e68ab5ae2a2e6ab88b349b0c05ce28454a474e73 Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Sat, 6 Mar 2021 18:33:24 -0300 Subject: [PATCH 13/49] Fix build.yml wifi Franzininho WIFI wrover Board --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45b59f0de6..8b6d3c28cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -233,9 +233,7 @@ jobs: - "feather_nrf52840_express" - "feather_radiofruit_zigbee" - "feather_stm32f405_express" - - "fluff_m0" - - "franzininho_wifi_wroom" - - "franzininho_wifi_wrover" + - "fluff_m0" - "gemma_m0" - "grandcentral_m4_express" - "hallowing_m0_express" @@ -452,6 +450,7 @@ jobs: - "espressif_kaluga_1" - "espressif_saola_1_wroom" - "espressif_saola_1_wrover" + - "franzininho_wifi_wrover" - "lilygo_ttgo_t8_s2_st7789" - "microdev_micro_s2" - "muselab_nanoesp32_s2" From 4a50f1dd6f10f3f12bbc9079cd9c2f8edbb80a0c Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Sat, 6 Mar 2021 18:36:53 -0300 Subject: [PATCH 14/49] Update Vendor ID for Espressif --- ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk b/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk index 60a3ea6f08..dedd1519d1 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk @@ -1,4 +1,4 @@ -USB_VID = 0x239A +USB_VID = 0x303A USB_PID = 0x80AA USB_PRODUCT = "Franzininho WIFI Wrover" USB_MANUFACTURER = "Espressif" From 17aa9ae3f64325701f7bc2c547988d17229aebf8 Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Sat, 6 Mar 2021 18:43:34 -0300 Subject: [PATCH 15/49] Update vendor ID for Espressif ESP32S2 Modules --- ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk index 2642cebca9..fc6c62257a 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk @@ -1,6 +1,6 @@ -USB_VID = 0x239A +USB_VID = 0x303A USB_PID = 0x80AA -USB_PRODUCT = "Franzininho WIFI" +USB_PRODUCT = "Franzininho WIFI w/Wroom" USB_MANUFACTURER = "Espressif" INTERNAL_FLASH_FILESYSTEM = 1 From 3b76299f396d548dfe1eeacefc9a284edbc24e42 Mon Sep 17 00:00:00 2001 From: nitz Date: Sun, 7 Mar 2021 01:06:50 -0500 Subject: [PATCH 16/49] Add new nRF port for SF MicroMod nRF52840. --- .../sparkfun_nrf52840_micromod/README.md | 70 +++++++++++ .../boards/sparkfun_nrf52840_micromod/board.c | 38 ++++++ .../mpconfigboard.h | 60 ++++++++++ .../mpconfigboard.mk | 11 ++ .../boards/sparkfun_nrf52840_micromod/pins.c | 112 ++++++++++++++++++ 5 files changed, 291 insertions(+) create mode 100644 ports/nrf/boards/sparkfun_nrf52840_micromod/README.md create mode 100644 ports/nrf/boards/sparkfun_nrf52840_micromod/board.c create mode 100644 ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h create mode 100644 ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk create mode 100644 ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md b/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md new file mode 100644 index 0000000000..094102c277 --- /dev/null +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md @@ -0,0 +1,70 @@ +# SparkFun MicroMod nRF52840 Processor + +Featuring the nRF52840 SoC from Nordic Semiconductor, the [SparkFun MicroMod nRF52840 Processor](https://www.sparkfun.com/products/16984) offers a powerful combination of ARM Cortex-M4 CPU and 2.4 GHz Bluetooth transceiver in the MicroMod form-factor with the M.2 MicroMod connector to allow you to plug in a compatible MicroMod Carrier Board with any number of peripherals. + +The MicroMod nRF52840 Processor features the same Raytac MDBT50Q-P1M found on our [Pro nRF52840 Mini](https://www.sparkfun.com/products/15025). This module includes an integrated trace antenna, fits the IC to an FCC-approved footprint along with including decoupling and timing mechanisms that would need to be designed into a circuit using the bare nRF52840 IC. The Bluetooth transceiver included on the nRF52840 boasts a BT 5.1 stack and supports Bluetooth 5, Bluetooth mesh, IEEE 802.15.4 (Zigbee & Thread) and 2.4Ghz RF wireless protocols (including Nordic's proprietary RF protocol) allowing you to pick which option works best for your application. + +We've also routed two I2C buses, 2 SPI buses, eleven GPIO, dedicated digital, analog, PWM & PDM pins along with multiple serial UARTS to cover nearly all of your peripheral needs. + +## CircuitPython Pin Defs + +CircuitPython pin definitions, while simialr to other boards represent a slight departure from just the typical `A` and `D` pin definitions. The majority of general pins are labled as `G` (or alternatively, `BUS`,) as the MicroMod system they build on uses those names to specify pins that may not be specficially analog or digital. + +This can be somewhat confusing, especially around the analog pins. Here's a quick pin-map. This pin map will use the label either on the [SparkFun MicroMod ATP Carrier Board](https://www.sparkfun.com/products/16885), or the pin name on the [graphical datasheet](https://cdn.sparkfun.com/assets/learn_tutorials/1/4/0/1/MicroMod_nRF52840_v1.0_Graphical_Datasheet.pdf). Some of the aditional aliases are just names to make naming consistent (e.g.: RTS/CTS), but they also can refer to additional functionality a pin may have (e.g.: NFC pins) + +MicroMod Pin # | ATP Pin Label | Pin Definition | Additional Definitons | Pin/Port Reference | Notes +:--------------|:--------------|:--------------|:-----------------------|:-------------------|:------ +8 | G11 | | | (Not Connected) | +10 | D0 | D0 | | P0_27 | +11 | BOOT | BOOT | BUTTON1 | P0_07 | +12 | SDA | SDA | | P0_08 | +13 | RTS1 | RTS | RTS1 | P1_02 | +14 | SCL | SCL | | P0_11 | +15 | CTS1 | CTS | CTS1 | P1_09 | +16 | /I2C INT | I2C_INT | P0_15 | +17 | TX | TX | TX1 | P1_03 | +18 | D1 | D1 | CAM_TRIG | P1_08 | +19 | RX | RX | RX1 | P1_10 | +20 | RX2 | RX2 | | P1_05 | +22 | TX2 | TX2 | | P1_07 | +32 | PWM0 | PWM0 | P0_06 | +34 | A0 | A0 | ADC0 | P0_04 | Attached to AIN2 +38 | A1 | A1 | ADC1 | P0_05 | Attached to AIN3 +40 | G0 | G0 | BUS0 | P0_29 | Attached to AIN5 +42 | G1 | G1 | BUS1 | P0_03 | Attached to AIN1 +44 | G2 | G2 | BUS2 | P1_13 | +46 | G3 | G3 | BUS3 | P1_12 | +47 | PWM1 | PWM1 | P0_16 | +48 | G4 | G4 | BUS4 | P1_11 | +49 | BATT_VIN | BATT_VIN3 | | P0_30 | Attached to AIN6, will be battery voltage / 3. | +50 | PDM_CLK | PDM_CLK | | P0_25 | +51 | SDA1 | SDA1 | | P1_01 | +52 | PDM_DATA | PDM_DATA | | P0_26 | +53 | SCL1 | SCL1 | | P0_24 | +55 | /CS | CS | | P0_20 | +57 | SCK | SCK | | P0_28 | Attached to AIN4 +59 | COPI | COPI | MOSI | P0_31 | Attached to AIN7 +61 | CIPO | CIPO | MISO | P0_02 | +63 | G10 | G10 | NFC2, ADC_DP, CAM_VSYNC | P0_10 | Attached to NFC2 +65 | G9 | G9 | NFC1, ADC_DM, CAM_HSYNC | P0_09 | Attached to NFC1 +67 | G8 | G8 | | P1_14 | +69 | G7 | G7 | BUS7 | P1_04 | +71 | G6 | G6 | BUS6 | P1_06 | +73 | G5 | G5 | BUS5 | P0_15 | + +## Peripheral Naming + +CircuitPython attempts to stay in line with the naming of the serial peripheral naming in the MicroMod system. The bare UART pins are also named 1. The UART 2 pins are named 2. However, the I2C names on MicroMod are and 1. Perhaps this will change in the future, but as of [Interface v1](https://cdn.sparkfun.com/assets/learn_tutorials/1/2/0/6/SparkFun_MicroMod_Interface_v1.0_-_Pin_Descriptions.pdf), it may lead to some confusion. + + +## Bootloader Notes + +The MicroMod nRF52840 Processor needs to have the [Adafruit nRF52 UF2 bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader/pull/194) flashed on it. [[TODO: LINK TO BUILD]] + +## Hardware Reference + +The MicroMod nRF52840 Processor hardware layout is open source: + +* [Schematic](https://cdn.sparkfun.com/assets/f/0/9/9/e/MicroMod_Processor_Board-nRF52840.pdf) +* [Eagle Files](https://cdn.sparkfun.com/assets/3/0/5/d/a/MicroMod_Processor_Board-nRF52840.zip) +* [Hookup Guide](https://learn.sparkfun.com/tutorials/micromod-nrf52840-processor-hookup-guide) diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/board.c b/ports/nrf/boards/sparkfun_nrf52840_micromod/board.c new file mode 100644 index 0000000000..7817933281 --- /dev/null +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h new file mode 100644 index 0000000000..91997710a2 --- /dev/null +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h @@ -0,0 +1,60 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Glenn Ruben Bakke + * Copyright (c) 2021 Chris Marc Dailey + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "SparkFun MicroMod nRF52840" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define DEFAULT_I2C_BUS_SCL (&pin_P0_11) +#define DEFAULT_I2C_BUS_SDA (&pin_P0_08) + +#define DEFAULT_SPI_BUS_SCK (&pin_P0_28) +#define DEFAULT_SPI_BUS_MOSI (&pin_P0_31) +#define DEFAULT_SPI_BUS_MISO (&pin_P0_02) + +#define DEFAULT_UART_BUS_RX (&pin_P1_10) +#define DEFAULT_UART_BUS_TX (&pin_P1_03) + +#define BOARD_HAS_32KHZ_XTAL (1) +#define BOARD_HAS_CRYSTAL (1) + +#if QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 14) // Labeled 'SPI_COPI1/SDIO_CMD' in schematic. +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21) // Labeled 'SPI_CIPO1/SDIO_DATA0' in schematic. +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 23) // Labeled 'SPI_DATA2' in schematic. +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(1, 0) // Labeled 'SPI_CS1/SDIO_DATA3' in schematic. +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 19) // Labeled 'SPI_SCK1/SDIO_CLK' in schematic. +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 12) // Labeled 'FLASH_CS' in schematic. +#endif // QSPI_FLASH_FILESYSTEM + +#if SPI_FLASH_FILESYSTEM +#define SPI_FLASH_MOSI_PIN (&pin_P0_14) +#define SPI_FLASH_MISO_PIN (&pin_P0_21) +#define SPI_FLASH_SCK_PIN (&pin_P0_19) +#define SPI_FLASH_CS_PIN (&pin_P0_12) +#endif // SPI_FLASH_FILESYSTEM diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk new file mode 100644 index 0000000000..e6070a0563 --- /dev/null +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1B4F +USB_PID = 0xabcd +$(warning SparkFun nRF52840 MicroMod needss USB PID!) +USB_PRODUCT = "SFE_nRF52840_MicroMod" +USB_MANUFACTURER = "SparkFun Electronics" + +MCU_CHIP = nrf52840 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "W25Q128JV_PM" diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c new file mode 100644 index 0000000000..a8adeacf7a --- /dev/null +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c @@ -0,0 +1,112 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + // D pins (D0-D1) + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_27) }, // 0.27 - D0 + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P1_08) }, // 1.08 - D1 | CAM_TRIG + { MP_ROM_QSTR(MP_QSTR_CAM_TRIG), MP_ROM_PTR(&pin_P1_08) }, // CAM_TRIG alias + + // A pins (A0-A1) + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, // 0.04 - A0 | ADC0 (AIN2) + { MP_ROM_QSTR(MP_QSTR_ADC0), MP_ROM_PTR(&pin_P0_04) }, // ADC0 alias + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, // 0.05 - A1 | ADC1 (AIN3) + { MP_ROM_QSTR(MP_QSTR_ADC1), MP_ROM_PTR(&pin_P0_05) }, // ADC1 alias + + // G pins (G0-G11, G11 NC) + { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_P0_29) }, // 0.29 - G0 | GPIO0 | BUS0 (AIN5) + { MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_P0_29) }, // BUS0 alias + { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_P0_03) }, // 0.03 - G1 | GPIO1 | BUS1 (AIN1) + { MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_P0_03) }, // BUS1 alias + { MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_P1_13) }, // 1.13 - G2 | GPIO2 | BUS2 + { MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_P1_13) }, // BUS2 alias + { MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_P1_12) }, // 1.12 - G3 | GPIO3 | BUS3 + { MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_P1_12) }, // BUS3 alias + { MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_P1_11) }, // 1.11 - G4 | GPIO4 | BUS4 + { MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_P1_11) }, // BUS4 alias + { MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_P0_17) }, // 0.17 - G5 | GPIO5 | BUS5 + { MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_P0_17) }, // BUS5 alias + { MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_P1_06) }, // 1.06 - G6 | GPIO6 | BUS6 + { MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_P1_06) }, // BUS6 alias + { MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_P1_04) }, // 1.04 - G7 | GPIO7 | BUS7 + { MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR(&pin_P1_04) }, // BUS7 alias + { MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR(&pin_P1_14) }, // 1.14 - G8 | GPIO8 + { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_P0_09) }, // 0.09 - G9 | GPIO9/NFC1 | ADC_D- | CAM_HSYNC (NFC1) + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, // NFC1 alias + { MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR(&pin_P0_09) }, // ADC_DM alias + { MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR(&pin_P0_09) }, // CAM_HSYNC alias + { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_P0_10) }, // 0.10 - G10 | GPIO10/NFC2 | ADC_D+ | CAM_VSYNC (NFC2) + { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, // NFC2 alias + { MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR(&pin_P0_10) }, // ADC_DP alias + { MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_P0_10) }, // CAM_VSYNC alias + // NC - G11 + + // PWM pins (PWM0-PWM1) + { MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_P0_06) }, // 0.06 - PWM0 + { MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_P0_16) }, // 0.16 - PWM1 + + // PDM + { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P0_25) }, // 0.25 - PDM_CLK | AUD_BCLK + { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_26) }, // 0.26 - PDM_DATA | AUD_LRCLK + + // Battery Voltage Monitor + { MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_P0_30) }, // 0.30 - BATT_VIN/3 (AIN6) + + // I2C + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_08) }, // 0.08 - SDA + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11) }, // 0.11 - SCL (TRACEDATA2) + + { MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_P0_15) }, // 0.15 - I2C_INT + + { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_P1_01) }, // 1.01 - SDA1 + { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_P0_24) }, // 0.24 - SCL1 + + // SPI + { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_P0_02) }, // 0.02 - CIPO | SPI_CIPO + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_02) }, // MISO alias + { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_P0_31) }, // 0.31 - COPI | SPI_COPI (AIN7) + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_31) }, // MOSI alias + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_28) }, // 0.28 - SCK | SPI_SCK (AIN4) + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_P0_20) }, // 0.20 - /CS | SPI_/CS + + // Flash SPI + { MP_ROM_QSTR(MP_QSTR_IOSCK), MP_ROM_PTR(&pin_P0_19) }, // 0.00 - IOSCK | Flash Serial Clock + { MP_ROM_QSTR(MP_QSTR_IOCSN), MP_ROM_PTR(&pin_P0_12) }, // 0.00 - IOCSN | Flash /Chip Select + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_P0_14) }, // 0.00 - IO0 | Flash Data 0 + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_P0_21) }, // 0.00 - IO1 | Flash Data 1 + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_P0_23) }, // 0.00 - IO2 | Flash Data 2 + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_P1_00) }, // 0.00 - IO3 | Flash Data 3 + + // Reset Pin + { MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&pin_P1_14) }, // 0.18 - /RESET (NRESET) + + // LED + { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_13) }, // 0.13 - LED_BUILTIN | STAT | Blue LED + + // Button + { MP_ROM_QSTR(MP_QSTR_BUTTON1), MP_ROM_PTR(&pin_P0_07) }, // 0.07 - /BOOT [Active Low] (TRACECLK) - Is button on carriers. + { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_P0_07) }, // BOOT alias + + // UART + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P1_10) }, // 1.10 - UART RX | RX1 + { MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_P1_10) }, // RX1 alias + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P1_03) }, // 1.03 - UART TX | TX1 + { MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_P1_03) }, // TX1 alias + { MP_ROM_QSTR(MP_QSTR_CTS), MP_ROM_PTR(&pin_P1_09) }, // 1.09 - UART CTS | CTS1 (TRACEDATA3) + { MP_ROM_QSTR(MP_QSTR_CTS1), MP_ROM_PTR(&pin_P1_09) }, // CTS1 alias + { MP_ROM_QSTR(MP_QSTR_RTS), MP_ROM_PTR(&pin_P1_02) }, // 1.02 - UART RTS | RTS1 + { MP_ROM_QSTR(MP_QSTR_RTS1), MP_ROM_PTR(&pin_P1_02) }, // RTS1 alias + + { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_P1_05) }, // 1.05 - UART RX | RX2 + { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_P1_07) }, // 1.07 - UART TX | TX2 + + // Crystal + { MP_ROM_QSTR(MP_QSTR_XL1), MP_ROM_PTR(&pin_P0_00) }, // 0.00 - XL1 | 32.768kHz Crystal Pin 1 + { MP_ROM_QSTR(MP_QSTR_XL2), MP_ROM_PTR(&pin_P0_01) }, // 0.01 - XL2 | 32.768kHz Crystal Pin 2 + + // Board Objects + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 8e8368d59452b1d54f9d0a87feb49896ada24b99 Mon Sep 17 00:00:00 2001 From: nitz Date: Sun, 7 Mar 2021 01:25:31 -0500 Subject: [PATCH 17/49] Add sparkfun_nrf52840_micromod to `build.yml` --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32e3bc900c..34f4c43cb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -314,6 +314,7 @@ jobs: - "simmel" - "snekboard" - "sparkfun_lumidrive" + - "sparkfun_nrf52840_micromod" - "sparkfun_nrf52840_mini" - "sparkfun_qwiic_micro_no_flash" - "sparkfun_qwiic_micro_with_flash" From 156ee4833ab170d598991fd8d4d6f6d04c759744 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 7 Mar 2021 09:20:50 -0600 Subject: [PATCH 18/49] circuitpy_mpconfig: Disable flash multi-partition This adds some additional code in mkfs which doesn't seem necessary, and Disabling it saves 172 bytes flash. Testing performed: Using a Feather M0 Adalogger, checked that * an sdcard could still be mounted (using adafruit_sdcard) * os.listdir() of "/" and "/sd" worked * CIRCUITPY still mounted --- py/circuitpy_mpconfig.h | 2 +- supervisor/shared/flash.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 3eda3b0049..ae7885706b 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -132,7 +132,7 @@ #define MICROPY_FATFS_LFN_CODE_PAGE (437) #define MICROPY_FATFS_USE_LABEL (1) #define MICROPY_FATFS_RPATH (2) -#define MICROPY_FATFS_MULTI_PARTITION (1) +#define MICROPY_FATFS_MULTI_PARTITION (0) // Only enable this if you really need it. It allocates a byte cache of this size. // #define MICROPY_FATFS_MAX_SS (4096) diff --git a/supervisor/shared/flash.c b/supervisor/shared/flash.c index 1e09fe14b3..66f2f07047 100644 --- a/supervisor/shared/flash.c +++ b/supervisor/shared/flash.c @@ -213,7 +213,9 @@ void supervisor_flash_init_vfs(fs_user_mount_t *vfs) { vfs->base.type = &mp_fat_vfs_type; vfs->flags |= FSUSER_NATIVE | FSUSER_HAVE_IOCTL; vfs->fatfs.drv = vfs; +#if MICROPY_FATFS_MULTI_PARTITION vfs->fatfs.part = 1; // flash filesystem lives on first partition +#endif vfs->readblocks[0] = (mp_obj_t)&supervisor_flash_obj_readblocks_obj; vfs->readblocks[1] = (mp_obj_t)&supervisor_flash_obj; vfs->readblocks[2] = (mp_obj_t)flash_read_blocks; // native version From 1c2a1a672f08b235180a8af92d7ae9fc5275a6c5 Mon Sep 17 00:00:00 2001 From: Jose David M Date: Sat, 6 Mar 2021 15:08:41 +0000 Subject: [PATCH 19/49] Translated using Weblate (Spanish) Currently translated at 100.0% (974 of 974 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/locale/es.po b/locale/es.po index 32c3ecfa01..f3ac735960 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-02 02:24+0000\n" +"PO-Revision-Date: 2021-03-07 15:50+0000\n" "Last-Translator: Jose David M \n" "Language-Team: \n" "Language: es\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.5\n" +"X-Generator: Weblate 4.5.1\n" #: main.c msgid "" @@ -1114,7 +1114,7 @@ msgstr "IV debe tener %d bytes de longitud" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "In-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "Los elementos del búfer de entrada deben ser de una longitud <= 4 bytes" #: py/persistentcode.c msgid "" @@ -1742,7 +1742,7 @@ msgstr "Se acabaron los enchufes" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Out-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "Los elementos del búfer de salida deben ser de una longitud <= 4 bytes" #: shared-bindings/bitops/__init__.c #, c-format @@ -1771,11 +1771,11 @@ msgstr "" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice already in use" -msgstr "" +msgstr "Segmento PWM ya esta en uso" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice channel A already in use" -msgstr "" +msgstr "Segmento del PWM canal A ya esta en uso" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -1816,7 +1816,7 @@ msgstr "El pin es solo de entrada" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "Pin must be on PWM Channel B" -msgstr "" +msgstr "El pin debe estar en el PWM canal B" #: ports/atmel-samd/common-hal/countio/Counter.c msgid "Pin must support hardware interrupts" @@ -2817,7 +2817,7 @@ msgstr "circulo solo puede ser registrado con un pariente" #: shared-bindings/bitmaptools/__init__.c msgid "clip point must be (x,y) tuple" -msgstr "" +msgstr "El punto clip debe ser una tupla (x, y)" #: shared-bindings/msgpack/ExtType.c msgid "code outside range 0~127" From f1ada8e8800a6ac64ebf611ba292b0eb93345c8e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 7 Mar 2021 11:48:16 -0600 Subject: [PATCH 20/49] Automatically count EXTERNAL_FLASH_DEVICES --- ports/atmel-samd/boards/8086_commander/mpconfigboard.mk | 1 - ports/atmel-samd/boards/aloriumtech_evo_m51/mpconfigboard.mk | 1 - ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk | 1 - ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk | 1 - ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk | 1 - ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk | 1 - .../atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk | 1 - .../boards/circuitplayground_express/mpconfigboard.mk | 1 - .../boards/circuitplayground_express_crickit/mpconfigboard.mk | 1 - .../boards/circuitplayground_express_displayio/mpconfigboard.mk | 1 - ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk | 1 - ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk | 1 - ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk | 1 - ports/atmel-samd/boards/dynalora_usb/mpconfigboard.mk | 1 - ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk | 1 - ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk | 1 - ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk | 1 - .../boards/feather_m0_express_crickit/mpconfigboard.mk | 1 - ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk | 1 - ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk | 1 - ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk | 1 - .../boards/feather_radiofruit_zigbee/mpconfigboard.mk | 1 - .../atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk | 1 - ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk | 1 - ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk | 1 - ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk | 1 - ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk | 1 - ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk | 1 - ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk | 1 - ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk | 1 - ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk | 1 - ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk | 1 - ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk | 1 - ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk | 1 - ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk | 1 - ports/atmel-samd/boards/pybadge/mpconfigboard.mk | 1 - ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk | 1 - ports/atmel-samd/boards/pycubed/mpconfigboard.mk | 1 - ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk | 1 - ports/atmel-samd/boards/pygamer/mpconfigboard.mk | 1 - ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk | 1 - ports/atmel-samd/boards/pyportal/mpconfigboard.mk | 1 - ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk | 1 - ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk | 1 - ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk | 1 - ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk | 1 - ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk | 1 - ports/atmel-samd/boards/serpente/mpconfigboard.mk | 1 - ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk | 1 - ports/atmel-samd/boards/snekboard/mpconfigboard.mk | 1 - ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk | 1 - .../boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk | 1 - .../atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk | 1 - .../boards/sparkfun_samd51_thing_plus/mpconfigboard.mk | 1 - ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk | 1 - ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk | 1 - ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk | 1 - ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk | 1 - ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk | 1 - ports/atmel-samd/boards/ugame10/mpconfigboard.mk | 1 - .../boards/winterbloom_big_honking_button/mpconfigboard.mk | 1 - ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk | 1 - ports/nrf/boards/TG-Watch/mpconfigboard.mk | 1 - ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk | 1 - ports/nrf/boards/bastble/mpconfigboard.mk | 1 - ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk | 1 - ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk | 1 - ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk | 1 - ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk | 1 - ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk | 1 - ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk | 1 - ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.mk | 1 - ports/nrf/boards/makerdiary_nrf52840_m2_devkit/mpconfigboard.mk | 1 - ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk | 1 - ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk | 1 - ports/nrf/boards/ohs2020_badge/mpconfigboard.mk | 1 - ports/nrf/boards/particle_argon/mpconfigboard.mk | 1 - ports/nrf/boards/particle_boron/mpconfigboard.mk | 1 - ports/nrf/boards/particle_xenon/mpconfigboard.mk | 1 - ports/nrf/boards/pca10056/mpconfigboard.mk | 1 - ports/nrf/boards/pitaya_go/mpconfigboard.mk | 1 - ports/nrf/boards/simmel/mpconfigboard.mk | 1 - ports/nrf/boards/tinkeringtech_scoutmakes_azul/mpconfigboard.mk | 1 - ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk | 1 - ports/stm/boards/meowbit_v121/mpconfigboard.mk | 1 - ports/stm/boards/pyb_nano_v2/mpconfigboard.mk | 1 - ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk | 1 - .../boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk | 1 - ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk | 1 - ports/stm/boards/thunderpack_v12/mpconfigboard.mk | 1 - supervisor/supervisor.mk | 2 ++ 91 files changed, 2 insertions(+), 90 deletions(-) diff --git a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk index 295d7b2aea..dc56219fe1 100644 --- a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk +++ b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ" LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/aloriumtech_evo_m51/mpconfigboard.mk b/ports/atmel-samd/boards/aloriumtech_evo_m51/mpconfigboard.mk index 34301da3f0..3b5b05020d 100644 --- a/ports/atmel-samd/boards/aloriumtech_evo_m51/mpconfigboard.mk +++ b/ports/atmel-samd/boards/aloriumtech_evo_m51/mpconfigboard.mk @@ -9,7 +9,6 @@ CHIP_VARIANT = SAMD51P19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk b/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk index 9c1d61ec7a..fea765c3f0 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk +++ b/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "MX25L51245G","GD25S512MD" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk index f1b2f4c1d9..de350f7ab0 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51N20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "MX25L51245G","GD25S512MD" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk index 62399b1cdb..9417c23025 100644 --- a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk +++ b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk index 6ea6a7211a..e01e5ca4d5 100755 --- a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk index 13ae59de46..40b5815ede 100755 --- a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, S25FL064L" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk index e8993d44d1..97434a90b8 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index 446d1177ff..d6994a4c01 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" # Turn off features and optimizations for Crickit build to make room for additional frozen libs. diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk index 1f9b98bec0..ec85666719 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" # Turn off features and optimizations for Crickit build to make room for additional frozen libs. diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk index 6eb76c182f..9f54bd1182 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q128JV_PM" # No I2S on SAMD51G. diff --git a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk index 99e13f7910..48b22b394e 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk @@ -9,7 +9,6 @@ CHIP_FAMILY = samd21 INTERNAL_FLASH_FILESYSTEM = 0 LONGINT_IMPL = MPZ SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = AT25DF081A CIRCUITPY_AUDIOIO = 0 diff --git a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk index b1dad30eb0..13e0f75c7c 100644 --- a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ, W25Q16JV_IM" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/dynalora_usb/mpconfigboard.mk b/ports/atmel-samd/boards/dynalora_usb/mpconfigboard.mk index ac14e73956..8b2ce7fbf4 100644 --- a/ports/atmel-samd/boards/dynalora_usb/mpconfigboard.mk +++ b/ports/atmel-samd/boards/dynalora_usb/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q32C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk index 2d5234f821..915270c579 100644 --- a/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk +++ b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk @@ -8,7 +8,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q32C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk index 360940cf18..8f552c5b4d 100644 --- a/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk +++ b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk @@ -8,7 +8,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q32C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk index 7d034828e1..fcf1b4a1aa 100644 --- a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk index c3938345d5..e29f3c0b29 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk index 7a80eea9b3..dd012cb487 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "S25FL064L" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk index 345ac33c5d..4c0c5137c1 100644 --- a/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAME51J19A CHIP_FAMILY = same51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk index 78959dcd07..a8b4460a6e 100644 --- a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk index 9f9bb0501e..2f4db69b45 100755 --- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMR21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk index 08eb5c98ba..cd43dd4d67 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51P20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk index 6950378d53..4661a7acd0 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk index 4bf1552884..1154d0bb1f 100644 --- a/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk index b5d22bbbfb..467c6af47a 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q16FW, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk index eb02d3c270..7a45ef21e9 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk b/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk index 44b28acbcb..41e24f1995 100644 --- a/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk index 8b17f15ea7..964d335537 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk index 58d4e49805..1e63476596 100644 --- a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk index c2603002cd..553bf14f2e 100644 --- a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk index 321ee5f476..8f4c3f8904 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q16JV_IM, W25Q16JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk index 9b242a3ffc..86a04be87f 100644 --- a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk +++ b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk b/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk index 1b4a16a08d..eb7a87feaf 100644 --- a/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk +++ b/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk b/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk index e5fa0cd84b..85b2dd4205 100644 --- a/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk index 7a213faf4c..54f00b7448 100644 --- a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk index 5ae09294d6..a88e5e5e5b 100644 --- a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk index 09aef7d92e..1eb3cd5239 100644 --- a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q80DV LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk b/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk index 46df12c4f2..0c459c309c 100644 --- a/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = MR2xH40 LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk index 2db6786bfd..5cef7b44cf 100644 --- a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk index d001374a50..a58e016542 100644 --- a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pyportal/mpconfigboard.mk b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk index 149141a4e3..e8c27ecbf1 100644 --- a/ports/atmel-samd/boards/pyportal/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk index dbc2d5ae99..c9ffd09549 100644 --- a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk b/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk index cf982cb8fc..a88bea91de 100644 --- a/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk +++ b/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk @@ -9,7 +9,6 @@ CHIP_FAMILY = samd21 INTERNAL_FLASH_FILESYSTEM = 0 LONGINT_IMPL = MPZ SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C CIRCUITPY_AUDIOBUSIO = 0 diff --git a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk index 470e4d9dc4..e964d65d5e 100644 --- a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk @@ -9,7 +9,6 @@ CHIP_FAMILY = samd51 #QSPI_FLASH_FILESYSTEM = 0 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk b/ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk index e4472e05d6..53aac7df2a 100644 --- a/ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk +++ b/ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAME54P20A CHIP_FAMILY = same54 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "N25Q256A" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk b/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk index f57e016b4e..7163568374 100644 --- a/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk +++ b/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51P19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/serpente/mpconfigboard.mk b/ports/atmel-samd/boards/serpente/mpconfigboard.mk index e024736c95..32ba32f386 100644 --- a/ports/atmel-samd/boards/serpente/mpconfigboard.mk +++ b/ports/atmel-samd/boards/serpente/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q32C LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk b/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk index bf88cd52d0..e64045f13a 100644 --- a/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk +++ b/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk index 72c98867e2..90bc6076f7 100644 --- a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk +++ b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk index 29579904a2..197dea6fe2 100755 --- a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32FV" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk index dd01c9985b..7c2fd57ea1 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32FV" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk index 6db5596ba3..a5cd49239e 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32FV" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/mpconfigboard.mk index 567f1db205..e33035d949 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/mpconfigboard.mk @@ -8,7 +8,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = AT25SF041A LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk b/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk index 12c35d2f9d..ee3f21b05a 100644 --- a/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk index 0f43ab8002..91644386f2 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk @@ -8,7 +8,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = AT25SF161 LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk index ee82b99c90..59a40d3dcc 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk index f3afa61a8f..8c9dc71699 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q32BV LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk b/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk index 498429c9e8..373cbba99c 100644 --- a/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk +++ b/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk index d1ada64293..74f438b714 100644 --- a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk +++ b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = S25FL216K LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk index 5062200e1f..1c96e1d235 100644 --- a/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk @@ -9,7 +9,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "GD25Q16C, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk index e8f94a2902..ce9c2585f9 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk @@ -11,7 +11,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "GD25Q64C, W25Q32JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/nrf/boards/TG-Watch/mpconfigboard.mk b/ports/nrf/boards/TG-Watch/mpconfigboard.mk index f1aac6d71e..8407d84877 100644 --- a/ports/nrf/boards/TG-Watch/mpconfigboard.mk +++ b/ports/nrf/boards/TG-Watch/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "TG-Techie" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q128JV_SQ" FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice diff --git a/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk b/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk index 09252ab4b7..06cd9633d1 100644 --- a/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk +++ b/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "ARAMCON Badge Team" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" CIRCUITPY_DISPLAYIO = 1 diff --git a/ports/nrf/boards/bastble/mpconfigboard.mk b/ports/nrf/boards/bastble/mpconfigboard.mk index eca900de77..417c993589 100644 --- a/ports/nrf/boards/bastble/mpconfigboard.mk +++ b/ports/nrf/boards/bastble/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "ElectronicCats" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk index 6b5c0424f9..bc00790376 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk index 16cb208247..f94e49e473 100644 --- a/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk b/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk index 5813e6136b..6d0c13e454 100644 --- a/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk +++ b/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk index 84861a1f0b..b291203e2f 100644 --- a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk b/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk index d601243486..c85b978944 100644 --- a/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk +++ b/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "HiiBot" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" diff --git a/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk index d5587f4b94..57b39b512b 100644 --- a/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk @@ -9,5 +9,4 @@ MCU_CHIP = nrf52840 CIRCUITPY_BITBANG_APA102 = 1 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.mk b/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.mk index fc630e5bbe..e7547af717 100644 --- a/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.mk +++ b/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "Makerdiary" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25R6435F" CIRCUITPY_ENABLE_MPY_NATIVE = 1 diff --git a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/mpconfigboard.mk b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/mpconfigboard.mk index 4e6aebc8e8..cd19c25b1d 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/mpconfigboard.mk +++ b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "Makerdiary" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25R6435F" CIRCUITPY_ENABLE_MPY_NATIVE = 1 diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk b/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk index d69bc82357..7da9ed1896 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "makerdiary" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25R6435F" diff --git a/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk index b972bcbed7..ef0992a742 100644 --- a/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" CIRCUITPY__EVE = 1 diff --git a/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk b/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk index 7d2c6de987..2e6e885f55 100644 --- a/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk +++ b/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "OSHWA" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ" diff --git a/ports/nrf/boards/particle_argon/mpconfigboard.mk b/ports/nrf/boards/particle_argon/mpconfigboard.mk index f8d3d2aca2..eaed5527c1 100644 --- a/ports/nrf/boards/particle_argon/mpconfigboard.mk +++ b/ports/nrf/boards/particle_argon/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Particle" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25L3233F" diff --git a/ports/nrf/boards/particle_boron/mpconfigboard.mk b/ports/nrf/boards/particle_boron/mpconfigboard.mk index eada97a730..26fe7b83db 100644 --- a/ports/nrf/boards/particle_boron/mpconfigboard.mk +++ b/ports/nrf/boards/particle_boron/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Particle" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25L3233F" diff --git a/ports/nrf/boards/particle_xenon/mpconfigboard.mk b/ports/nrf/boards/particle_xenon/mpconfigboard.mk index 6062da378f..0722c4ac65 100644 --- a/ports/nrf/boards/particle_xenon/mpconfigboard.mk +++ b/ports/nrf/boards/particle_xenon/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Particle" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25L3233F" diff --git a/ports/nrf/boards/pca10056/mpconfigboard.mk b/ports/nrf/boards/pca10056/mpconfigboard.mk index f24e6f6670..48f68a30ae 100644 --- a/ports/nrf/boards/pca10056/mpconfigboard.mk +++ b/ports/nrf/boards/pca10056/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Nordic Semiconductor" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25R6435F" diff --git a/ports/nrf/boards/pitaya_go/mpconfigboard.mk b/ports/nrf/boards/pitaya_go/mpconfigboard.mk index 247ddd8ac5..14e2108b78 100644 --- a/ports/nrf/boards/pitaya_go/mpconfigboard.mk +++ b/ports/nrf/boards/pitaya_go/mpconfigboard.mk @@ -7,5 +7,4 @@ USB_MANUFACTURER = "Makerdiary" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25R6435F" diff --git a/ports/nrf/boards/simmel/mpconfigboard.mk b/ports/nrf/boards/simmel/mpconfigboard.mk index 283e3d1690..005ec8af2f 100644 --- a/ports/nrf/boards/simmel/mpconfigboard.mk +++ b/ports/nrf/boards/simmel/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "Betrusted" MCU_CHIP = nrf52833 # SPI_FLASH_FILESYSTEM = 1 -# EXTERNAL_FLASH_DEVICE_COUNT = 1 # EXTERNAL_FLASH_DEVICES = "MX25R1635F" INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/mpconfigboard.mk b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/mpconfigboard.mk index e8bd636ad9..7808b16575 100644 --- a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/mpconfigboard.mk +++ b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "TinkeringTech LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk index 4d0bd4598d..39bf7dc542 100644 --- a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk +++ b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "Feather STM32F405 Express" USB_MANUFACTURER = "Adafruit Industries LLC" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C MCU_SERIES = F4 diff --git a/ports/stm/boards/meowbit_v121/mpconfigboard.mk b/ports/stm/boards/meowbit_v121/mpconfigboard.mk index 86b0cb5ab4..45a04a3a77 100644 --- a/ports/stm/boards/meowbit_v121/mpconfigboard.mk +++ b/ports/stm/boards/meowbit_v121/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "Meowbit" USB_MANUFACTURER = "Kittenbot" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q16JV_IQ # INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk index 237dba921e..cff8eea705 100644 --- a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk +++ b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "PYB LR Nano V2" USB_MANUFACTURER = "MicroPython Chinese Community" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q64JV_IQ MCU_SERIES = F4 diff --git a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk index 9b45a0fac7..1d533e30f3 100644 --- a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "stm32f411ce blackpill" USB_MANUFACTURER = "Unknown" # SPI_FLASH_FILESYSTEM = 1 -# EXTERNAL_FLASH_DEVICE_COUNT = 1 # EXTERNAL_FLASH_DEVICES = xxxxxx #See supervisor/shared/external_flash/devices.h for options # LONGINT_IMPL = MPZ diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk index 9a95a3539c..71f6061b3a 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "stm32f411ce blackpill with flash" USB_MANUFACTURER = "Unknown" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 #See supervisor/shared/external_flash/devices.h for options EXTERNAL_FLASH_DEVICES = W25Q64FV,W25Q64JV_IQ LONGINT_IMPL = MPZ diff --git a/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk index 28874f9c6c..b50cdb966f 100644 --- a/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk +++ b/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "STMicroelectronics" INTERNAL_FLASH_FILESYSTEM = 1 # QSPI_FLASH_FILESYSTEM = 1 -# EXTERNAL_FLASH_DEVICE_COUNT = 1 # EXTERNAL_FLASH_DEVICES = N25Q128A # LONGINT_IMPL = MPZ diff --git a/ports/stm/boards/thunderpack_v12/mpconfigboard.mk b/ports/stm/boards/thunderpack_v12/mpconfigboard.mk index 4436f04b77..1c09fe64c1 100644 --- a/ports/stm/boards/thunderpack_v12/mpconfigboard.mk +++ b/ports/stm/boards/thunderpack_v12/mpconfigboard.mk @@ -9,7 +9,6 @@ CIRCUITPY_USB_HID = 0 LONGINT_IMPL = NONE SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C CIRCUITPY_NVM = 1 diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 374b7a72bd..f94bccd9ac 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -33,6 +33,8 @@ endif # (Right now INTERNAL_FLASH_FILESYSTEM and (Q)SPI_FLASH_FILESYSTEM are mutually exclusive. # But that might not be true in the future.) ifdef EXTERNAL_FLASH_DEVICES + COMMA := , + EXTERNAL_FLASH_DEVICE_COUNT := $(words $(subst $(COMMA), ,$(EXTERNAL_FLASH_DEVICES))) CFLAGS += -DEXTERNAL_FLASH_DEVICES=$(EXTERNAL_FLASH_DEVICES) \ -DEXTERNAL_FLASH_DEVICE_COUNT=$(EXTERNAL_FLASH_DEVICE_COUNT) From 32475ce98c2eaa13240fa24e713ce3d5df60afd9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 7 Mar 2021 12:51:47 -0600 Subject: [PATCH 21/49] Automatically count EXTERNAL_FLASH_DEVICES (mk2) Instead of counting words in make, which is slightly awful, notice that possible_devices is local to external_flash.c, so we can declare the array with an automatic bound, and then get the count as the element-count (MP_ARRAY_SIZE) of the array. Since EXTERNAL_FLASH_DEVICE_COUNT is no longer a global macro, switch a few sites to using EXTERNAL_FLASH_DEVICES in `#if` checks instead. --- supervisor/flash.h | 2 +- supervisor/flash_root_pointers.h | 2 +- supervisor/shared/external_flash/external_flash.c | 3 ++- supervisor/supervisor.mk | 3 --- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/supervisor/flash.h b/supervisor/flash.h index cd69cbfa9b..289c76c2d0 100644 --- a/supervisor/flash.h +++ b/supervisor/flash.h @@ -31,7 +31,7 @@ #include "py/mpconfig.h" -#ifdef EXTERNAL_FLASH_DEVICE_COUNT +#ifdef EXTERNAL_FLASH_DEVICES #include "supervisor/shared/external_flash/external_flash.h" #else #include "supervisor/shared/internal_flash.h" diff --git a/supervisor/flash_root_pointers.h b/supervisor/flash_root_pointers.h index 634ae58d3f..a426b9c4eb 100644 --- a/supervisor/flash_root_pointers.h +++ b/supervisor/flash_root_pointers.h @@ -26,7 +26,7 @@ #ifndef MICROPY_INCLUDED_SUPERVISOR_FLASH_ROOT_POINTERS_H #define MICROPY_INCLUDED_SUPERVISOR_FLASH_ROOT_POINTERS_H -#ifdef EXTERNAL_FLASH_DEVICE_COUNT +#ifdef EXTERNAL_FLASH_DEVICES #include "supervisor/shared/external_flash/external_flash_root_pointers.h" #else #include "supervisor/internal_flash_root_pointers.h" diff --git a/supervisor/shared/external_flash/external_flash.c b/supervisor/shared/external_flash/external_flash.c index e2d767235e..23727e7e70 100644 --- a/supervisor/shared/external_flash/external_flash.c +++ b/supervisor/shared/external_flash/external_flash.c @@ -45,7 +45,8 @@ // The currently cached sector in the cache, ram or flash based. static uint32_t current_sector; -const external_flash_device possible_devices[EXTERNAL_FLASH_DEVICE_COUNT] = {EXTERNAL_FLASH_DEVICES}; +STATIC const external_flash_device possible_devices[] = {EXTERNAL_FLASH_DEVICES}; +#define EXTERNAL_FLASH_DEVICE_COUNT MP_ARRAY_SIZE(possible_devices) static const external_flash_device* flash_device = NULL; diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index f94bccd9ac..083e7fb354 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -33,10 +33,7 @@ endif # (Right now INTERNAL_FLASH_FILESYSTEM and (Q)SPI_FLASH_FILESYSTEM are mutually exclusive. # But that might not be true in the future.) ifdef EXTERNAL_FLASH_DEVICES - COMMA := , - EXTERNAL_FLASH_DEVICE_COUNT := $(words $(subst $(COMMA), ,$(EXTERNAL_FLASH_DEVICES))) CFLAGS += -DEXTERNAL_FLASH_DEVICES=$(EXTERNAL_FLASH_DEVICES) \ - -DEXTERNAL_FLASH_DEVICE_COUNT=$(EXTERNAL_FLASH_DEVICE_COUNT) SRC_SUPERVISOR += supervisor/shared/external_flash/external_flash.c ifeq ($(SPI_FLASH_FILESYSTEM),1) From 8594396a07e3841803f1f3e0ffad39c6e94f55dc Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 7 Mar 2021 13:49:41 -0500 Subject: [PATCH 22/49] Add caveat for usb_cdc.Serial.connected --- shared-bindings/usb_cdc/Serial.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/shared-bindings/usb_cdc/Serial.c b/shared-bindings/usb_cdc/Serial.c index c813dce5b3..4913ac85a2 100644 --- a/shared-bindings/usb_cdc/Serial.c +++ b/shared-bindings/usb_cdc/Serial.c @@ -42,7 +42,7 @@ //| """You cannot create an instance of `usb_cdc.Serial`. //| //| Serial objects are pre-constructed for each CDC device in the USB -//| descriptor and added to the ``usb_cdc.ports`` tuple.""" +//| descriptor and are included in the ``usb_cdc.serials`` tuple.""" //| ... //| @@ -124,7 +124,12 @@ STATIC mp_uint_t usb_cdc_serial_ioctl_stream(mp_obj_t self_in, mp_uint_t request } //| connected: bool -//| """True if this Serial is connected to a host. (read-only)""" +//| """True if this Serial is connected to a host. (read-only) +//| +//| .. note:: The host is considered to be connected if it is asserting DTR (Data Terminal Ready). +//| Most terminal programs and ``pyserial`` assert DTR when opening a serial connection. +//| However, the C# ``SerialPort`` API does not. You must set ``SerialPort.DtrEnable``. +//| """ //| STATIC mp_obj_t usb_cdc_serial_get_connected(mp_obj_t self_in) { usb_cdc_serial_obj_t *self = MP_OBJ_TO_PTR(self_in); From d919b7fa4ac2e14dea81e33b419c11d2790c2a1e Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 7 Mar 2021 14:13:20 -0500 Subject: [PATCH 23/49] fix #4352 --- shared-bindings/countio/Counter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared-bindings/countio/Counter.c b/shared-bindings/countio/Counter.c index e51db26440..820db5ea94 100644 --- a/shared-bindings/countio/Counter.c +++ b/shared-bindings/countio/Counter.c @@ -22,9 +22,8 @@ //| //| For example:: //| +//| import board //| import countio -//| import time -//| from board import * //| //| pin_counter = countio.Counter(board.D1) //| #reset the count after 100 counts From a6cb7d7069351264096432d12f8b2ab1014a5140 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 7 Mar 2021 15:34:07 -0500 Subject: [PATCH 24/49] Document readline() and readlines() --- shared-bindings/usb_cdc/Serial.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/shared-bindings/usb_cdc/Serial.c b/shared-bindings/usb_cdc/Serial.c index 4913ac85a2..0f2f76a174 100644 --- a/shared-bindings/usb_cdc/Serial.c +++ b/shared-bindings/usb_cdc/Serial.c @@ -45,7 +45,6 @@ //| descriptor and are included in the ``usb_cdc.serials`` tuple.""" //| ... //| - //| def read(self, size: int = 1) -> bytes: //| """Read at most ``size`` bytes. If ``size`` exceeds the internal buffer size //| only the bytes in the buffer will be read. If `timeout` is > 0 or ``None``, @@ -64,6 +63,28 @@ //| :rtype: bytes""" //| ... //| +//| def readline(self, size=-1) -> Optional[bytes]: +//| r"""Read a line, ending in a newline character ("\\n"), or +//| return everything readable if no newline is found and ``timeout`` is 0. +//| Return ``None`` in case of error. +//| +//| This is a binary stream: the newline character cannot be changed. +//| +//| :param int size: maximum number of characters to read. ``-1`` means as many as possible. +//| :return: the line read +//| :rtype: bytes or None""" +//| ... +//| +//| def readlines(self) -> list: +//| """Read multiple lines as a list, using `readline()` +//| +//| .. warning:: If ``timeout`` is ``None``, +//| `readlines()` will never return, because there is no way to indicate end of stream. +//| +//| :return: a list of the line read +//| :rtype: list""" +//| ... +//| //| def write(self, buf: ReadableBuffer) -> int: //| """Write as many bytes as possible from the buffer of bytes. //| From 1a6c0212392adc88f16b81c8a0f4b1f8311ef29e Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 7 Mar 2021 17:04:27 -0500 Subject: [PATCH 25/49] Add clarifying comment re carriage-return char. --- shared-bindings/usb_cdc/Serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared-bindings/usb_cdc/Serial.c b/shared-bindings/usb_cdc/Serial.c index 0f2f76a174..ea45699866 100644 --- a/shared-bindings/usb_cdc/Serial.c +++ b/shared-bindings/usb_cdc/Serial.c @@ -68,7 +68,8 @@ //| return everything readable if no newline is found and ``timeout`` is 0. //| Return ``None`` in case of error. //| -//| This is a binary stream: the newline character cannot be changed. +//| This is a binary stream: the newline character "\\n" cannot be changed. +//| If the host computer transmits "\\r" it will be included as part of the line. //| //| :param int size: maximum number of characters to read. ``-1`` means as many as possible. //| :return: the line read From 24ac8152ddca9c27d7d73fd9cb703c69b4eb6747 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 7 Mar 2021 20:07:04 -0500 Subject: [PATCH 26/49] Clarify further; fix type error --- shared-bindings/usb_cdc/Serial.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/shared-bindings/usb_cdc/Serial.c b/shared-bindings/usb_cdc/Serial.c index ea45699866..82355f8978 100644 --- a/shared-bindings/usb_cdc/Serial.c +++ b/shared-bindings/usb_cdc/Serial.c @@ -40,9 +40,7 @@ //| //| def __init__(self) -> None: //| """You cannot create an instance of `usb_cdc.Serial`. -//| -//| Serial objects are pre-constructed for each CDC device in the USB -//| descriptor and are included in the ``usb_cdc.serials`` tuple.""" +//| The available instances are in the ``usb_cdc.serials`` tuple.""" //| ... //| //| def read(self, size: int = 1) -> bytes: @@ -63,21 +61,21 @@ //| :rtype: bytes""" //| ... //| -//| def readline(self, size=-1) -> Optional[bytes]: -//| r"""Read a line, ending in a newline character ("\\n"), or -//| return everything readable if no newline is found and ``timeout`` is 0. +//| def readline(self, size: int = -1) -> Optional[bytes]: +//| r"""Read a line ending in a newline character ("\\n"), including the newline. +//| Return everything readable if no newline is found and ``timeout`` is 0. //| Return ``None`` in case of error. //| //| This is a binary stream: the newline character "\\n" cannot be changed. -//| If the host computer transmits "\\r" it will be included as part of the line. +//| If the host computer transmits "\\r" it will also be included as part of the line. //| //| :param int size: maximum number of characters to read. ``-1`` means as many as possible. //| :return: the line read //| :rtype: bytes or None""" //| ... //| -//| def readlines(self) -> list: -//| """Read multiple lines as a list, using `readline()` +//| def readlines(self) -> List[Optional[bytes]]: +//| """Read multiple lines as a list, using `readline()`. //| //| .. warning:: If ``timeout`` is ``None``, //| `readlines()` will never return, because there is no way to indicate end of stream. From 2771e7fe7525dc6e500f8a6349e48b2b9720d80b Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Mon, 8 Mar 2021 08:47:33 -0300 Subject: [PATCH 27/49] Updating USB vendor ID and producfor Espressif modules --- ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h | 2 +- .../esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h index 0960e96b60..fd10ee0b58 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h @@ -26,7 +26,7 @@ //Micropython setup -#define MICROPY_HW_BOARD_NAME "Franzininho WIFI w/Wroom" +#define MICROPY_HW_BOARD_NAME "Franzininho WIFI w/Wrover" #define MICROPY_HW_MCU_NAME "ESP32S2" #define MICROPY_HW_NEOPIXEL (&pin_GPIO18) diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk index 2642cebca9..d66200fb74 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk @@ -1,6 +1,6 @@ -USB_VID = 0x239A -USB_PID = 0x80AA -USB_PRODUCT = "Franzininho WIFI" +USB_VID = 0x303A +USB_PID = 0x80AD +USB_PRODUCT = "Franzininho WIFI w/Wrover" USB_MANUFACTURER = "Espressif" INTERNAL_FLASH_FILESYSTEM = 1 From fe29780afbf45950b5d16e7c2d9c68eb64c56c13 Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Mon, 8 Mar 2021 08:51:48 -0300 Subject: [PATCH 28/49] updating USB_VID and USB_PID for Espressif modules --- ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h | 2 +- ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk | 4 ++-- ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h index fd10ee0b58..0960e96b60 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h @@ -26,7 +26,7 @@ //Micropython setup -#define MICROPY_HW_BOARD_NAME "Franzininho WIFI w/Wrover" +#define MICROPY_HW_BOARD_NAME "Franzininho WIFI w/Wroom" #define MICROPY_HW_MCU_NAME "ESP32S2" #define MICROPY_HW_NEOPIXEL (&pin_GPIO18) diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk index d66200fb74..fc6c62257a 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x303A -USB_PID = 0x80AD -USB_PRODUCT = "Franzininho WIFI w/Wrover" +USB_PID = 0x80AA +USB_PRODUCT = "Franzininho WIFI w/Wroom" USB_MANUFACTURER = "Espressif" INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk b/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk index dedd1519d1..7f1a6eedbb 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x303A -USB_PID = 0x80AA -USB_PRODUCT = "Franzininho WIFI Wrover" +USB_PID = 0x80AD +USB_PRODUCT = "Franzininho WIFI w/Wrover USB_MANUFACTURER = "Espressif" INTERNAL_FLASH_FILESYSTEM = 1 From 9b0b59d75f22e619d39bf6f09c2ddcbbf87910a4 Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Mon, 8 Mar 2021 09:01:36 -0300 Subject: [PATCH 29/49] updating build.yml with franzininho wifi wroom --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b6d3c28cb..c89aa1641b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -451,6 +451,7 @@ jobs: - "espressif_saola_1_wroom" - "espressif_saola_1_wrover" - "franzininho_wifi_wrover" + - "franzininho_wifi_wroom" - "lilygo_ttgo_t8_s2_st7789" - "microdev_micro_s2" - "muselab_nanoesp32_s2" From 6052b4e06b92d0fb5dedc7985ac3d81e84259665 Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Mon, 8 Mar 2021 09:31:10 -0300 Subject: [PATCH 30/49] Fix build.yml --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c89aa1641b..43e420145e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -233,7 +233,7 @@ jobs: - "feather_nrf52840_express" - "feather_radiofruit_zigbee" - "feather_stm32f405_express" - - "fluff_m0" + - "fluff_m0" - "gemma_m0" - "grandcentral_m4_express" - "hallowing_m0_express" @@ -451,7 +451,6 @@ jobs: - "espressif_saola_1_wroom" - "espressif_saola_1_wrover" - "franzininho_wifi_wrover" - - "franzininho_wifi_wroom" - "lilygo_ttgo_t8_s2_st7789" - "microdev_micro_s2" - "muselab_nanoesp32_s2" From 5d2631281a4b781b80e61bf855510f02c30e3285 Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Mon, 8 Mar 2021 09:46:28 -0300 Subject: [PATCH 31/49] Adding franzininho_wifi_wroom in build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43e420145e..d413fd33ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -450,6 +450,7 @@ jobs: - "espressif_kaluga_1" - "espressif_saola_1_wroom" - "espressif_saola_1_wrover" + - "franzininho_wifi_wroom" - "franzininho_wifi_wrover" - "lilygo_ttgo_t8_s2_st7789" - "microdev_micro_s2" From 27703f3156bc8352af8b9d8d72ffa0777d2c8eba Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Mon, 8 Mar 2021 10:32:37 -0300 Subject: [PATCH 32/49] fix quote error --- ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk b/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk index 7f1a6eedbb..c0c47cef10 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x303A USB_PID = 0x80AD -USB_PRODUCT = "Franzininho WIFI w/Wrover +USB_PRODUCT = "Franzininho WIFI w/Wrover" USB_MANUFACTURER = "Espressif" INTERNAL_FLASH_FILESYSTEM = 1 From e3d4036f2e3a363cb745f0f704822ca435fd19de Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 8 Mar 2021 17:24:03 -0800 Subject: [PATCH 33/49] Update TinyUSB --- lib/tinyusb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tinyusb b/lib/tinyusb index 280297bdb7..2adb7e7193 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 280297bdb7aec67adf347ec046943a48a71647df +Subproject commit 2adb7e719316b12c53a907153cfa0056db1abd70 From 183fbbfe23cb18bcbeed42cb7cdfc3d322d8639b Mon Sep 17 00:00:00 2001 From: hexthat Date: Mon, 8 Mar 2021 17:06:05 +0000 Subject: [PATCH 34/49] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (974 of 974 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 9945b88f45..77e8fcee34 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-01 15:19+0000\n" +"PO-Revision-Date: 2021-03-09 01:49+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.5\n" +"X-Generator: Weblate 4.5.1\n" #: main.c msgid "" @@ -1103,7 +1103,7 @@ msgstr "IV bì xū wéi %d zì jié cháng" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "In-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "huǎn chōng nèi yuán sù bì xū <= 4 zì jié cháng" #: py/persistentcode.c msgid "" @@ -1726,7 +1726,7 @@ msgstr "tào jiē zì wài" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Out-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "huǎn chōng wài yuán sù bì xū <= 4 zì jié cháng" #: shared-bindings/bitops/__init__.c #, c-format @@ -1754,11 +1754,11 @@ msgstr "Dāng biànliàng_pínlǜ shì False zài jiànzhú shí PWM pínlǜ bù #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice already in use" -msgstr "" +msgstr "yǐ jīng zài shǐ yòng de PWM qiē piàn" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice channel A already in use" -msgstr "" +msgstr "PWM qiē piàn tōng dào A yǐ zài shǐ yòng zhōng" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -1799,7 +1799,7 @@ msgstr "Yǐn jiǎo jǐn shūrù" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "Pin must be on PWM Channel B" -msgstr "" +msgstr "yǐn jiǎo bì xū zài Pwm pín dào B shàng" #: ports/atmel-samd/common-hal/countio/Counter.c msgid "Pin must support hardware interrupts" @@ -2785,7 +2785,7 @@ msgstr "quānzi zhǐ néng zài yī wèi jiāzhǎng zhōng zhùcè" #: shared-bindings/bitmaptools/__init__.c msgid "clip point must be (x,y) tuple" -msgstr "" +msgstr "jiá dian bì xū shì (x,y) kuài" #: shared-bindings/msgpack/ExtType.c msgid "code outside range 0~127" From f83465e371917cd79eec2b84bb2c865493a0960e Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 9 Mar 2021 02:49:53 +0100 Subject: [PATCH 35/49] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 15 +++++++++++---- locale/cs.po | 12 ++++++++---- locale/de_DE.po | 15 +++++++++++---- locale/el.po | 12 ++++++++---- locale/en_GB.po | 12 ++++++++---- locale/es.po | 18 +++++++++++++----- locale/fil.po | 15 +++++++++++---- locale/fr.po | 15 +++++++++++---- locale/hi.po | 12 ++++++++---- locale/it_IT.po | 15 +++++++++++---- locale/ja.po | 15 +++++++++++---- locale/ko.po | 12 ++++++++---- locale/nl.po | 15 +++++++++++---- locale/pl.po | 15 +++++++++++---- locale/pt_BR.po | 15 +++++++++++---- locale/sv.po | 15 +++++++++++---- locale/zh_Latn_pinyin.po | 15 +++++++++++---- 17 files changed, 174 insertions(+), 69 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index b62425d49c..fbcd82940c 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -1061,10 +1061,6 @@ msgstr "" msgid "Group already used" msgstr "Grup sudah digunakan" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Grup penuh" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1819,6 +1815,10 @@ msgstr "" "ideal. Jika ini tidak dapat dihindari, berikan allow_inefficient=True ke " "konstruktor" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3795,6 +3795,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" @@ -4296,6 +4300,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Group full" +#~ msgstr "Grup penuh" + #~ msgid "SDA or SCL needs a pull up" #~ msgstr "SDA atau SCL membutuhkan pull up" diff --git a/locale/cs.po b/locale/cs.po index 73097ae169..57dd3cd760 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -1045,10 +1045,6 @@ msgstr "" msgid "Group already used" msgstr "" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1790,6 +1786,10 @@ msgid "" "constructor" msgstr "" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3746,6 +3746,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 455d1f897c..b000590f7c 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -1065,10 +1065,6 @@ msgstr "Generischer Fehler" msgid "Group already used" msgstr "Gruppe schon benutzt" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Gruppe voll" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1823,6 +1819,10 @@ msgstr "" "Bytes verbraucht. Wenn dies nicht vermieden werden kann, übergeben Sie " "allow_inefficient = True an den Konstruktor" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3832,6 +3832,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" @@ -4339,6 +4343,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Group full" +#~ msgstr "Gruppe voll" + #~ msgid "bits must be 7, 8 or 9" #~ msgstr "bits muss 7, 8 oder 9 sein" diff --git a/locale/el.po b/locale/el.po index b6bab075a1..309d3b86a9 100644 --- a/locale/el.po +++ b/locale/el.po @@ -1042,10 +1042,6 @@ msgstr "" msgid "Group already used" msgstr "" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1787,6 +1783,10 @@ msgid "" "constructor" msgstr "" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3743,6 +3743,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 829c4fff9a..6db894d453 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -1041,10 +1041,6 @@ msgstr "" msgid "Group already used" msgstr "" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1786,6 +1782,10 @@ msgid "" "constructor" msgstr "" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3742,6 +3742,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" diff --git a/locale/es.po b/locale/es.po index f3ac735960..ecd6b0042a 100644 --- a/locale/es.po +++ b/locale/es.po @@ -1069,10 +1069,6 @@ msgstr "Fallo Genérico" msgid "Group already used" msgstr "Grupo ya está siendo utilizado" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Group lleno" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1114,7 +1110,8 @@ msgstr "IV debe tener %d bytes de longitud" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "In-buffer elements must be <= 4 bytes long" -msgstr "Los elementos del búfer de entrada deben ser de una longitud <= 4 bytes" +msgstr "" +"Los elementos del búfer de entrada deben ser de una longitud <= 4 bytes" #: py/persistentcode.c msgid "" @@ -1837,6 +1834,10 @@ msgstr "" "ideales. Si esto no se puede evitar, pase allow_inefficient=True al " "constructor" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "Los pines deben compartir la división PWM" @@ -3839,6 +3840,10 @@ msgstr "presionando botón de arranque al inicio.\n" msgid "pressing both buttons at start up.\n" msgstr "presionando ambos botones al inicio.\n" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "pull_threshold debe esta entre 1 y 32" @@ -4342,6 +4347,9 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "Group full" +#~ msgstr "Group lleno" + #~ msgid "In buffer elements must be 4 bytes long or less" #~ msgstr "" #~ "Los elementos del búfer de entrada deben ser de una longitud de 4 bytes o " diff --git a/locale/fil.po b/locale/fil.po index e88a9efca2..046ed0e8fb 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -1055,10 +1055,6 @@ msgstr "" msgid "Group already used" msgstr "" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Puno ang group" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1806,6 +1802,10 @@ msgid "" "constructor" msgstr "" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3792,6 +3792,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" @@ -4298,6 +4302,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Group full" +#~ msgstr "Puno ang group" + #~ msgid "bits must be 7, 8 or 9" #~ msgstr "bits ay dapat 7, 8 o 9" diff --git a/locale/fr.po b/locale/fr.po index a66f7be551..a32590b685 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -1077,10 +1077,6 @@ msgstr "Échec génerique" msgid "Group already used" msgstr "Groupe déjà utilisé" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Groupe plein" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1845,6 +1841,10 @@ msgstr "" "octets idéal. Si cela ne peut pas être évité, transmettez allow_inefficient " "= True au constructeur" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "Les broches doivent partager la tranche PWM" @@ -3861,6 +3861,10 @@ msgstr "bouton boot appuyé lors du démarrage.\n" msgid "pressing both buttons at start up.\n" msgstr "les deux boutons appuyés lors du démarrage.\n" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "pull_threshold doit être entre 1 et 32" @@ -4364,6 +4368,9 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "Group full" +#~ msgstr "Groupe plein" + #~ msgid "UART not yet supported" #~ msgstr "UART n'est pas encore supporté" diff --git a/locale/hi.po b/locale/hi.po index c272aeeb7f..0ad1435b7d 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -1042,10 +1042,6 @@ msgstr "" msgid "Group already used" msgstr "" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1787,6 +1783,10 @@ msgid "" "constructor" msgstr "" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3743,6 +3743,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 1be741f606..235855efd0 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -1064,10 +1064,6 @@ msgstr "" msgid "Group already used" msgstr "" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Gruppo pieno" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1824,6 +1820,10 @@ msgid "" "constructor" msgstr "" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3809,6 +3809,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" @@ -4315,6 +4319,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Group full" +#~ msgstr "Gruppo pieno" + #~ msgid "bits must be 7, 8 or 9" #~ msgstr "i bit devono essere 7, 8 o 9" diff --git a/locale/ja.po b/locale/ja.po index 04b5287af8..8d1fa39e3f 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -1053,10 +1053,6 @@ msgstr "" msgid "Group already used" msgstr "グループはすでに使われています" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "グループが一杯" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1803,6 +1799,10 @@ msgid "" "constructor" msgstr "" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3773,6 +3773,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" @@ -4274,6 +4278,9 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Group full" +#~ msgstr "グループが一杯" + #~ msgid "bits must be 7, 8 or 9" #~ msgstr "bitsは7, 8, 9のいずれかでなければなりません" diff --git a/locale/ko.po b/locale/ko.po index 25455fc7ff..b3137c1b94 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -1045,10 +1045,6 @@ msgstr "" msgid "Group already used" msgstr "" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1790,6 +1786,10 @@ msgid "" "constructor" msgstr "" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3747,6 +3747,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index e796cf916a..d47469236d 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -1054,10 +1054,6 @@ msgstr "" msgid "Group already used" msgstr "Groep al gebruikt" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Groep is vol" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1813,6 +1809,10 @@ msgstr "" "gebruikt. Als dit niet kan worden vermeden, geef dan het argument " "allow_inefficient=True aan de constructor" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3805,6 +3805,10 @@ msgstr "druk bootknop in bij opstarten.\n" msgid "pressing both buttons at start up.\n" msgstr "druk beide knoppen in bij opstarten.\n" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" @@ -4307,6 +4311,9 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "Group full" +#~ msgstr "Groep is vol" + #~ msgid "bits must be 7, 8 or 9" #~ msgstr "bits moet 7, 8, of 9 zijn" diff --git a/locale/pl.po b/locale/pl.po index 18705581f8..b51df842fb 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -1053,10 +1053,6 @@ msgstr "" msgid "Group already used" msgstr "Grupa już używana" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Grupa pełna" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1801,6 +1797,10 @@ msgid "" "constructor" msgstr "" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "" @@ -3765,6 +3765,10 @@ msgstr "" msgid "pressing both buttons at start up.\n" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "" @@ -4266,6 +4270,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Group full" +#~ msgstr "Grupa pełna" + #~ msgid "bits must be 7, 8 or 9" #~ msgstr "bits musi być 7, 8 lub 9" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 6ba5caa29a..300e20ee76 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -1072,10 +1072,6 @@ msgstr "Falha Genérica" msgid "Group already used" msgstr "O grupo já está em uso" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Grupo cheio" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1839,6 +1835,10 @@ msgstr "" "ideal. Caso isso não possa ser evitado, passe allow_inefficient=True ao " "construtor" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "Os pinos devem compartilhar a fatia do PWM" @@ -3851,6 +3851,10 @@ msgstr "pressionando o botão de boot na inicialização.\n" msgid "pressing both buttons at start up.\n" msgstr "pressionando ambos os botões durante a inicialização.\n" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "O pull_threshold deve ser entre 1 e 32" @@ -4353,6 +4357,9 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "Group full" +#~ msgstr "Grupo cheio" + #~ msgid "In buffer elements must be 4 bytes long or less" #~ msgstr "No buffer, os elementos devem ter 4 bytes ou menos" diff --git a/locale/sv.po b/locale/sv.po index 8fe6a7dd56..3d1d40515c 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -1059,10 +1059,6 @@ msgstr "Generiskt fel" msgid "Group already used" msgstr "Grupp används redan" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Gruppen är full" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1819,6 +1815,10 @@ msgstr "" "%d byte. Om detta inte kan undvikas, skicka allow_inefficient=True till " "konstruktorn" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "Pinnar måste dela PWM-segment" @@ -3808,6 +3808,10 @@ msgstr "trycka på startknappen vid start.\n" msgid "pressing both buttons at start up.\n" msgstr "trycka båda knapparna vid uppstart.\n" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "pull_threshold måste vara mellan 1 och 32" @@ -4310,6 +4314,9 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "Group full" +#~ msgstr "Gruppen är full" + #~ msgid "In buffer elements must be 4 bytes long or less" #~ msgstr "Inbuffertelement måste vara 4 byte långa eller mindre" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 77e8fcee34..bb3e9cd585 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -1058,10 +1058,6 @@ msgstr "tōng yòng gù zhàng" msgid "Group already used" msgstr "Jítuán yǐjīng shǐyòngguò" -#: shared-module/displayio/Group.c -msgid "Group full" -msgstr "Fēnzǔ yǐ mǎn" - #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1820,6 +1816,10 @@ msgstr "" "duōzì jié. Rúguǒ wúfǎ bìmiǎn, qǐng jiāng allow_inefficient = True chuándì " "gěigòuzào hánshù" +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" msgstr "yǐn jiǎo bì xū gòng xiǎng PWM qiē piàn" @@ -3804,6 +3804,10 @@ msgstr "Zài qǐdòng shí àn qǐdòng ànniǔ.\n" msgid "pressing both buttons at start up.\n" msgstr "zài qǐdòng shí tóngshí àn xià liǎng gè ànniǔ.\n" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" msgstr "lā lì yù zhí bì xū jiè yú 1 hé 32 zhī jiān" @@ -4306,6 +4310,9 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "Group full" +#~ msgstr "Fēnzǔ yǐ mǎn" + #~ msgid "In buffer elements must be 4 bytes long or less" #~ msgstr "" #~ "zài huǎn chōng yuán jiàn zhōng bì xū shì 4 zì jié cháng huò gèng shǎo" From be90fa80e849573c3201ab6b5d655292788e3b1e Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Tue, 9 Mar 2021 10:48:33 -0500 Subject: [PATCH 36/49] Initial Changes --- ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c b/ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c index 84642d4048..53cbe854fd 100644 --- a/ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c +++ b/ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c @@ -58,6 +58,10 @@ void common_hal_i2cperipheral_i2c_peripheral_construct(i2cperipheral_i2c_periphe samd_peripherals_sercom_clock_init(sercom, sercom_index); +#ifdef SAM_D5X_E5X + sercom->I2CS.CTRLC.bit.SDASETUP = 0x08; +#endif + sercom->I2CS.CTRLA.bit.SWRST = 1; while (sercom->I2CS.CTRLA.bit.SWRST || sercom->I2CS.SYNCBUSY.bit.SWRST) {} From c6eb3f98be0fca671b6bbb21de27faa059f86a71 Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Tue, 9 Mar 2021 13:55:20 -0300 Subject: [PATCH 37/49] Fixing build.yml --- README.rst | 8 +- locale/es.po | 16 +- .../boards/8086_commander/mpconfigboard.mk | 1 - .../aloriumtech_evo_m51/mpconfigboard.mk | 1 - .../boards/bdmicro_vina_d21/mpconfigboard.mk | 1 - .../boards/bdmicro_vina_d51/mpconfigboard.mk | 1 - .../capablerobot_usbhub/mpconfigboard.mk | 1 - .../circuitbrains_basic_m0/mpconfigboard.mk | 1 - .../circuitbrains_deluxe_m4/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../boards/cp32-m4/mpconfigboard.mk | 1 - .../cp_sapling_m0_spiflash/mpconfigboard.mk | 1 - .../boards/datalore_ip_m4/mpconfigboard.mk | 1 - .../boards/dynalora_usb/mpconfigboard.mk | 1 - .../boards/dynossat_edu_eps/mpconfigboard.mk | 1 - .../boards/dynossat_edu_obc/mpconfigboard.mk | 1 - .../feather_m0_express/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../feather_m0_supersized/mpconfigboard.mk | 1 - .../boards/feather_m4_can/mpconfigboard.mk | 1 - .../feather_m4_express/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../grandcentral_m4_express/mpconfigboard.mk | 1 - .../hallowing_m0_express/mpconfigboard.mk | 1 - .../hallowing_m4_express/mpconfigboard.mk | 1 - .../itsybitsy_m0_express/mpconfigboard.mk | 1 - .../itsybitsy_m4_express/mpconfigboard.mk | 1 - .../boards/matrixportal_m4/mpconfigboard.mk | 1 - .../boards/metro_m0_express/mpconfigboard.mk | 1 - .../metro_m4_airlift_lite/mpconfigboard.mk | 1 - .../boards/metro_m4_express/mpconfigboard.mk | 1 - .../boards/mini_sam_m4/mpconfigboard.mk | 1 - .../boards/monster_m4sk/mpconfigboard.mk | 1 - .../boards/nfc_copy_cat/mpconfigboard.mk | 1 - .../boards/openbook_m4/mpconfigboard.mk | 1 - .../boards/pybadge/mpconfigboard.mk | 1 - .../boards/pybadge_airlift/mpconfigboard.mk | 1 - .../boards/pycubed/mpconfigboard.mk | 1 - .../boards/pycubed_mram/mpconfigboard.mk | 1 - .../boards/pygamer/mpconfigboard.mk | 1 - .../boards/pygamer_advance/mpconfigboard.mk | 1 - .../boards/pyportal/mpconfigboard.mk | 1 - .../boards/pyportal_titano/mpconfigboard.mk | 1 - .../boards/qtpy_m0_haxpress/mpconfigboard.mk | 1 - .../boards/robohatmm1_m4/mpconfigboard.mk | 1 - .../boards/same54_xplained/mpconfigboard.mk | 1 - .../seeeduino_wio_terminal/mpconfigboard.mk | 1 - .../boards/serpente/mpconfigboard.mk | 1 - .../silicognition-m4-shim/mpconfigboard.mk | 1 - .../boards/snekboard/mpconfigboard.mk | 1 - .../sparkfun_lumidrive/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../sparkfun_redboard_turbo/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../stackrduino_m0_pro/mpconfigboard.mk | 1 - .../stringcar_m0_express/mpconfigboard.mk | 1 - .../trellis_m4_express/mpconfigboard.mk | 1 - .../trinket_m0_haxpress/mpconfigboard.mk | 1 - .../boards/uartlogger2/mpconfigboard.mk | 1 - .../boards/ugame10/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../boards/winterbloom_sol/mpconfigboard.mk | 1 - ports/atmel-samd/mpconfigport.mk | 1 + ports/nrf/boards/TG-Watch/mpconfigboard.mk | 1 - .../aramcon_badge_2019/mpconfigboard.mk | 1 - ports/nrf/boards/bastble/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../clue_nrf52840_express/mpconfigboard.mk | 1 - .../feather_bluefruit_sense/mpconfigboard.mk | 1 - .../feather_nrf52840_express/mpconfigboard.mk | 1 - .../nrf/boards/hiibot_bluefi/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../makerdiary_m60_keyboard/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../makerdiary_nrf52840_mdk/mpconfigboard.mk | 1 - .../metro_nrf52840_express/mpconfigboard.mk | 1 - .../nrf/boards/ohs2020_badge/mpconfigboard.mk | 1 - .../boards/particle_argon/mpconfigboard.mk | 1 - .../boards/particle_boron/mpconfigboard.mk | 1 - .../boards/particle_xenon/mpconfigboard.mk | 1 - ports/nrf/boards/pca10056/mpconfigboard.mk | 1 - ports/nrf/boards/pitaya_go/mpconfigboard.mk | 1 - ports/nrf/boards/simmel/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../mpconfigboard.mk | 1 - .../stm/boards/meowbit_v121/mpconfigboard.mk | 1 - ports/stm/boards/pyb_nano_v2/mpconfigboard.mk | 1 - .../stm32f411ce_blackpill/mpconfigboard.mk | 1 - .../mpconfigboard.mk | 3 +- .../stm32f412zg_discovery/mpconfigboard.mk | 1 - .../boards/thunderpack_v12/mpconfigboard.mk | 1 - py/circuitpy_mpconfig.h | 3 +- py/circuitpy_mpconfig.mk | 3 + py/mpconfig.h | 8 + py/vm.c | 12 +- py/vmentrytable.h | 164 +++++++++--------- shared-bindings/countio/Counter.c | 3 +- shared-bindings/nvm/ByteArray.c | 3 +- shared-bindings/usb_cdc/Serial.c | 35 +++- shared-module/displayio/Bitmap.c | 125 ++++++++----- supervisor/flash.h | 2 +- supervisor/flash_root_pointers.h | 2 +- .../shared/external_flash/external_flash.c | 3 +- supervisor/shared/flash.c | 2 + supervisor/supervisor.mk | 1 - 107 files changed, 246 insertions(+), 237 deletions(-) diff --git a/README.rst b/README.rst index f14cf41ff3..27e420e845 100644 --- a/README.rst +++ b/README.rst @@ -113,10 +113,9 @@ Behavior - ``code.py`` (or ``main.py``) is run after every reload until it finishes or is interrupted. After it is done running, the vm and hardware is reinitialized. **This means you cannot read state from** - ``code.py`` **in the REPL anymore.** CircuitPython's goal for this + ``code.py`` **in the REPL anymore, as the REPL is a fresh vm.** CircuitPython's goal for this change includes reducing confusion about pins and memory being used. -- After ``code.py`` the REPL can be entered by pressing any key. It no - longer shares state with ``code.py`` so it is a fresh vm. +- After the main code is finished the REPL can be entered by pressing any key. - Autoreload state will be maintained across reload. - Adds a safe mode that does not run user code after a hard crash or brown out. The hope is that this will make it easier to fix code that @@ -126,8 +125,7 @@ Behavior - RGB status LED indicating CircuitPython state, and errors through a sequence of colored flashes. - Re-runs ``code.py`` or other main file after file system writes over USB mass storage. (Disable with ``supervisor.disable_autoreload()``) -- Entering the REPL after the main code is finished requires a key press which enters the REPL and - disables autoreload. +- Autoreload is disabled while the REPL is active. - Main is one of these: ``code.txt``, ``code.py``, ``main.py``, ``main.txt`` - Boot is one of these: ``settings.txt``, ``settings.py``, ``boot.py``, diff --git a/locale/es.po b/locale/es.po index 32c3ecfa01..f3ac735960 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-02 02:24+0000\n" +"PO-Revision-Date: 2021-03-07 15:50+0000\n" "Last-Translator: Jose David M \n" "Language-Team: \n" "Language: es\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.5\n" +"X-Generator: Weblate 4.5.1\n" #: main.c msgid "" @@ -1114,7 +1114,7 @@ msgstr "IV debe tener %d bytes de longitud" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "In-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "Los elementos del búfer de entrada deben ser de una longitud <= 4 bytes" #: py/persistentcode.c msgid "" @@ -1742,7 +1742,7 @@ msgstr "Se acabaron los enchufes" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Out-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "Los elementos del búfer de salida deben ser de una longitud <= 4 bytes" #: shared-bindings/bitops/__init__.c #, c-format @@ -1771,11 +1771,11 @@ msgstr "" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice already in use" -msgstr "" +msgstr "Segmento PWM ya esta en uso" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice channel A already in use" -msgstr "" +msgstr "Segmento del PWM canal A ya esta en uso" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -1816,7 +1816,7 @@ msgstr "El pin es solo de entrada" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "Pin must be on PWM Channel B" -msgstr "" +msgstr "El pin debe estar en el PWM canal B" #: ports/atmel-samd/common-hal/countio/Counter.c msgid "Pin must support hardware interrupts" @@ -2817,7 +2817,7 @@ msgstr "circulo solo puede ser registrado con un pariente" #: shared-bindings/bitmaptools/__init__.c msgid "clip point must be (x,y) tuple" -msgstr "" +msgstr "El punto clip debe ser una tupla (x, y)" #: shared-bindings/msgpack/ExtType.c msgid "code outside range 0~127" diff --git a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk index 295d7b2aea..dc56219fe1 100644 --- a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk +++ b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ" LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/aloriumtech_evo_m51/mpconfigboard.mk b/ports/atmel-samd/boards/aloriumtech_evo_m51/mpconfigboard.mk index 34301da3f0..3b5b05020d 100644 --- a/ports/atmel-samd/boards/aloriumtech_evo_m51/mpconfigboard.mk +++ b/ports/atmel-samd/boards/aloriumtech_evo_m51/mpconfigboard.mk @@ -9,7 +9,6 @@ CHIP_VARIANT = SAMD51P19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk b/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk index 9c1d61ec7a..fea765c3f0 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk +++ b/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "MX25L51245G","GD25S512MD" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk index f1b2f4c1d9..de350f7ab0 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51N20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "MX25L51245G","GD25S512MD" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk index 62399b1cdb..9417c23025 100644 --- a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk +++ b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk index 6ea6a7211a..e01e5ca4d5 100755 --- a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk index 13ae59de46..40b5815ede 100755 --- a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, S25FL064L" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk index e8993d44d1..97434a90b8 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index 446d1177ff..d6994a4c01 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" # Turn off features and optimizations for Crickit build to make room for additional frozen libs. diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk index 1f9b98bec0..ec85666719 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" # Turn off features and optimizations for Crickit build to make room for additional frozen libs. diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk index 6eb76c182f..9f54bd1182 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q128JV_PM" # No I2S on SAMD51G. diff --git a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk index 99e13f7910..48b22b394e 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk @@ -9,7 +9,6 @@ CHIP_FAMILY = samd21 INTERNAL_FLASH_FILESYSTEM = 0 LONGINT_IMPL = MPZ SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = AT25DF081A CIRCUITPY_AUDIOIO = 0 diff --git a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk index b1dad30eb0..13e0f75c7c 100644 --- a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ, W25Q16JV_IM" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/dynalora_usb/mpconfigboard.mk b/ports/atmel-samd/boards/dynalora_usb/mpconfigboard.mk index ac14e73956..8b2ce7fbf4 100644 --- a/ports/atmel-samd/boards/dynalora_usb/mpconfigboard.mk +++ b/ports/atmel-samd/boards/dynalora_usb/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q32C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk index 2d5234f821..915270c579 100644 --- a/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk +++ b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk @@ -8,7 +8,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q32C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk index 360940cf18..8f552c5b4d 100644 --- a/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk +++ b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk @@ -8,7 +8,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q32C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk index 7d034828e1..fcf1b4a1aa 100644 --- a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk index c3938345d5..e29f3c0b29 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk index 7a80eea9b3..dd012cb487 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "S25FL064L" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk index 345ac33c5d..4c0c5137c1 100644 --- a/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAME51J19A CHIP_FAMILY = same51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk index 78959dcd07..a8b4460a6e 100644 --- a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk index 9f9bb0501e..2f4db69b45 100755 --- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMR21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk index 08eb5c98ba..cd43dd4d67 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51P20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk index 6950378d53..4661a7acd0 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk index 4bf1552884..1154d0bb1f 100644 --- a/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk index b5d22bbbfb..467c6af47a 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q16FW, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk index eb02d3c270..7a45ef21e9 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk b/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk index 44b28acbcb..41e24f1995 100644 --- a/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk index 8b17f15ea7..964d335537 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk index 58d4e49805..1e63476596 100644 --- a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk index c2603002cd..553bf14f2e 100644 --- a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk index 321ee5f476..8f4c3f8904 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q16JV_IM, W25Q16JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk index 9b242a3ffc..86a04be87f 100644 --- a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk +++ b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk b/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk index 1b4a16a08d..eb7a87feaf 100644 --- a/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk +++ b/ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk b/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk index e5fa0cd84b..85b2dd4205 100644 --- a/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk index 7a213faf4c..54f00b7448 100644 --- a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk index 5ae09294d6..a88e5e5e5b 100644 --- a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk index 09aef7d92e..1eb3cd5239 100644 --- a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q80DV LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk b/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk index 46df12c4f2..0c459c309c 100644 --- a/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = MR2xH40 LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk index 2db6786bfd..5cef7b44cf 100644 --- a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk index d001374a50..a58e016542 100644 --- a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pyportal/mpconfigboard.mk b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk index 149141a4e3..e8c27ecbf1 100644 --- a/ports/atmel-samd/boards/pyportal/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk index dbc2d5ae99..c9ffd09549 100644 --- a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk b/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk index cf982cb8fc..a88bea91de 100644 --- a/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk +++ b/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk @@ -9,7 +9,6 @@ CHIP_FAMILY = samd21 INTERNAL_FLASH_FILESYSTEM = 0 LONGINT_IMPL = MPZ SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C CIRCUITPY_AUDIOBUSIO = 0 diff --git a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk index 470e4d9dc4..e964d65d5e 100644 --- a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk @@ -9,7 +9,6 @@ CHIP_FAMILY = samd51 #QSPI_FLASH_FILESYSTEM = 0 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk b/ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk index e4472e05d6..53aac7df2a 100644 --- a/ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk +++ b/ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAME54P20A CHIP_FAMILY = same54 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "N25Q256A" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk b/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk index f57e016b4e..7163568374 100644 --- a/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk +++ b/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51P19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/serpente/mpconfigboard.mk b/ports/atmel-samd/boards/serpente/mpconfigboard.mk index e024736c95..32ba32f386 100644 --- a/ports/atmel-samd/boards/serpente/mpconfigboard.mk +++ b/ports/atmel-samd/boards/serpente/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q32C LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk b/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk index bf88cd52d0..e64045f13a 100644 --- a/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk +++ b/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk index 72c98867e2..90bc6076f7 100644 --- a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk +++ b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk index 29579904a2..197dea6fe2 100755 --- a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32FV" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk index dd01c9985b..7c2fd57ea1 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32FV" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk index 6db5596ba3..a5cd49239e 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32FV" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/mpconfigboard.mk index 567f1db205..e33035d949 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/mpconfigboard.mk @@ -8,7 +8,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = AT25SF041A LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk b/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk index 12c35d2f9d..ee3f21b05a 100644 --- a/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk index 0f43ab8002..91644386f2 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk @@ -8,7 +8,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = AT25SF161 LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk index ee82b99c90..59a40d3dcc 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk index f3afa61a8f..8c9dc71699 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q32BV LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk b/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk index 498429c9e8..373cbba99c 100644 --- a/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk +++ b/ports/atmel-samd/boards/uartlogger2/mpconfigboard.mk @@ -7,6 +7,5 @@ CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk index d1ada64293..74f438b714 100644 --- a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk +++ b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk @@ -7,7 +7,6 @@ CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = S25FL216K LONGINT_IMPL = NONE diff --git a/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk index 5062200e1f..1c96e1d235 100644 --- a/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk @@ -9,7 +9,6 @@ CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "GD25Q16C, GD25Q64C" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk index e8f94a2902..ce9c2585f9 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk @@ -11,7 +11,6 @@ CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "GD25Q64C, W25Q32JV_IQ" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index c77bf83f1e..7be9e203a8 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -36,6 +36,7 @@ CIRCUITPY_AUDIOMIXER ?= 0 CIRCUITPY_BINASCII ?= 0 CIRCUITPY_AUDIOMP3 ?= 0 CIRCUITPY_BUILTINS_POW3 ?= 0 +CIRCUITPY_COMPUTED_GOTO_SAVE_SPACE ?= 1 CIRCUITPY_FREQUENCYIO ?= 0 CIRCUITPY_JSON ?= 0 CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1 diff --git a/ports/nrf/boards/TG-Watch/mpconfigboard.mk b/ports/nrf/boards/TG-Watch/mpconfigboard.mk index f1aac6d71e..8407d84877 100644 --- a/ports/nrf/boards/TG-Watch/mpconfigboard.mk +++ b/ports/nrf/boards/TG-Watch/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "TG-Techie" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q128JV_SQ" FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice diff --git a/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk b/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk index 09252ab4b7..06cd9633d1 100644 --- a/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk +++ b/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "ARAMCON Badge Team" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" CIRCUITPY_DISPLAYIO = 1 diff --git a/ports/nrf/boards/bastble/mpconfigboard.mk b/ports/nrf/boards/bastble/mpconfigboard.mk index eca900de77..417c993589 100644 --- a/ports/nrf/boards/bastble/mpconfigboard.mk +++ b/ports/nrf/boards/bastble/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "ElectronicCats" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk index 6b5c0424f9..bc00790376 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk index 16cb208247..f94e49e473 100644 --- a/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/clue_nrf52840_express/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk b/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk index 5813e6136b..6d0c13e454 100644 --- a/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk +++ b/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk index 84861a1f0b..b291203e2f 100644 --- a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk b/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk index d601243486..c85b978944 100644 --- a/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk +++ b/ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "HiiBot" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q16JV_IQ" diff --git a/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk index d5587f4b94..57b39b512b 100644 --- a/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk @@ -9,5 +9,4 @@ MCU_CHIP = nrf52840 CIRCUITPY_BITBANG_APA102 = 1 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.mk b/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.mk index fc630e5bbe..e7547af717 100644 --- a/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.mk +++ b/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "Makerdiary" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25R6435F" CIRCUITPY_ENABLE_MPY_NATIVE = 1 diff --git a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/mpconfigboard.mk b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/mpconfigboard.mk index 4e6aebc8e8..cd19c25b1d 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/mpconfigboard.mk +++ b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "Makerdiary" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25R6435F" CIRCUITPY_ENABLE_MPY_NATIVE = 1 diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk b/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk index d69bc82357..7da9ed1896 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "makerdiary" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25R6435F" diff --git a/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk index b972bcbed7..ef0992a742 100644 --- a/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "Adafruit Industries LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" CIRCUITPY__EVE = 1 diff --git a/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk b/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk index 7d2c6de987..2e6e885f55 100644 --- a/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk +++ b/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "OSHWA" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ" diff --git a/ports/nrf/boards/particle_argon/mpconfigboard.mk b/ports/nrf/boards/particle_argon/mpconfigboard.mk index f8d3d2aca2..eaed5527c1 100644 --- a/ports/nrf/boards/particle_argon/mpconfigboard.mk +++ b/ports/nrf/boards/particle_argon/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Particle" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25L3233F" diff --git a/ports/nrf/boards/particle_boron/mpconfigboard.mk b/ports/nrf/boards/particle_boron/mpconfigboard.mk index eada97a730..26fe7b83db 100644 --- a/ports/nrf/boards/particle_boron/mpconfigboard.mk +++ b/ports/nrf/boards/particle_boron/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Particle" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25L3233F" diff --git a/ports/nrf/boards/particle_xenon/mpconfigboard.mk b/ports/nrf/boards/particle_xenon/mpconfigboard.mk index 6062da378f..0722c4ac65 100644 --- a/ports/nrf/boards/particle_xenon/mpconfigboard.mk +++ b/ports/nrf/boards/particle_xenon/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Particle" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25L3233F" diff --git a/ports/nrf/boards/pca10056/mpconfigboard.mk b/ports/nrf/boards/pca10056/mpconfigboard.mk index f24e6f6670..48f68a30ae 100644 --- a/ports/nrf/boards/pca10056/mpconfigboard.mk +++ b/ports/nrf/boards/pca10056/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "Nordic Semiconductor" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25R6435F" diff --git a/ports/nrf/boards/pitaya_go/mpconfigboard.mk b/ports/nrf/boards/pitaya_go/mpconfigboard.mk index 247ddd8ac5..14e2108b78 100644 --- a/ports/nrf/boards/pitaya_go/mpconfigboard.mk +++ b/ports/nrf/boards/pitaya_go/mpconfigboard.mk @@ -7,5 +7,4 @@ USB_MANUFACTURER = "Makerdiary" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "MX25R6435F" diff --git a/ports/nrf/boards/simmel/mpconfigboard.mk b/ports/nrf/boards/simmel/mpconfigboard.mk index 283e3d1690..005ec8af2f 100644 --- a/ports/nrf/boards/simmel/mpconfigboard.mk +++ b/ports/nrf/boards/simmel/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "Betrusted" MCU_CHIP = nrf52833 # SPI_FLASH_FILESYSTEM = 1 -# EXTERNAL_FLASH_DEVICE_COUNT = 1 # EXTERNAL_FLASH_DEVICES = "MX25R1635F" INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/mpconfigboard.mk b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/mpconfigboard.mk index e8bd636ad9..7808b16575 100644 --- a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/mpconfigboard.mk +++ b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/mpconfigboard.mk @@ -6,5 +6,4 @@ USB_MANUFACTURER = "TinkeringTech LLC" MCU_CHIP = nrf52840 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk index 4d0bd4598d..39bf7dc542 100644 --- a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk +++ b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "Feather STM32F405 Express" USB_MANUFACTURER = "Adafruit Industries LLC" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C MCU_SERIES = F4 diff --git a/ports/stm/boards/meowbit_v121/mpconfigboard.mk b/ports/stm/boards/meowbit_v121/mpconfigboard.mk index 86b0cb5ab4..45a04a3a77 100644 --- a/ports/stm/boards/meowbit_v121/mpconfigboard.mk +++ b/ports/stm/boards/meowbit_v121/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "Meowbit" USB_MANUFACTURER = "Kittenbot" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q16JV_IQ # INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk index 237dba921e..cff8eea705 100644 --- a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk +++ b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "PYB LR Nano V2" USB_MANUFACTURER = "MicroPython Chinese Community" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q64JV_IQ MCU_SERIES = F4 diff --git a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk index 9b45a0fac7..1d533e30f3 100644 --- a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "stm32f411ce blackpill" USB_MANUFACTURER = "Unknown" # SPI_FLASH_FILESYSTEM = 1 -# EXTERNAL_FLASH_DEVICE_COUNT = 1 # EXTERNAL_FLASH_DEVICES = xxxxxx #See supervisor/shared/external_flash/devices.h for options # LONGINT_IMPL = MPZ diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk index 9a95a3539c..f6fd423271 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk @@ -4,9 +4,8 @@ USB_PRODUCT = "stm32f411ce blackpill with flash" USB_MANUFACTURER = "Unknown" SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 #See supervisor/shared/external_flash/devices.h for options -EXTERNAL_FLASH_DEVICES = W25Q64FV,W25Q64JV_IQ +EXTERNAL_FLASH_DEVICES = GD25Q16C,W25Q64FV,W25Q64JV_IQ LONGINT_IMPL = MPZ INTERNAL_FLASH_FILESYSTEM = 0 diff --git a/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk index 28874f9c6c..b50cdb966f 100644 --- a/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk +++ b/ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk @@ -6,7 +6,6 @@ USB_MANUFACTURER = "STMicroelectronics" INTERNAL_FLASH_FILESYSTEM = 1 # QSPI_FLASH_FILESYSTEM = 1 -# EXTERNAL_FLASH_DEVICE_COUNT = 1 # EXTERNAL_FLASH_DEVICES = N25Q128A # LONGINT_IMPL = MPZ diff --git a/ports/stm/boards/thunderpack_v12/mpconfigboard.mk b/ports/stm/boards/thunderpack_v12/mpconfigboard.mk index 4436f04b77..1c09fe64c1 100644 --- a/ports/stm/boards/thunderpack_v12/mpconfigboard.mk +++ b/ports/stm/boards/thunderpack_v12/mpconfigboard.mk @@ -9,7 +9,6 @@ CIRCUITPY_USB_HID = 0 LONGINT_IMPL = NONE SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C CIRCUITPY_NVM = 1 diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 3eda3b0049..0cddcb83e3 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -75,6 +75,7 @@ #define MICROPY_MODULE_BUILTIN_INIT (1) #define MICROPY_NONSTANDARD_TYPECODES (0) #define MICROPY_OPT_COMPUTED_GOTO (1) +#define MICROPY_OPT_COMPUTED_GOTO_SAVE_SPACE (CIRCUITPY_COMPUTED_GOTO_SAVE_SPACE) #define MICROPY_PERSISTENT_CODE_LOAD (1) #define MICROPY_PY_ARRAY (1) @@ -132,7 +133,7 @@ #define MICROPY_FATFS_LFN_CODE_PAGE (437) #define MICROPY_FATFS_USE_LABEL (1) #define MICROPY_FATFS_RPATH (2) -#define MICROPY_FATFS_MULTI_PARTITION (1) +#define MICROPY_FATFS_MULTI_PARTITION (0) // Only enable this if you really need it. It allocates a byte cache of this size. // #define MICROPY_FATFS_MAX_SS (4096) diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index a5b0ed8a44..496ce918ba 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -130,6 +130,9 @@ CFLAGS += -DCIRCUITPY_CANIO=$(CIRCUITPY_CANIO) CIRCUITPY_DIGITALIO ?= 1 CFLAGS += -DCIRCUITPY_DIGITALIO=$(CIRCUITPY_DIGITALIO) +CIRCUITPY_COMPUTED_GOTO_SAVE_SPACE ?= 0 +CFLAGS += -DCIRCUITPY_COMPUTED_GOTO_SAVE_SPACE=$(CIRCUITPY_COMPUTED_GOTO_SAVE_SPACE) + CIRCUITPY_COUNTIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_COUNTIO=$(CIRCUITPY_COUNTIO) diff --git a/py/mpconfig.h b/py/mpconfig.h index 034d39d409..1f6f96bd15 100755 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -413,6 +413,14 @@ #define MICROPY_OPT_COMPUTED_GOTO (0) #endif +// Whether to save trade flash space for speed in MICROPY_OPT_COMPUTED_GOTO. +// Costs about 3% speed, saves about 1500 bytes space. In addition to the assumptions +// of MICROPY_OPT_COMPUTED_GOTO, also assumes that mp_execute_bytecode is less than +// 32kB in size. +#ifndef MICROPY_OPT_COMPUTED_GOTO_SAVE_SPACE +#define MICROPY_OPT_COMPUTED_GOTO_SAVE_SPACE (0) +#endif + // Whether to cache result of map lookups in LOAD_NAME, LOAD_GLOBAL, LOAD_ATTR, // STORE_ATTR bytecodes. Uses 1 byte extra RAM for each of these opcodes and // uses a bit of extra code ROM, but greatly improves lookup speed. diff --git a/py/vm.c b/py/vm.c index 13a9980aad..890b5f26f4 100644 --- a/py/vm.c +++ b/py/vm.c @@ -129,11 +129,21 @@ mp_vm_return_kind_t PLACE_IN_ITCM(mp_execute_bytecode)(mp_code_state_t *code_sta #endif #if MICROPY_OPT_COMPUTED_GOTO #include "py/vmentrytable.h" +#if MICROPY_OPT_COMPUTED_GOTO_SAVE_SPACE + #define ONE_TRUE_DISPATCH() one_true_dispatch: do { \ + TRACE(ip); \ + MARK_EXC_IP_GLOBAL(); \ + goto *(void*)((char*)&&entry_MP_BC_LOAD_CONST_FALSE + entry_table[*ip++]); \ + } while (0) + #define DISPATCH() do { goto one_true_dispatch; } while(0) +#else #define DISPATCH() do { \ TRACE(ip); \ MARK_EXC_IP_GLOBAL(); \ goto *entry_table[*ip++]; \ } while (0) + #define ONE_TRUE_DISPATCH() DISPATCH() +#endif #define DISPATCH_WITH_PEND_EXC_CHECK() goto pending_exception_check #define ENTRY(op) entry_##op #define ENTRY_DEFAULT entry_default @@ -199,7 +209,7 @@ outer_dispatch_loop: for (;;) { dispatch_loop: #if MICROPY_OPT_COMPUTED_GOTO - DISPATCH(); + ONE_TRUE_DISPATCH(); #else TRACE(ip); MARK_EXC_IP_GLOBAL(); diff --git a/py/vmentrytable.h b/py/vmentrytable.h index e01199eee2..31832bb580 100644 --- a/py/vmentrytable.h +++ b/py/vmentrytable.h @@ -31,88 +31,96 @@ #include "supervisor/linker.h" -static const void *const PLACE_IN_DTCM_DATA(entry_table[256]) = { - [0 ... 255] = &&entry_default, - [MP_BC_LOAD_CONST_FALSE] = &&entry_MP_BC_LOAD_CONST_FALSE, - [MP_BC_LOAD_CONST_NONE] = &&entry_MP_BC_LOAD_CONST_NONE, - [MP_BC_LOAD_CONST_TRUE] = &&entry_MP_BC_LOAD_CONST_TRUE, - [MP_BC_LOAD_CONST_SMALL_INT] = &&entry_MP_BC_LOAD_CONST_SMALL_INT, - [MP_BC_LOAD_CONST_STRING] = &&entry_MP_BC_LOAD_CONST_STRING, - [MP_BC_LOAD_CONST_OBJ] = &&entry_MP_BC_LOAD_CONST_OBJ, - [MP_BC_LOAD_NULL] = &&entry_MP_BC_LOAD_NULL, - [MP_BC_LOAD_FAST_N] = &&entry_MP_BC_LOAD_FAST_N, - [MP_BC_LOAD_DEREF] = &&entry_MP_BC_LOAD_DEREF, - [MP_BC_LOAD_NAME] = &&entry_MP_BC_LOAD_NAME, - [MP_BC_LOAD_GLOBAL] = &&entry_MP_BC_LOAD_GLOBAL, - [MP_BC_LOAD_ATTR] = &&entry_MP_BC_LOAD_ATTR, - [MP_BC_LOAD_METHOD] = &&entry_MP_BC_LOAD_METHOD, - [MP_BC_LOAD_SUPER_METHOD] = &&entry_MP_BC_LOAD_SUPER_METHOD, - [MP_BC_LOAD_BUILD_CLASS] = &&entry_MP_BC_LOAD_BUILD_CLASS, - [MP_BC_LOAD_SUBSCR] = &&entry_MP_BC_LOAD_SUBSCR, - [MP_BC_STORE_FAST_N] = &&entry_MP_BC_STORE_FAST_N, - [MP_BC_STORE_DEREF] = &&entry_MP_BC_STORE_DEREF, - [MP_BC_STORE_NAME] = &&entry_MP_BC_STORE_NAME, - [MP_BC_STORE_GLOBAL] = &&entry_MP_BC_STORE_GLOBAL, - [MP_BC_STORE_ATTR] = &&entry_MP_BC_STORE_ATTR, - [MP_BC_STORE_SUBSCR] = &&entry_MP_BC_STORE_SUBSCR, - [MP_BC_DELETE_FAST] = &&entry_MP_BC_DELETE_FAST, - [MP_BC_DELETE_DEREF] = &&entry_MP_BC_DELETE_DEREF, - [MP_BC_DELETE_NAME] = &&entry_MP_BC_DELETE_NAME, - [MP_BC_DELETE_GLOBAL] = &&entry_MP_BC_DELETE_GLOBAL, - [MP_BC_DUP_TOP] = &&entry_MP_BC_DUP_TOP, - [MP_BC_DUP_TOP_TWO] = &&entry_MP_BC_DUP_TOP_TWO, - [MP_BC_POP_TOP] = &&entry_MP_BC_POP_TOP, - [MP_BC_ROT_TWO] = &&entry_MP_BC_ROT_TWO, - [MP_BC_ROT_THREE] = &&entry_MP_BC_ROT_THREE, - [MP_BC_JUMP] = &&entry_MP_BC_JUMP, - [MP_BC_POP_JUMP_IF_TRUE] = &&entry_MP_BC_POP_JUMP_IF_TRUE, - [MP_BC_POP_JUMP_IF_FALSE] = &&entry_MP_BC_POP_JUMP_IF_FALSE, - [MP_BC_JUMP_IF_TRUE_OR_POP] = &&entry_MP_BC_JUMP_IF_TRUE_OR_POP, - [MP_BC_JUMP_IF_FALSE_OR_POP] = &&entry_MP_BC_JUMP_IF_FALSE_OR_POP, - [MP_BC_SETUP_WITH] = &&entry_MP_BC_SETUP_WITH, - [MP_BC_WITH_CLEANUP] = &&entry_MP_BC_WITH_CLEANUP, - [MP_BC_UNWIND_JUMP] = &&entry_MP_BC_UNWIND_JUMP, - [MP_BC_SETUP_EXCEPT] = &&entry_MP_BC_SETUP_EXCEPT, - [MP_BC_SETUP_FINALLY] = &&entry_MP_BC_SETUP_FINALLY, - [MP_BC_END_FINALLY] = &&entry_MP_BC_END_FINALLY, - [MP_BC_GET_ITER] = &&entry_MP_BC_GET_ITER, - [MP_BC_GET_ITER_STACK] = &&entry_MP_BC_GET_ITER_STACK, - [MP_BC_FOR_ITER] = &&entry_MP_BC_FOR_ITER, - [MP_BC_POP_BLOCK] = &&entry_MP_BC_POP_BLOCK, - [MP_BC_POP_EXCEPT] = &&entry_MP_BC_POP_EXCEPT, - [MP_BC_BUILD_TUPLE] = &&entry_MP_BC_BUILD_TUPLE, - [MP_BC_BUILD_LIST] = &&entry_MP_BC_BUILD_LIST, - [MP_BC_BUILD_MAP] = &&entry_MP_BC_BUILD_MAP, - [MP_BC_STORE_MAP] = &&entry_MP_BC_STORE_MAP, +#if MICROPY_OPT_COMPUTED_GOTO_SAVE_SPACE +#define COMPUTE_ENTRY(x) ((char*)(x) - (char*)&&entry_MP_BC_LOAD_CONST_FALSE) +typedef int16_t entry_table_type; +#else +#define COMPUTE_ENTRY(x) (x) +typedef void *entry_table_type; +#endif + +static entry_table_type const PLACE_IN_DTCM_DATA(entry_table[256]) = { + [0 ... 255] = COMPUTE_ENTRY(&&entry_default), + [MP_BC_LOAD_CONST_FALSE] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_CONST_FALSE), + [MP_BC_LOAD_CONST_NONE] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_CONST_NONE), + [MP_BC_LOAD_CONST_TRUE] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_CONST_TRUE), + [MP_BC_LOAD_CONST_SMALL_INT] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_CONST_SMALL_INT), + [MP_BC_LOAD_CONST_STRING] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_CONST_STRING), + [MP_BC_LOAD_CONST_OBJ] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_CONST_OBJ), + [MP_BC_LOAD_NULL] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_NULL), + [MP_BC_LOAD_FAST_N] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_FAST_N), + [MP_BC_LOAD_DEREF] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_DEREF), + [MP_BC_LOAD_NAME] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_NAME), + [MP_BC_LOAD_GLOBAL] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_GLOBAL), + [MP_BC_LOAD_ATTR] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_ATTR), + [MP_BC_LOAD_METHOD] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_METHOD), + [MP_BC_LOAD_SUPER_METHOD] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_SUPER_METHOD), + [MP_BC_LOAD_BUILD_CLASS] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_BUILD_CLASS), + [MP_BC_LOAD_SUBSCR] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_SUBSCR), + [MP_BC_STORE_FAST_N] = COMPUTE_ENTRY(&&entry_MP_BC_STORE_FAST_N), + [MP_BC_STORE_DEREF] = COMPUTE_ENTRY(&&entry_MP_BC_STORE_DEREF), + [MP_BC_STORE_NAME] = COMPUTE_ENTRY(&&entry_MP_BC_STORE_NAME), + [MP_BC_STORE_GLOBAL] = COMPUTE_ENTRY(&&entry_MP_BC_STORE_GLOBAL), + [MP_BC_STORE_ATTR] = COMPUTE_ENTRY(&&entry_MP_BC_STORE_ATTR), + [MP_BC_STORE_SUBSCR] = COMPUTE_ENTRY(&&entry_MP_BC_STORE_SUBSCR), + [MP_BC_DELETE_FAST] = COMPUTE_ENTRY(&&entry_MP_BC_DELETE_FAST), + [MP_BC_DELETE_DEREF] = COMPUTE_ENTRY(&&entry_MP_BC_DELETE_DEREF), + [MP_BC_DELETE_NAME] = COMPUTE_ENTRY(&&entry_MP_BC_DELETE_NAME), + [MP_BC_DELETE_GLOBAL] = COMPUTE_ENTRY(&&entry_MP_BC_DELETE_GLOBAL), + [MP_BC_DUP_TOP] = COMPUTE_ENTRY(&&entry_MP_BC_DUP_TOP), + [MP_BC_DUP_TOP_TWO] = COMPUTE_ENTRY(&&entry_MP_BC_DUP_TOP_TWO), + [MP_BC_POP_TOP] = COMPUTE_ENTRY(&&entry_MP_BC_POP_TOP), + [MP_BC_ROT_TWO] = COMPUTE_ENTRY(&&entry_MP_BC_ROT_TWO), + [MP_BC_ROT_THREE] = COMPUTE_ENTRY(&&entry_MP_BC_ROT_THREE), + [MP_BC_JUMP] = COMPUTE_ENTRY(&&entry_MP_BC_JUMP), + [MP_BC_POP_JUMP_IF_TRUE] = COMPUTE_ENTRY(&&entry_MP_BC_POP_JUMP_IF_TRUE), + [MP_BC_POP_JUMP_IF_FALSE] = COMPUTE_ENTRY(&&entry_MP_BC_POP_JUMP_IF_FALSE), + [MP_BC_JUMP_IF_TRUE_OR_POP] = COMPUTE_ENTRY(&&entry_MP_BC_JUMP_IF_TRUE_OR_POP), + [MP_BC_JUMP_IF_FALSE_OR_POP] = COMPUTE_ENTRY(&&entry_MP_BC_JUMP_IF_FALSE_OR_POP), + [MP_BC_SETUP_WITH] = COMPUTE_ENTRY(&&entry_MP_BC_SETUP_WITH), + [MP_BC_WITH_CLEANUP] = COMPUTE_ENTRY(&&entry_MP_BC_WITH_CLEANUP), + [MP_BC_UNWIND_JUMP] = COMPUTE_ENTRY(&&entry_MP_BC_UNWIND_JUMP), + [MP_BC_SETUP_EXCEPT] = COMPUTE_ENTRY(&&entry_MP_BC_SETUP_EXCEPT), + [MP_BC_SETUP_FINALLY] = COMPUTE_ENTRY(&&entry_MP_BC_SETUP_FINALLY), + [MP_BC_END_FINALLY] = COMPUTE_ENTRY(&&entry_MP_BC_END_FINALLY), + [MP_BC_GET_ITER] = COMPUTE_ENTRY(&&entry_MP_BC_GET_ITER), + [MP_BC_GET_ITER_STACK] = COMPUTE_ENTRY(&&entry_MP_BC_GET_ITER_STACK), + [MP_BC_FOR_ITER] = COMPUTE_ENTRY(&&entry_MP_BC_FOR_ITER), + [MP_BC_POP_BLOCK] = COMPUTE_ENTRY(&&entry_MP_BC_POP_BLOCK), + [MP_BC_POP_EXCEPT] = COMPUTE_ENTRY(&&entry_MP_BC_POP_EXCEPT), + [MP_BC_BUILD_TUPLE] = COMPUTE_ENTRY(&&entry_MP_BC_BUILD_TUPLE), + [MP_BC_BUILD_LIST] = COMPUTE_ENTRY(&&entry_MP_BC_BUILD_LIST), + [MP_BC_BUILD_MAP] = COMPUTE_ENTRY(&&entry_MP_BC_BUILD_MAP), + [MP_BC_STORE_MAP] = COMPUTE_ENTRY(&&entry_MP_BC_STORE_MAP), #if MICROPY_PY_BUILTINS_SET - [MP_BC_BUILD_SET] = &&entry_MP_BC_BUILD_SET, + [MP_BC_BUILD_SET] = COMPUTE_ENTRY(&&entry_MP_BC_BUILD_SET), #endif #if MICROPY_PY_BUILTINS_SLICE - [MP_BC_BUILD_SLICE] = &&entry_MP_BC_BUILD_SLICE, + [MP_BC_BUILD_SLICE] = COMPUTE_ENTRY(&&entry_MP_BC_BUILD_SLICE), #endif - [MP_BC_STORE_COMP] = &&entry_MP_BC_STORE_COMP, - [MP_BC_UNPACK_SEQUENCE] = &&entry_MP_BC_UNPACK_SEQUENCE, - [MP_BC_UNPACK_EX] = &&entry_MP_BC_UNPACK_EX, - [MP_BC_MAKE_FUNCTION] = &&entry_MP_BC_MAKE_FUNCTION, - [MP_BC_MAKE_FUNCTION_DEFARGS] = &&entry_MP_BC_MAKE_FUNCTION_DEFARGS, - [MP_BC_MAKE_CLOSURE] = &&entry_MP_BC_MAKE_CLOSURE, - [MP_BC_MAKE_CLOSURE_DEFARGS] = &&entry_MP_BC_MAKE_CLOSURE_DEFARGS, - [MP_BC_CALL_FUNCTION] = &&entry_MP_BC_CALL_FUNCTION, - [MP_BC_CALL_FUNCTION_VAR_KW] = &&entry_MP_BC_CALL_FUNCTION_VAR_KW, - [MP_BC_CALL_METHOD] = &&entry_MP_BC_CALL_METHOD, - [MP_BC_CALL_METHOD_VAR_KW] = &&entry_MP_BC_CALL_METHOD_VAR_KW, - [MP_BC_RETURN_VALUE] = &&entry_MP_BC_RETURN_VALUE, - [MP_BC_RAISE_VARARGS] = &&entry_MP_BC_RAISE_VARARGS, - [MP_BC_YIELD_VALUE] = &&entry_MP_BC_YIELD_VALUE, - [MP_BC_YIELD_FROM] = &&entry_MP_BC_YIELD_FROM, - [MP_BC_IMPORT_NAME] = &&entry_MP_BC_IMPORT_NAME, - [MP_BC_IMPORT_FROM] = &&entry_MP_BC_IMPORT_FROM, - [MP_BC_IMPORT_STAR] = &&entry_MP_BC_IMPORT_STAR, - [MP_BC_LOAD_CONST_SMALL_INT_MULTI ... MP_BC_LOAD_CONST_SMALL_INT_MULTI + 63] = &&entry_MP_BC_LOAD_CONST_SMALL_INT_MULTI, - [MP_BC_LOAD_FAST_MULTI ... MP_BC_LOAD_FAST_MULTI + 15] = &&entry_MP_BC_LOAD_FAST_MULTI, - [MP_BC_STORE_FAST_MULTI ... MP_BC_STORE_FAST_MULTI + 15] = &&entry_MP_BC_STORE_FAST_MULTI, - [MP_BC_UNARY_OP_MULTI ... MP_BC_UNARY_OP_MULTI + MP_UNARY_OP_NUM_BYTECODE - 1] = &&entry_MP_BC_UNARY_OP_MULTI, - [MP_BC_BINARY_OP_MULTI ... MP_BC_BINARY_OP_MULTI + MP_BINARY_OP_NUM_BYTECODE - 1] = &&entry_MP_BC_BINARY_OP_MULTI, + [MP_BC_STORE_COMP] = COMPUTE_ENTRY(&&entry_MP_BC_STORE_COMP), + [MP_BC_UNPACK_SEQUENCE] = COMPUTE_ENTRY(&&entry_MP_BC_UNPACK_SEQUENCE), + [MP_BC_UNPACK_EX] = COMPUTE_ENTRY(&&entry_MP_BC_UNPACK_EX), + [MP_BC_MAKE_FUNCTION] = COMPUTE_ENTRY(&&entry_MP_BC_MAKE_FUNCTION), + [MP_BC_MAKE_FUNCTION_DEFARGS] = COMPUTE_ENTRY(&&entry_MP_BC_MAKE_FUNCTION_DEFARGS), + [MP_BC_MAKE_CLOSURE] = COMPUTE_ENTRY(&&entry_MP_BC_MAKE_CLOSURE), + [MP_BC_MAKE_CLOSURE_DEFARGS] = COMPUTE_ENTRY(&&entry_MP_BC_MAKE_CLOSURE_DEFARGS), + [MP_BC_CALL_FUNCTION] = COMPUTE_ENTRY(&&entry_MP_BC_CALL_FUNCTION), + [MP_BC_CALL_FUNCTION_VAR_KW] = COMPUTE_ENTRY(&&entry_MP_BC_CALL_FUNCTION_VAR_KW), + [MP_BC_CALL_METHOD] = COMPUTE_ENTRY(&&entry_MP_BC_CALL_METHOD), + [MP_BC_CALL_METHOD_VAR_KW] = COMPUTE_ENTRY(&&entry_MP_BC_CALL_METHOD_VAR_KW), + [MP_BC_RETURN_VALUE] = COMPUTE_ENTRY(&&entry_MP_BC_RETURN_VALUE), + [MP_BC_RAISE_VARARGS] = COMPUTE_ENTRY(&&entry_MP_BC_RAISE_VARARGS), + [MP_BC_YIELD_VALUE] = COMPUTE_ENTRY(&&entry_MP_BC_YIELD_VALUE), + [MP_BC_YIELD_FROM] = COMPUTE_ENTRY(&&entry_MP_BC_YIELD_FROM), + [MP_BC_IMPORT_NAME] = COMPUTE_ENTRY(&&entry_MP_BC_IMPORT_NAME), + [MP_BC_IMPORT_FROM] = COMPUTE_ENTRY(&&entry_MP_BC_IMPORT_FROM), + [MP_BC_IMPORT_STAR] = COMPUTE_ENTRY(&&entry_MP_BC_IMPORT_STAR), + [MP_BC_LOAD_CONST_SMALL_INT_MULTI ... MP_BC_LOAD_CONST_SMALL_INT_MULTI + 63] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_CONST_SMALL_INT_MULTI), + [MP_BC_LOAD_FAST_MULTI ... MP_BC_LOAD_FAST_MULTI + 15] = COMPUTE_ENTRY(&&entry_MP_BC_LOAD_FAST_MULTI), + [MP_BC_STORE_FAST_MULTI ... MP_BC_STORE_FAST_MULTI + 15] = COMPUTE_ENTRY(&&entry_MP_BC_STORE_FAST_MULTI), + [MP_BC_UNARY_OP_MULTI ... MP_BC_UNARY_OP_MULTI + MP_UNARY_OP_NUM_BYTECODE - 1] = COMPUTE_ENTRY(&&entry_MP_BC_UNARY_OP_MULTI), + [MP_BC_BINARY_OP_MULTI ... MP_BC_BINARY_OP_MULTI + MP_BINARY_OP_NUM_BYTECODE - 1] = COMPUTE_ENTRY(&&entry_MP_BC_BINARY_OP_MULTI), }; #ifdef __clang__ diff --git a/shared-bindings/countio/Counter.c b/shared-bindings/countio/Counter.c index e51db26440..820db5ea94 100644 --- a/shared-bindings/countio/Counter.c +++ b/shared-bindings/countio/Counter.c @@ -22,9 +22,8 @@ //| //| For example:: //| +//| import board //| import countio -//| import time -//| from board import * //| //| pin_counter = countio.Counter(board.D1) //| #reset the count after 100 counts diff --git a/shared-bindings/nvm/ByteArray.c b/shared-bindings/nvm/ByteArray.c index bed15c9ede..1c8a45b203 100644 --- a/shared-bindings/nvm/ByteArray.c +++ b/shared-bindings/nvm/ByteArray.c @@ -41,7 +41,8 @@ //| Usage:: //| //| import microcontroller -//| microcontroller.nvm[0:3] = b\"\xcc\x10\x00\"""" +//| microcontroller.nvm[0:3] = b"\xcc\x10\x00" +//| """ //| //| def __init__(self) -> None: diff --git a/shared-bindings/usb_cdc/Serial.c b/shared-bindings/usb_cdc/Serial.c index c813dce5b3..82355f8978 100644 --- a/shared-bindings/usb_cdc/Serial.c +++ b/shared-bindings/usb_cdc/Serial.c @@ -40,12 +40,9 @@ //| //| def __init__(self) -> None: //| """You cannot create an instance of `usb_cdc.Serial`. -//| -//| Serial objects are pre-constructed for each CDC device in the USB -//| descriptor and added to the ``usb_cdc.ports`` tuple.""" +//| The available instances are in the ``usb_cdc.serials`` tuple.""" //| ... //| - //| def read(self, size: int = 1) -> bytes: //| """Read at most ``size`` bytes. If ``size`` exceeds the internal buffer size //| only the bytes in the buffer will be read. If `timeout` is > 0 or ``None``, @@ -64,6 +61,29 @@ //| :rtype: bytes""" //| ... //| +//| def readline(self, size: int = -1) -> Optional[bytes]: +//| r"""Read a line ending in a newline character ("\\n"), including the newline. +//| Return everything readable if no newline is found and ``timeout`` is 0. +//| Return ``None`` in case of error. +//| +//| This is a binary stream: the newline character "\\n" cannot be changed. +//| If the host computer transmits "\\r" it will also be included as part of the line. +//| +//| :param int size: maximum number of characters to read. ``-1`` means as many as possible. +//| :return: the line read +//| :rtype: bytes or None""" +//| ... +//| +//| def readlines(self) -> List[Optional[bytes]]: +//| """Read multiple lines as a list, using `readline()`. +//| +//| .. warning:: If ``timeout`` is ``None``, +//| `readlines()` will never return, because there is no way to indicate end of stream. +//| +//| :return: a list of the line read +//| :rtype: list""" +//| ... +//| //| def write(self, buf: ReadableBuffer) -> int: //| """Write as many bytes as possible from the buffer of bytes. //| @@ -124,7 +144,12 @@ STATIC mp_uint_t usb_cdc_serial_ioctl_stream(mp_obj_t self_in, mp_uint_t request } //| connected: bool -//| """True if this Serial is connected to a host. (read-only)""" +//| """True if this Serial is connected to a host. (read-only) +//| +//| .. note:: The host is considered to be connected if it is asserting DTR (Data Terminal Ready). +//| Most terminal programs and ``pyserial`` assert DTR when opening a serial connection. +//| However, the C# ``SerialPort`` API does not. You must set ``SerialPort.DtrEnable``. +//| """ //| STATIC mp_obj_t usb_cdc_serial_get_connected(mp_obj_t self_in) { usb_cdc_serial_obj_t *self = MP_OBJ_TO_PTR(self_in); diff --git a/shared-module/displayio/Bitmap.c b/shared-module/displayio/Bitmap.c index c9ea834285..1831ac697d 100644 --- a/shared-module/displayio/Bitmap.c +++ b/shared-module/displayio/Bitmap.c @@ -105,17 +105,92 @@ uint32_t common_hal_displayio_bitmap_get_pixel(displayio_bitmap_t *self, int16_t return 0; } +void displayio_bitmap_set_dirty_area(displayio_bitmap_t *self, int16_t x1, int16_t y1, int16_t x2, int16_t y2) { + // Update the bitmap's dirty region with the rectangle bounded by (x1,y1) and (x2, y2) + + // Arrange x1 < x2, y1 < y2 + if (x1 > x2) { + int16_t temp = x1; + x1 = x2; + x2 = temp; + } + if (y1 > y2) { + int16_t temp = y1; + y1 = y2; + y2 = temp; + } + + // Update the dirty area. + if (self->dirty_area.x1 == self->dirty_area.x2) { + self->dirty_area.x1 = x1; + self->dirty_area.x2 = x2; + self->dirty_area.y1 = y1; + self->dirty_area.y2 = y2; + } else { + if (x1 < self->dirty_area.x1) { + self->dirty_area.x1 = x1; + } + if (x2 > self->dirty_area.x2) { + self->dirty_area.x2 = x2; + } + if (y1 < self->dirty_area.y1) { + self->dirty_area.y1 = y1; + } + if (y2 > self->dirty_area.y2) { + self->dirty_area.y2 = y2; + } + } +} + +void displayio_bitmap_write_pixel(displayio_bitmap_t *self, int16_t x, int16_t y, uint32_t value) { + // Writes the color index value into a pixel position + // Must update the dirty area separately + + // Update one pixel of data + int32_t row_start = y * self->stride; + uint32_t bytes_per_value = self->bits_per_value / 8; + if (bytes_per_value < 1) { + uint32_t bit_position = (sizeof(size_t) * 8 - ((x & self->x_mask) + 1) * self->bits_per_value); + uint32_t index = row_start + (x >> self->x_shift); + uint32_t word = self->data[index]; + word &= ~(self->bitmask << bit_position); + word |= (value & self->bitmask) << bit_position; + self->data[index] = word; + } else { + size_t* row = self->data + row_start; + if (bytes_per_value == 1) { + ((uint8_t*) row)[x] = value; + } else if (bytes_per_value == 2) { + ((uint16_t*) row)[x] = value; + } else if (bytes_per_value == 4) { + ((uint32_t*) row)[x] = value; + } + } +} + void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16_t y, displayio_bitmap_t *source, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t skip_index, bool skip_index_none) { - // Copy complete "source" bitmap into "self" bitmap at location x,y in the "self" - // Add a boolean to determine if all values are copied, or only if non-zero + // Copy region of "source" bitmap into "self" bitmap at location x,y in the "self" // If skip_value is encountered in the source bitmap, it will not be copied. // If skip_value is `None`, then all pixels are copied. + // This function assumes input checks were performed for pixel index entries. if (self->read_only) { mp_raise_RuntimeError(translate("Read-only object")); } + // Update the dirty area + int16_t dirty_x_max = (x + (x2-x1)); + if (dirty_x_max > self->width) { + dirty_x_max = self->width; + } + int16_t dirty_y_max = y + (y2-y1); + if (dirty_y_max > self->height) { + dirty_y_max = self->height; + } + + displayio_bitmap_set_dirty_area(self, x, y, dirty_x_max, dirty_y_max); + bool x_reverse = false; bool y_reverse = false; @@ -142,7 +217,7 @@ void common_hal_displayio_bitmap_blit(displayio_bitmap_t *self, int16_t x, int16 if ((yd_index >= 0) && (yd_index < self->height) ) { uint32_t value = common_hal_displayio_bitmap_get_pixel(source, xs_index, ys_index); if ( (skip_index_none) || (value != skip_index) ) { // write if skip_value_none is True - common_hal_displayio_bitmap_set_pixel(self, xd_index, yd_index, value); + displayio_bitmap_write_pixel(self, xd_index, yd_index, value); } } } @@ -154,45 +229,13 @@ void common_hal_displayio_bitmap_set_pixel(displayio_bitmap_t *self, int16_t x, if (self->read_only) { mp_raise_RuntimeError(translate("Read-only object")); } - // Update the dirty area. - if (self->dirty_area.x1 == self->dirty_area.x2) { - self->dirty_area.x1 = x; - self->dirty_area.x2 = x + 1; - self->dirty_area.y1 = y; - self->dirty_area.y2 = y + 1; - } else { - if (x < self->dirty_area.x1) { - self->dirty_area.x1 = x; - } else if (x >= self->dirty_area.x2) { - self->dirty_area.x2 = x + 1; - } - if (y < self->dirty_area.y1) { - self->dirty_area.y1 = y; - } else if (y >= self->dirty_area.y2) { - self->dirty_area.y2 = y + 1; - } - } - // Update our data - int32_t row_start = y * self->stride; - uint32_t bytes_per_value = self->bits_per_value / 8; - if (bytes_per_value < 1) { - uint32_t bit_position = (sizeof(size_t) * 8 - ((x & self->x_mask) + 1) * self->bits_per_value); - uint32_t index = row_start + (x >> self->x_shift); - uint32_t word = self->data[index]; - word &= ~(self->bitmask << bit_position); - word |= (value & self->bitmask) << bit_position; - self->data[index] = word; - } else { - size_t* row = self->data + row_start; - if (bytes_per_value == 1) { - ((uint8_t*) row)[x] = value; - } else if (bytes_per_value == 2) { - ((uint16_t*) row)[x] = value; - } else if (bytes_per_value == 4) { - ((uint32_t*) row)[x] = value; - } - } + // update the dirty region + displayio_bitmap_set_dirty_area(self, x, y, x+1, y+1); + + // write the pixel + displayio_bitmap_write_pixel(self, x, y, value); + } displayio_area_t* displayio_bitmap_get_refresh_areas(displayio_bitmap_t *self, displayio_area_t* tail) { diff --git a/supervisor/flash.h b/supervisor/flash.h index cd69cbfa9b..289c76c2d0 100644 --- a/supervisor/flash.h +++ b/supervisor/flash.h @@ -31,7 +31,7 @@ #include "py/mpconfig.h" -#ifdef EXTERNAL_FLASH_DEVICE_COUNT +#ifdef EXTERNAL_FLASH_DEVICES #include "supervisor/shared/external_flash/external_flash.h" #else #include "supervisor/shared/internal_flash.h" diff --git a/supervisor/flash_root_pointers.h b/supervisor/flash_root_pointers.h index 634ae58d3f..a426b9c4eb 100644 --- a/supervisor/flash_root_pointers.h +++ b/supervisor/flash_root_pointers.h @@ -26,7 +26,7 @@ #ifndef MICROPY_INCLUDED_SUPERVISOR_FLASH_ROOT_POINTERS_H #define MICROPY_INCLUDED_SUPERVISOR_FLASH_ROOT_POINTERS_H -#ifdef EXTERNAL_FLASH_DEVICE_COUNT +#ifdef EXTERNAL_FLASH_DEVICES #include "supervisor/shared/external_flash/external_flash_root_pointers.h" #else #include "supervisor/internal_flash_root_pointers.h" diff --git a/supervisor/shared/external_flash/external_flash.c b/supervisor/shared/external_flash/external_flash.c index e2d767235e..23727e7e70 100644 --- a/supervisor/shared/external_flash/external_flash.c +++ b/supervisor/shared/external_flash/external_flash.c @@ -45,7 +45,8 @@ // The currently cached sector in the cache, ram or flash based. static uint32_t current_sector; -const external_flash_device possible_devices[EXTERNAL_FLASH_DEVICE_COUNT] = {EXTERNAL_FLASH_DEVICES}; +STATIC const external_flash_device possible_devices[] = {EXTERNAL_FLASH_DEVICES}; +#define EXTERNAL_FLASH_DEVICE_COUNT MP_ARRAY_SIZE(possible_devices) static const external_flash_device* flash_device = NULL; diff --git a/supervisor/shared/flash.c b/supervisor/shared/flash.c index 1e09fe14b3..66f2f07047 100644 --- a/supervisor/shared/flash.c +++ b/supervisor/shared/flash.c @@ -213,7 +213,9 @@ void supervisor_flash_init_vfs(fs_user_mount_t *vfs) { vfs->base.type = &mp_fat_vfs_type; vfs->flags |= FSUSER_NATIVE | FSUSER_HAVE_IOCTL; vfs->fatfs.drv = vfs; +#if MICROPY_FATFS_MULTI_PARTITION vfs->fatfs.part = 1; // flash filesystem lives on first partition +#endif vfs->readblocks[0] = (mp_obj_t)&supervisor_flash_obj_readblocks_obj; vfs->readblocks[1] = (mp_obj_t)&supervisor_flash_obj; vfs->readblocks[2] = (mp_obj_t)flash_read_blocks; // native version diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 374b7a72bd..083e7fb354 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -34,7 +34,6 @@ endif # But that might not be true in the future.) ifdef EXTERNAL_FLASH_DEVICES CFLAGS += -DEXTERNAL_FLASH_DEVICES=$(EXTERNAL_FLASH_DEVICES) \ - -DEXTERNAL_FLASH_DEVICE_COUNT=$(EXTERNAL_FLASH_DEVICE_COUNT) SRC_SUPERVISOR += supervisor/shared/external_flash/external_flash.c ifeq ($(SPI_FLASH_FILESYSTEM),1) From d1e3626460125e54413d6c41b2d31f031f541dd9 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Tue, 9 Mar 2021 11:32:33 +0000 Subject: [PATCH 38/49] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (975 of 975 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 300e20ee76..3adaa228a8 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-03 17:42+0000\n" +"PO-Revision-Date: 2021-03-09 16:55+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.1-dev\n" +"X-Generator: Weblate 4.5.2-dev\n" #: main.c msgid "" @@ -1837,7 +1837,7 @@ msgstr "" #: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c msgid "Pins must be sequential" -msgstr "" +msgstr "Os pinos devem ser sequenciais" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" @@ -3853,7 +3853,7 @@ msgstr "pressionando ambos os botões durante a inicialização.\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" -msgstr "" +msgstr "puxe as máscaras em conflito com as máscaras de direção" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" From 48c486807b3a98b0d616dee19cd22ddabb8f3c15 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 9 Mar 2021 13:27:02 +0000 Subject: [PATCH 39/49] Translated using Weblate (Swedish) Currently translated at 100.0% (975 of 975 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 3d1d40515c..de7e817691 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-03-03 21:28+0000\n" +"PO-Revision-Date: 2021-03-09 16:55+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.5.1-dev\n" +"X-Generator: Weblate 4.5.2-dev\n" #: main.c msgid "" @@ -1817,7 +1817,7 @@ msgstr "" #: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c msgid "Pins must be sequential" -msgstr "" +msgstr "Pinnarna måste vara i sekvens" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" @@ -3810,7 +3810,7 @@ msgstr "trycka båda knapparna vid uppstart.\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" -msgstr "" +msgstr "pull-mask är i konflikt med riktnings-mask" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "pull_threshold must be between 1 and 32" From 1aad93baa313756f66d64288bfa901bf5b9a3d0d Mon Sep 17 00:00:00 2001 From: FBSeletronica Date: Tue, 9 Mar 2021 13:58:02 -0300 Subject: [PATCH 40/49] Fixing build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43e420145e..d413fd33ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -450,6 +450,7 @@ jobs: - "espressif_kaluga_1" - "espressif_saola_1_wroom" - "espressif_saola_1_wrover" + - "franzininho_wifi_wroom" - "franzininho_wifi_wrover" - "lilygo_ttgo_t8_s2_st7789" - "microdev_micro_s2" From 1e5ffe1a53cce31e8335e2f0878963de87dae57f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 9 Mar 2021 11:08:36 -0600 Subject: [PATCH 41/49] Revert "circuitpy_mpconfig: Disable flash multi-partition" This reverts commit 156ee4833ab170d598991fd8d4d6f6d04c759744. --- py/circuitpy_mpconfig.h | 2 +- supervisor/shared/flash.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 0cddcb83e3..f61c3959f0 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -133,7 +133,7 @@ #define MICROPY_FATFS_LFN_CODE_PAGE (437) #define MICROPY_FATFS_USE_LABEL (1) #define MICROPY_FATFS_RPATH (2) -#define MICROPY_FATFS_MULTI_PARTITION (0) +#define MICROPY_FATFS_MULTI_PARTITION (1) // Only enable this if you really need it. It allocates a byte cache of this size. // #define MICROPY_FATFS_MAX_SS (4096) diff --git a/supervisor/shared/flash.c b/supervisor/shared/flash.c index 66f2f07047..1e09fe14b3 100644 --- a/supervisor/shared/flash.c +++ b/supervisor/shared/flash.c @@ -213,9 +213,7 @@ void supervisor_flash_init_vfs(fs_user_mount_t *vfs) { vfs->base.type = &mp_fat_vfs_type; vfs->flags |= FSUSER_NATIVE | FSUSER_HAVE_IOCTL; vfs->fatfs.drv = vfs; -#if MICROPY_FATFS_MULTI_PARTITION vfs->fatfs.part = 1; // flash filesystem lives on first partition -#endif vfs->readblocks[0] = (mp_obj_t)&supervisor_flash_obj_readblocks_obj; vfs->readblocks[1] = (mp_obj_t)&supervisor_flash_obj; vfs->readblocks[2] = (mp_obj_t)flash_read_blocks; // native version From a61db7f12e4278e39ae7096dd975a4285127416c Mon Sep 17 00:00:00 2001 From: Chris Dailey Date: Tue, 9 Mar 2021 12:54:52 -0500 Subject: [PATCH 42/49] Updated SparkFun MicroMod USB PID As per the PID provide by TheHoff, [here](https://forum.sparkfun.com/viewtopic.php?p=223812#p223812) --- .../mpconfigboard.mk | 73 ++++++++++++++++--- 1 file changed, 64 insertions(+), 9 deletions(-) diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk index e6070a0563..1a0d23c266 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk @@ -1,11 +1,66 @@ -USB_VID = 0x1B4F -USB_PID = 0xabcd -$(warning SparkFun nRF52840 MicroMod needss USB PID!) -USB_PRODUCT = "SFE_nRF52840_MicroMod" -USB_MANUFACTURER = "SparkFun Electronics" +/* + * The MIT License (MIT) + * + * Copyright (c) 2018 Ha Thach for Adafruit Industries + * Copyright (c) 2021 Chris Marc Dailey + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ -MCU_CHIP = nrf52840 +#ifndef _SPARKFUN_NRF52840_MICROMOD_H_ +#define _SPARKFUN_NRF52840_MICROMOD_H_ -QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 1 -EXTERNAL_FLASH_DEVICES = "W25Q128JV_PM" +#define _PINNUM(port, pin) ((port)*32 + (pin)) + +/*------------------------------------------------------------------*/ +/* LED + *------------------------------------------------------------------*/ +#define LEDS_NUMBER 1 +#define LED_PRIMARY_PIN _PINNUM(0, 13) +#define LED_STATE_ON 1 + +/*------------------------------------------------------------------*/ +/* BUTTON + *------------------------------------------------------------------*/ +#define BUTTONS_NUMBER 2 +#define BUTTON_1 _PINNUM(0, 7) +#define BUTTON_2 _PINNUM(0, 10) +#define BUTTON_PULL NRF_GPIO_PIN_PULLUP + +//--------------------------------------------------------------------+ +// BLE OTA +//--------------------------------------------------------------------+ +#define BLEDIS_MANUFACTURER "SparkFun" +#define BLEDIS_MODEL "MicroMod nRF52840" + +//--------------------------------------------------------------------+ +// USB +//--------------------------------------------------------------------+ +#define USB_DESC_VID 0x1B4F +#define USB_DESC_UF2_PID 0x0022 +#define USB_DESC_CDC_ONLY_PID 0x0023 + +//------------- UF2 -------------// +#define UF2_PRODUCT_NAME "SparkFun MicroMod nRF52840" +#define UF2_VOLUME_LABEL "SFMM852BOOT" +#define UF2_BOARD_ID "micromod-nRF52840" + +#define UF2_INDEX_URL "https://www.sparkfun.com/products/16984" + +#endif /* _SPARKFUN_NRF52840_MICROMOD_H_ */ From 1ae858126acb02c461de8f30e99b2961995b305a Mon Sep 17 00:00:00 2001 From: nitz Date: Tue, 9 Mar 2021 17:29:10 -0500 Subject: [PATCH 43/49] Fix the mpconfigboard.mk that was screwy? --- .../mpconfigboard.mk | 72 +++---------------- 1 file changed, 8 insertions(+), 64 deletions(-) diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk index 1a0d23c266..4c4bcd0896 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk @@ -1,66 +1,10 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2018 Ha Thach for Adafruit Industries - * Copyright (c) 2021 Chris Marc Dailey - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ +USB_VID = 0x1B4F +USB_PID = 0x0021 +USB_PRODUCT = "SFE_nRF52840_MicroMod" +USB_MANUFACTURER = "SparkFun Electronics" -#ifndef _SPARKFUN_NRF52840_MICROMOD_H_ -#define _SPARKFUN_NRF52840_MICROMOD_H_ +MCU_CHIP = nrf52840 -#define _PINNUM(port, pin) ((port)*32 + (pin)) - -/*------------------------------------------------------------------*/ -/* LED - *------------------------------------------------------------------*/ -#define LEDS_NUMBER 1 -#define LED_PRIMARY_PIN _PINNUM(0, 13) -#define LED_STATE_ON 1 - -/*------------------------------------------------------------------*/ -/* BUTTON - *------------------------------------------------------------------*/ -#define BUTTONS_NUMBER 2 -#define BUTTON_1 _PINNUM(0, 7) -#define BUTTON_2 _PINNUM(0, 10) -#define BUTTON_PULL NRF_GPIO_PIN_PULLUP - -//--------------------------------------------------------------------+ -// BLE OTA -//--------------------------------------------------------------------+ -#define BLEDIS_MANUFACTURER "SparkFun" -#define BLEDIS_MODEL "MicroMod nRF52840" - -//--------------------------------------------------------------------+ -// USB -//--------------------------------------------------------------------+ -#define USB_DESC_VID 0x1B4F -#define USB_DESC_UF2_PID 0x0022 -#define USB_DESC_CDC_ONLY_PID 0x0023 - -//------------- UF2 -------------// -#define UF2_PRODUCT_NAME "SparkFun MicroMod nRF52840" -#define UF2_VOLUME_LABEL "SFMM852BOOT" -#define UF2_BOARD_ID "micromod-nRF52840" - -#define UF2_INDEX_URL "https://www.sparkfun.com/products/16984" - -#endif /* _SPARKFUN_NRF52840_MICROMOD_H_ */ +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "W25Q128JV_PM" From fe0655e121a1433d7e773672883b25fa78f6cb95 Mon Sep 17 00:00:00 2001 From: nitz Date: Tue, 9 Mar 2021 17:39:29 -0500 Subject: [PATCH 44/49] Update pins, remove unused defs from board config. --- .../mpconfigboard.h | 7 - .../boards/sparkfun_nrf52840_micromod/pins.c | 149 +++++++++--------- 2 files changed, 72 insertions(+), 84 deletions(-) diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h index 91997710a2..c53fc45d22 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h @@ -51,10 +51,3 @@ #define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 19) // Labeled 'SPI_SCK1/SDIO_CLK' in schematic. #define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 12) // Labeled 'FLASH_CS' in schematic. #endif // QSPI_FLASH_FILESYSTEM - -#if SPI_FLASH_FILESYSTEM -#define SPI_FLASH_MOSI_PIN (&pin_P0_14) -#define SPI_FLASH_MISO_PIN (&pin_P0_21) -#define SPI_FLASH_SCK_PIN (&pin_P0_19) -#define SPI_FLASH_CS_PIN (&pin_P0_12) -#endif // SPI_FLASH_FILESYSTEM diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c index a8adeacf7a..bd457f14a9 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c @@ -2,111 +2,106 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { // D pins (D0-D1) - { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_27) }, // 0.27 - D0 - { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P1_08) }, // 1.08 - D1 | CAM_TRIG - { MP_ROM_QSTR(MP_QSTR_CAM_TRIG), MP_ROM_PTR(&pin_P1_08) }, // CAM_TRIG alias + {MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_27)}, // 0.27 - D0 + {MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P1_08)}, // 1.08 - D1 | CAM_TRIG + {MP_ROM_QSTR(MP_QSTR_CAM_TRIG), MP_ROM_PTR(&pin_P1_08)}, // CAM_TRIG alias // A pins (A0-A1) - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, // 0.04 - A0 | ADC0 (AIN2) - { MP_ROM_QSTR(MP_QSTR_ADC0), MP_ROM_PTR(&pin_P0_04) }, // ADC0 alias - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, // 0.05 - A1 | ADC1 (AIN3) - { MP_ROM_QSTR(MP_QSTR_ADC1), MP_ROM_PTR(&pin_P0_05) }, // ADC1 alias + {MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04)}, // 0.04 - A0 | ADC0 (AIN2) + {MP_ROM_QSTR(MP_QSTR_ADC0), MP_ROM_PTR(&pin_P0_04)}, // ADC0 alias + {MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05)}, // 0.05 - A1 | ADC1 (AIN3) + {MP_ROM_QSTR(MP_QSTR_ADC1), MP_ROM_PTR(&pin_P0_05)}, // ADC1 alias // G pins (G0-G11, G11 NC) - { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_P0_29) }, // 0.29 - G0 | GPIO0 | BUS0 (AIN5) - { MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_P0_29) }, // BUS0 alias - { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_P0_03) }, // 0.03 - G1 | GPIO1 | BUS1 (AIN1) - { MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_P0_03) }, // BUS1 alias - { MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_P1_13) }, // 1.13 - G2 | GPIO2 | BUS2 - { MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_P1_13) }, // BUS2 alias - { MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_P1_12) }, // 1.12 - G3 | GPIO3 | BUS3 - { MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_P1_12) }, // BUS3 alias - { MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_P1_11) }, // 1.11 - G4 | GPIO4 | BUS4 - { MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_P1_11) }, // BUS4 alias - { MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_P0_17) }, // 0.17 - G5 | GPIO5 | BUS5 - { MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_P0_17) }, // BUS5 alias - { MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_P1_06) }, // 1.06 - G6 | GPIO6 | BUS6 - { MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_P1_06) }, // BUS6 alias - { MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_P1_04) }, // 1.04 - G7 | GPIO7 | BUS7 - { MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR(&pin_P1_04) }, // BUS7 alias - { MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR(&pin_P1_14) }, // 1.14 - G8 | GPIO8 - { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_P0_09) }, // 0.09 - G9 | GPIO9/NFC1 | ADC_D- | CAM_HSYNC (NFC1) - { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, // NFC1 alias - { MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR(&pin_P0_09) }, // ADC_DM alias - { MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR(&pin_P0_09) }, // CAM_HSYNC alias - { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_P0_10) }, // 0.10 - G10 | GPIO10/NFC2 | ADC_D+ | CAM_VSYNC (NFC2) - { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, // NFC2 alias - { MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR(&pin_P0_10) }, // ADC_DP alias - { MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_P0_10) }, // CAM_VSYNC alias - // NC - G11 + {MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_P0_29)}, // 0.29 - G0 | GPIO0 | BUS0 (AIN5) + {MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_P0_29)}, // BUS0 alias + {MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_P0_03)}, // 0.03 - G1 | GPIO1 | BUS1 (AIN1) + {MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_P0_03)}, // BUS1 alias + {MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_P1_13)}, // 1.13 - G2 | GPIO2 | BUS2 + {MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_P1_13)}, // BUS2 alias + {MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_P1_12)}, // 1.12 - G3 | GPIO3 | BUS3 + {MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_P1_12)}, // BUS3 alias + {MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_P1_11)}, // 1.11 - G4 | GPIO4 | BUS4 + {MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_P1_11)}, // BUS4 alias + {MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_P0_17)}, // 0.17 - G5 | GPIO5 | BUS5 + {MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_P0_17)}, // BUS5 alias + {MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_P1_06)}, // 1.06 - G6 | GPIO6 | BUS6 + {MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_P1_06)}, // BUS6 alias + {MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_P1_04)}, // 1.04 - G7 | GPIO7 | BUS7 + {MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR(&pin_P1_04)}, // BUS7 alias + {MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR(&pin_P1_14)}, // 1.14 - G8 | GPIO8 + {MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_P0_09)}, // 0.09 - G9 | GPIO9/NFC1 | ADC_D- | CAM_HSYNC (NFC1) + {MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09)}, // NFC1 alias + {MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR(&pin_P0_09)}, // ADC_DM alias + {MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR(&pin_P0_09)}, // CAM_HSYNC alias + {MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_P0_10)}, // 0.10 - G10 | GPIO10/NFC2 | ADC_D+ | CAM_VSYNC (NFC2) + {MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10)}, // NFC2 alias + {MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR(&pin_P0_10)}, // ADC_DP alias + {MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_P0_10)}, // CAM_VSYNC alias + // NC - G11 // PWM pins (PWM0-PWM1) - { MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_P0_06) }, // 0.06 - PWM0 - { MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_P0_16) }, // 0.16 - PWM1 + {MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_P0_06)}, // 0.06 - PWM0 + {MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_P0_16)}, // 0.16 - PWM1 // PDM - { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P0_25) }, // 0.25 - PDM_CLK | AUD_BCLK - { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_26) }, // 0.26 - PDM_DATA | AUD_LRCLK + {MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P0_25)}, // 0.25 - PDM_CLK | AUD_BCLK + {MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_26)}, // 0.26 - PDM_DATA | AUD_LRCLK // Battery Voltage Monitor - { MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_P0_30) }, // 0.30 - BATT_VIN/3 (AIN6) + {MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_P0_30)}, // 0.30 - BATT_VIN/3 (AIN6) // I2C - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_08) }, // 0.08 - SDA - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11) }, // 0.11 - SCL (TRACEDATA2) + {MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_08)}, // 0.08 - SDA + {MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11)}, // 0.11 - SCL (TRACEDATA2) - { MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_P0_15) }, // 0.15 - I2C_INT + {MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_P0_15)}, // 0.15 - I2C_INT - { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_P1_01) }, // 1.01 - SDA1 - { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_P0_24) }, // 0.24 - SCL1 + {MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_P1_01)}, // 1.01 - SDA1 + {MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_P0_24)}, // 0.24 - SCL1 // SPI - { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_P0_02) }, // 0.02 - CIPO | SPI_CIPO - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_02) }, // MISO alias - { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_P0_31) }, // 0.31 - COPI | SPI_COPI (AIN7) - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_31) }, // MOSI alias - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_28) }, // 0.28 - SCK | SPI_SCK (AIN4) - { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_P0_20) }, // 0.20 - /CS | SPI_/CS + {MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_P0_02)}, // 0.02 - CIPO | SPI_CIPO + {MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_02)}, // MISO alias + {MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_P0_31)}, // 0.31 - COPI | SPI_COPI (AIN7) + {MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_31)}, // MOSI alias + {MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_28)}, // 0.28 - SCK | SPI_SCK (AIN4) + {MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_P0_20)}, // 0.20 - /CS | SPI_/CS - // Flash SPI - { MP_ROM_QSTR(MP_QSTR_IOSCK), MP_ROM_PTR(&pin_P0_19) }, // 0.00 - IOSCK | Flash Serial Clock - { MP_ROM_QSTR(MP_QSTR_IOCSN), MP_ROM_PTR(&pin_P0_12) }, // 0.00 - IOCSN | Flash /Chip Select - { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_P0_14) }, // 0.00 - IO0 | Flash Data 0 - { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_P0_21) }, // 0.00 - IO1 | Flash Data 1 - { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_P0_23) }, // 0.00 - IO2 | Flash Data 2 - { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_P1_00) }, // 0.00 - IO3 | Flash Data 3 + // QSPI, used by flash on this board, but is broken out on MicroMod connector. + {MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR(&pin_P0_19)}, // 0.00 - IOSCK | Flash Serial Clock + {MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR(&pin_P0_14)}, // 0.00 - IO0 | Flash Data 0 + {MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR(&pin_P0_21)}, // 0.00 - IO1 | Flash Data 1 + {MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR(&pin_P0_23)}, // 0.00 - IO2 | Flash Data 2 + {MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR(&pin_P1_00)}, // 0.00 - IO3 | Flash Data 3 // Reset Pin - { MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&pin_P1_14) }, // 0.18 - /RESET (NRESET) + {MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&pin_P1_14)}, // 0.18 - /RESET (NRESET) // LED - { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_13) }, // 0.13 - LED_BUILTIN | STAT | Blue LED + {MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_13)}, // 0.13 - LED_BUILTIN | STAT | Blue LED // Button - { MP_ROM_QSTR(MP_QSTR_BUTTON1), MP_ROM_PTR(&pin_P0_07) }, // 0.07 - /BOOT [Active Low] (TRACECLK) - Is button on carriers. - { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_P0_07) }, // BOOT alias + {MP_ROM_QSTR(MP_QSTR_BUTTON1), MP_ROM_PTR(&pin_P0_07)}, // 0.07 - /BOOT [Active Low] (TRACECLK) - Is button on carriers. + {MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_P0_07)}, // BOOT alias // UART - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P1_10) }, // 1.10 - UART RX | RX1 - { MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_P1_10) }, // RX1 alias - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P1_03) }, // 1.03 - UART TX | TX1 - { MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_P1_03) }, // TX1 alias - { MP_ROM_QSTR(MP_QSTR_CTS), MP_ROM_PTR(&pin_P1_09) }, // 1.09 - UART CTS | CTS1 (TRACEDATA3) - { MP_ROM_QSTR(MP_QSTR_CTS1), MP_ROM_PTR(&pin_P1_09) }, // CTS1 alias - { MP_ROM_QSTR(MP_QSTR_RTS), MP_ROM_PTR(&pin_P1_02) }, // 1.02 - UART RTS | RTS1 - { MP_ROM_QSTR(MP_QSTR_RTS1), MP_ROM_PTR(&pin_P1_02) }, // RTS1 alias + {MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P1_10)}, // 1.10 - UART RX | RX1 + {MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_P1_10)}, // RX1 alias + {MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P1_03)}, // 1.03 - UART TX | TX1 + {MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_P1_03)}, // TX1 alias + {MP_ROM_QSTR(MP_QSTR_CTS), MP_ROM_PTR(&pin_P1_09)}, // 1.09 - UART CTS | CTS1 (TRACEDATA3) + {MP_ROM_QSTR(MP_QSTR_CTS1), MP_ROM_PTR(&pin_P1_09)}, // CTS1 alias + {MP_ROM_QSTR(MP_QSTR_RTS), MP_ROM_PTR(&pin_P1_02)}, // 1.02 - UART RTS | RTS1 + {MP_ROM_QSTR(MP_QSTR_RTS1), MP_ROM_PTR(&pin_P1_02)}, // RTS1 alias - { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_P1_05) }, // 1.05 - UART RX | RX2 - { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_P1_07) }, // 1.07 - UART TX | TX2 - - // Crystal - { MP_ROM_QSTR(MP_QSTR_XL1), MP_ROM_PTR(&pin_P0_00) }, // 0.00 - XL1 | 32.768kHz Crystal Pin 1 - { MP_ROM_QSTR(MP_QSTR_XL2), MP_ROM_PTR(&pin_P0_01) }, // 0.01 - XL2 | 32.768kHz Crystal Pin 2 + {MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_P1_05)}, // 1.05 - UART RX | RX2 + {MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_P1_07)}, // 1.07 - UART TX | TX2 // Board Objects - { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + {MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj)}, + {MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj)}, + {MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj)}, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 5beb529f61d9da1d8cf446a12d47725d0e14459e Mon Sep 17 00:00:00 2001 From: nitz Date: Tue, 9 Mar 2021 17:39:29 -0500 Subject: [PATCH 45/49] Update pins, remove unused defs from board config. --- .../boards/sparkfun_nrf52840_micromod/pins.c | 142 +++++++++--------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c index bd457f14a9..389d5f6b97 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c @@ -2,106 +2,106 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { // D pins (D0-D1) - {MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_27)}, // 0.27 - D0 - {MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P1_08)}, // 1.08 - D1 | CAM_TRIG - {MP_ROM_QSTR(MP_QSTR_CAM_TRIG), MP_ROM_PTR(&pin_P1_08)}, // CAM_TRIG alias + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_27) }, // 0.27 - D0 + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P1_08) }, // 1.08 - D1 | CAM_TRIG + { MP_ROM_QSTR(MP_QSTR_CAM_TRIG), MP_ROM_PTR(&pin_P1_08) }, // CAM_TRIG alias // A pins (A0-A1) - {MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04)}, // 0.04 - A0 | ADC0 (AIN2) - {MP_ROM_QSTR(MP_QSTR_ADC0), MP_ROM_PTR(&pin_P0_04)}, // ADC0 alias - {MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05)}, // 0.05 - A1 | ADC1 (AIN3) - {MP_ROM_QSTR(MP_QSTR_ADC1), MP_ROM_PTR(&pin_P0_05)}, // ADC1 alias + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, // 0.04 - A0 | ADC0 (AIN2) + { MP_ROM_QSTR(MP_QSTR_ADC0), MP_ROM_PTR(&pin_P0_04) }, // ADC0 alias + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, // 0.05 - A1 | ADC1 (AIN3) + { MP_ROM_QSTR(MP_QSTR_ADC1), MP_ROM_PTR(&pin_P0_05) }, // ADC1 alias // G pins (G0-G11, G11 NC) - {MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_P0_29)}, // 0.29 - G0 | GPIO0 | BUS0 (AIN5) - {MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_P0_29)}, // BUS0 alias - {MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_P0_03)}, // 0.03 - G1 | GPIO1 | BUS1 (AIN1) - {MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_P0_03)}, // BUS1 alias - {MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_P1_13)}, // 1.13 - G2 | GPIO2 | BUS2 - {MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_P1_13)}, // BUS2 alias - {MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_P1_12)}, // 1.12 - G3 | GPIO3 | BUS3 - {MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_P1_12)}, // BUS3 alias - {MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_P1_11)}, // 1.11 - G4 | GPIO4 | BUS4 - {MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_P1_11)}, // BUS4 alias - {MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_P0_17)}, // 0.17 - G5 | GPIO5 | BUS5 - {MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_P0_17)}, // BUS5 alias - {MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_P1_06)}, // 1.06 - G6 | GPIO6 | BUS6 - {MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_P1_06)}, // BUS6 alias - {MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_P1_04)}, // 1.04 - G7 | GPIO7 | BUS7 - {MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR(&pin_P1_04)}, // BUS7 alias - {MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR(&pin_P1_14)}, // 1.14 - G8 | GPIO8 - {MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_P0_09)}, // 0.09 - G9 | GPIO9/NFC1 | ADC_D- | CAM_HSYNC (NFC1) - {MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09)}, // NFC1 alias - {MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR(&pin_P0_09)}, // ADC_DM alias - {MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR(&pin_P0_09)}, // CAM_HSYNC alias - {MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_P0_10)}, // 0.10 - G10 | GPIO10/NFC2 | ADC_D+ | CAM_VSYNC (NFC2) - {MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10)}, // NFC2 alias - {MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR(&pin_P0_10)}, // ADC_DP alias - {MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_P0_10)}, // CAM_VSYNC alias - // NC - G11 + { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_P0_29) }, // 0.29 - G0 | GPIO0 | BUS0 (AIN5) + { MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_P0_29) }, // BUS0 alias + { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_P0_03) }, // 0.03 - G1 | GPIO1 | BUS1 (AIN1) + { MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_P0_03) }, // BUS1 alias + { MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_P1_13) }, // 1.13 - G2 | GPIO2 | BUS2 + { MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_P1_13) }, // BUS2 alias + { MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_P1_12) }, // 1.12 - G3 | GPIO3 | BUS3 + { MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_P1_12) }, // BUS3 alias + { MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_P1_11) }, // 1.11 - G4 | GPIO4 | BUS4 + { MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_P1_11) }, // BUS4 alias + { MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_P0_17) }, // 0.17 - G5 | GPIO5 | BUS5 + { MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_P0_17) }, // BUS5 alias + { MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_P1_06) }, // 1.06 - G6 | GPIO6 | BUS6 + { MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_P1_06) }, // BUS6 alias + { MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_P1_04) }, // 1.04 - G7 | GPIO7 | BUS7 + { MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR(&pin_P1_04) }, // BUS7 alias + { MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR(&pin_P1_14) }, // 1.14 - G8 | GPIO8 + { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_P0_09) }, // 0.09 - G9 | GPIO9/NFC1 | ADC_D- | CAM_HSYNC (NFC1) + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, // NFC1 alias + { MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR(&pin_P0_09) }, // ADC_DM alias + { MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR(&pin_P0_09) }, // CAM_HSYNC alias + { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_P0_10) }, // 0.10 - G10 | GPIO10/NFC2 | ADC_D+ | CAM_VSYNC (NFC2) + { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, // NFC2 alias + { MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR(&pin_P0_10) }, // ADC_DP alias + { MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_P0_10) }, // CAM_VSYNC alias + // NC - G11 // PWM pins (PWM0-PWM1) - {MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_P0_06)}, // 0.06 - PWM0 - {MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_P0_16)}, // 0.16 - PWM1 + { MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_P0_06) }, // 0.06 - PWM0 + { MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_P0_16) }, // 0.16 - PWM1 // PDM - {MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P0_25)}, // 0.25 - PDM_CLK | AUD_BCLK - {MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_26)}, // 0.26 - PDM_DATA | AUD_LRCLK + { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P0_25) }, // 0.25 - PDM_CLK | AUD_BCLK + { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_26) }, // 0.26 - PDM_DATA | AUD_LRCLK // Battery Voltage Monitor - {MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_P0_30)}, // 0.30 - BATT_VIN/3 (AIN6) + { MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_P0_30) }, // 0.30 - BATT_VIN/3 (AIN6) // I2C - {MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_08)}, // 0.08 - SDA - {MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11)}, // 0.11 - SCL (TRACEDATA2) + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_08) }, // 0.08 - SDA + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11) }, // 0.11 - SCL (TRACEDATA2) - {MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_P0_15)}, // 0.15 - I2C_INT + { MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_P0_15) }, // 0.15 - I2C_INT - {MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_P1_01)}, // 1.01 - SDA1 - {MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_P0_24)}, // 0.24 - SCL1 + { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_P1_01) }, // 1.01 - SDA1 + { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_P0_24) }, // 0.24 - SCL1 // SPI - {MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_P0_02)}, // 0.02 - CIPO | SPI_CIPO - {MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_02)}, // MISO alias - {MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_P0_31)}, // 0.31 - COPI | SPI_COPI (AIN7) - {MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_31)}, // MOSI alias - {MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_28)}, // 0.28 - SCK | SPI_SCK (AIN4) - {MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_P0_20)}, // 0.20 - /CS | SPI_/CS + { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_P0_02) }, // 0.02 - CIPO | SPI_CIPO + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_02) }, // MISO alias + { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_P0_31) }, // 0.31 - COPI | SPI_COPI (AIN7) + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_31) }, // MOSI alias + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_28) }, // 0.28 - SCK | SPI_SCK (AIN4) + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_P0_20) }, // 0.20 - /CS | SPI_/CS // QSPI, used by flash on this board, but is broken out on MicroMod connector. - {MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR(&pin_P0_19)}, // 0.00 - IOSCK | Flash Serial Clock - {MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR(&pin_P0_14)}, // 0.00 - IO0 | Flash Data 0 - {MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR(&pin_P0_21)}, // 0.00 - IO1 | Flash Data 1 - {MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR(&pin_P0_23)}, // 0.00 - IO2 | Flash Data 2 - {MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR(&pin_P1_00)}, // 0.00 - IO3 | Flash Data 3 + { MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR(&pin_P0_19) }, // 0.00 - IOSCK | Flash Serial Clock + { MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR(&pin_P0_14) }, // 0.00 - IO0 | Flash Data 0 + { MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR(&pin_P0_21) }, // 0.00 - IO1 | Flash Data 1 + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR(&pin_P0_23) },// 0.00 - IO2 | Flash Data 2 + { MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR(&pin_P1_00) }, // 0.00 - IO3 | Flash Data 3 // Reset Pin - {MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&pin_P1_14)}, // 0.18 - /RESET (NRESET) + { MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&pin_P1_14) }, // 0.18 - /RESET (NRESET) // LED - {MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_13)}, // 0.13 - LED_BUILTIN | STAT | Blue LED + { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_13) }, // 0.13 - LED_BUILTIN | STAT | Blue LED // Button - {MP_ROM_QSTR(MP_QSTR_BUTTON1), MP_ROM_PTR(&pin_P0_07)}, // 0.07 - /BOOT [Active Low] (TRACECLK) - Is button on carriers. - {MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_P0_07)}, // BOOT alias + { MP_ROM_QSTR(MP_QSTR_BUTTON1), MP_ROM_PTR(&pin_P0_07) }, // 0.07 - /BOOT [Active Low] (TRACECLK) - Is button on carriers. + { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_P0_07) }, // BOOT alias // UART - {MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P1_10)}, // 1.10 - UART RX | RX1 - {MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_P1_10)}, // RX1 alias - {MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P1_03)}, // 1.03 - UART TX | TX1 - {MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_P1_03)}, // TX1 alias - {MP_ROM_QSTR(MP_QSTR_CTS), MP_ROM_PTR(&pin_P1_09)}, // 1.09 - UART CTS | CTS1 (TRACEDATA3) - {MP_ROM_QSTR(MP_QSTR_CTS1), MP_ROM_PTR(&pin_P1_09)}, // CTS1 alias - {MP_ROM_QSTR(MP_QSTR_RTS), MP_ROM_PTR(&pin_P1_02)}, // 1.02 - UART RTS | RTS1 - {MP_ROM_QSTR(MP_QSTR_RTS1), MP_ROM_PTR(&pin_P1_02)}, // RTS1 alias + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P1_10) }, // 1.10 - UART RX | RX1 + { MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_P1_10) }, // RX1 alias + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P1_03) }, // 1.03 - UART TX | TX1 + { MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_P1_03) }, // TX1 alias + { MP_ROM_QSTR(MP_QSTR_CTS), MP_ROM_PTR(&pin_P1_09) }, // 1.09 - UART CTS | CTS1 (TRACEDATA3) + { MP_ROM_QSTR(MP_QSTR_CTS1), MP_ROM_PTR(&pin_P1_09) }, // CTS1 alias + { MP_ROM_QSTR(MP_QSTR_RTS), MP_ROM_PTR(&pin_P1_02) }, // 1.02 - UART RTS | RTS1 + { MP_ROM_QSTR(MP_QSTR_RTS1), MP_ROM_PTR(&pin_P1_02) }, // RTS1 alias - {MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_P1_05)}, // 1.05 - UART RX | RX2 - {MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_P1_07)}, // 1.07 - UART TX | TX2 + { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_P1_05) }, // 1.05 - UART RX | RX2 + { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_P1_07) }, // 1.07 - UART TX | TX2 // Board Objects - {MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj)}, - {MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj)}, - {MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj)}, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From d5365cb066137b6f2240a1eb24ee1ac812c3e080 Mon Sep 17 00:00:00 2001 From: nitz Date: Tue, 9 Mar 2021 18:36:29 -0500 Subject: [PATCH 46/49] =?UTF-8?q?SDIO/QSPI=20pin=20names.=20=C2=AF\=5F(?= =?UTF-8?q?=E3=83=84)=5F/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boards/sparkfun_nrf52840_micromod/pins.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c index 389d5f6b97..65700f24e4 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c @@ -68,12 +68,18 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_28) }, // 0.28 - SCK | SPI_SCK (AIN4) { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_P0_20) }, // 0.20 - /CS | SPI_/CS - // QSPI, used by flash on this board, but is broken out on MicroMod connector. - { MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR(&pin_P0_19) }, // 0.00 - IOSCK | Flash Serial Clock - { MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR(&pin_P0_14) }, // 0.00 - IO0 | Flash Data 0 - { MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR(&pin_P0_21) }, // 0.00 - IO1 | Flash Data 1 - { MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR(&pin_P0_23) },// 0.00 - IO2 | Flash Data 2 - { MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR(&pin_P1_00) }, // 0.00 - IO3 | Flash Data 3 + // QSPI, used by flash on this board, but is broken out + // on the MicroMod connector, to to the SDIO pins. + { MP_ROM_QSTR(MP_QSTR_SDIO_CLK), MP_ROM_PTR(&pin_P0_19) }, // 0.00 - SDIO SCK | Used as: QSPI flash SCK + { MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR(&pin_P0_19) }, // SPI_SCK1 alias + { MP_ROM_QSTR(MP_QSTR_SDIO_CMD), MP_ROM_PTR(&pin_P0_14) }, // 0.00 - SDIO CMD | Used as: QSPI flash D0 (or SDI) + { MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR(&pin_P0_14) }, // SPI_COPI1 alias + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA0), MP_ROM_PTR(&pin_P0_21) },// 0.00 - SDIO DATA0 | Used as: QSPI flash D1 (or SDO) + { MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR(&pin_P0_21) }, // SPI_CIPO1 alias + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA1), MP_ROM_PTR(&pin_P0_22) },// 0.00 - SDIO DATA1 | Unused for flash. + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR(&pin_P0_23) },// 0.00 - SDIO DATA2 | Used as: QSPI flash D2 + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA3), MP_ROM_PTR(&pin_P1_00) },// 0.00 - SDIO DATA3 | Use das: QSPI flash D3 (or /HOLD) + { MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR(&pin_P1_00) }, // SPI_CS1 alias // Reset Pin { MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&pin_P1_14) }, // 0.18 - /RESET (NRESET) From d1c6bb092722867c7581022d993486a6ef2ae4c6 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 10 Mar 2021 18:58:23 +0700 Subject: [PATCH 47/49] rp2040 add double reset to uf2, also update pico-sdk to 1.1.0 --- ports/raspberrypi/Makefile | 3 ++- ports/raspberrypi/sdk | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index ffd50299f8..bd1cee85cd 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -107,7 +107,7 @@ INC += -I. \ # Pico specific configuration CFLAGS += -DPICO_ON_DEVICE=1 -DPICO_NO_BINARY_INFO=0 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1 -DPICO_DIVIDER_CALL_IDIV0=0 -DPICO_DIVIDER_CALL_LDIV0=0 -DPICO_DIVIDER_HARDWARE=1 -DPICO_DOUBLE_ROM=1 -DPICO_FLOAT_ROM=1 -DPICO_MULTICORE=1 -DPICO_BITS_IN_RAM=0 -DPICO_DIVIDER_IN_RAM=0 -DPICO_DOUBLE_PROPAGATE_NANS=0 -DPICO_DOUBLE_IN_RAM=0 -DPICO_MEM_IN_RAM=0 -DPICO_FLOAT_IN_RAM=0 -DPICO_FLOAT_PROPAGATE_NANS=1 -DPICO_NO_FLASH=0 -DPICO_COPY_TO_RAM=0 -DPICO_DISABLE_SHARED_IRQ_HANDLERS=0 -OPTIMIZATION_FLAGS ?= -O3 +OPTIMIZATION_FLAGS ?= -O3 -DPICO_NO_BI_BOOTSEL_VIA_DOUBLE_RESET=0 # TinyUSB defines CFLAGS += -DTUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024 @@ -177,6 +177,7 @@ SRC_SDK := \ src/rp2_common/hardware_watchdog/watchdog.c \ src/rp2_common/hardware_xosc/xosc.c \ src/rp2_common/pico_bootrom/bootrom.c \ + src/rp2_common/pico_bootsel_via_double_reset/pico_bootsel_via_double_reset.c \ src/rp2_common/pico_double/double_init_rom.c \ src/rp2_common/pico_fix/rp2040_usb_device_enumeration/rp2040_usb_device_enumeration.c \ src/rp2_common/pico_float/float_init_rom.c \ diff --git a/ports/raspberrypi/sdk b/ports/raspberrypi/sdk index 55346c9530..fc10a97c38 160000 --- a/ports/raspberrypi/sdk +++ b/ports/raspberrypi/sdk @@ -1 +1 @@ -Subproject commit 55346c953012ef5b32f392fea3b42814db8df2a5 +Subproject commit fc10a97c386f65c1a44c68684fe52a56aaf50df0 From 58fb0110700fb96a9bfd5a4ae9a4f812e4b4af02 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 10 Mar 2021 19:03:27 +0700 Subject: [PATCH 48/49] clean up --- ports/raspberrypi/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index bd1cee85cd..db4bd79581 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -106,8 +106,8 @@ INC += -I. \ -I$(BUILD) # Pico specific configuration -CFLAGS += -DPICO_ON_DEVICE=1 -DPICO_NO_BINARY_INFO=0 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1 -DPICO_DIVIDER_CALL_IDIV0=0 -DPICO_DIVIDER_CALL_LDIV0=0 -DPICO_DIVIDER_HARDWARE=1 -DPICO_DOUBLE_ROM=1 -DPICO_FLOAT_ROM=1 -DPICO_MULTICORE=1 -DPICO_BITS_IN_RAM=0 -DPICO_DIVIDER_IN_RAM=0 -DPICO_DOUBLE_PROPAGATE_NANS=0 -DPICO_DOUBLE_IN_RAM=0 -DPICO_MEM_IN_RAM=0 -DPICO_FLOAT_IN_RAM=0 -DPICO_FLOAT_PROPAGATE_NANS=1 -DPICO_NO_FLASH=0 -DPICO_COPY_TO_RAM=0 -DPICO_DISABLE_SHARED_IRQ_HANDLERS=0 -OPTIMIZATION_FLAGS ?= -O3 -DPICO_NO_BI_BOOTSEL_VIA_DOUBLE_RESET=0 +CFLAGS += -DPICO_ON_DEVICE=1 -DPICO_NO_BINARY_INFO=0 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1 -DPICO_DIVIDER_CALL_IDIV0=0 -DPICO_DIVIDER_CALL_LDIV0=0 -DPICO_DIVIDER_HARDWARE=1 -DPICO_DOUBLE_ROM=1 -DPICO_FLOAT_ROM=1 -DPICO_MULTICORE=1 -DPICO_BITS_IN_RAM=0 -DPICO_DIVIDER_IN_RAM=0 -DPICO_DOUBLE_PROPAGATE_NANS=0 -DPICO_DOUBLE_IN_RAM=0 -DPICO_MEM_IN_RAM=0 -DPICO_FLOAT_IN_RAM=0 -DPICO_FLOAT_PROPAGATE_NANS=1 -DPICO_NO_FLASH=0 -DPICO_COPY_TO_RAM=0 -DPICO_DISABLE_SHARED_IRQ_HANDLERS=0 -DPICO_NO_BI_BOOTSEL_VIA_DOUBLE_RESET=0 +OPTIMIZATION_FLAGS ?= -O3 # TinyUSB defines CFLAGS += -DTUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024 From 16bfe3b41c46b1c8070f025bdbc932e21acf1753 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 10 Mar 2021 16:46:42 -0600 Subject: [PATCH 49/49] raspberrypi: RTC: Ensure a time is set Until a time is set, the RTC is not running, and rtc_get_datetime() returns false without assigning to the out-parameter. In CircuitPython, this would manifest as arbitrary values being returned, since uninitialized storage on the stack was being converted into a timestamp. --- ports/raspberrypi/common-hal/rtc/RTC.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ports/raspberrypi/common-hal/rtc/RTC.c b/ports/raspberrypi/common-hal/rtc/RTC.c index 89c23fc190..e6c5d88712 100644 --- a/ports/raspberrypi/common-hal/rtc/RTC.c +++ b/ports/raspberrypi/common-hal/rtc/RTC.c @@ -29,9 +29,23 @@ #include "py/runtime.h" #include "src/rp2_common/hardware_rtc/include/hardware/rtc.h" +#include "src/rp2_common/hardware_clocks/include/hardware/clocks.h" void common_hal_rtc_init(void) { + datetime_t t = { + .year = 2020, + .month = 1, + .day = 1, + .dotw = 3, // 0 is Sunday, so 3 is Wednesday + .hour = 0, + .min = 0, + .sec = 0 + }; + + // Start the RTC rtc_init(); + rtc_set_datetime(&t); + } void common_hal_rtc_get_time(timeutils_struct_time_t *tm) {