From f963d06643ac3ef1aeed21e6b873c8731d160ba3 Mon Sep 17 00:00:00 2001 From: DavePutz Date: Mon, 14 Sep 2020 16:29:19 -0500 Subject: [PATCH 1/8] Update from adafruit/main --- locale/circuitpython.pot | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index af9491c042..038cdacfc6 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-09-09 14:33-0700\n" +"POT-Creation-Date: 2020-09-13 14:21-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,12 +30,6 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"\n" -"To exit, please reset the board without " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -1605,6 +1599,10 @@ msgid "" "Timer was reserved for internal use - declare PWM pins earlier in the program" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "To exit, please reset the board without " +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "" @@ -1925,7 +1923,7 @@ msgstr "" msgid "bad format string" msgstr "" -#: py/binary.c +#: py/binary.c py/objarray.c msgid "bad typecode" msgstr "" @@ -1978,6 +1976,10 @@ msgstr "" msgid "bytes > 8 bits not supported" msgstr "" +#: py/objarray.c +msgid "bytes length not a multiple of item size" +msgstr "" + #: py/objstr.c msgid "bytes value out of range" msgstr "" @@ -2943,6 +2945,11 @@ msgstr "" msgid "overflow converting long int to machine word" msgstr "" +#: py/modstruct.c +#, c-format +msgid "pack expected %d items for packing (got %d)" +msgstr "" + #: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c msgid "palette must be 32 bytes long" msgstr "" From dbf8a9ad69fa93b7ad9b85df22208e08790e5795 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 22 Sep 2020 10:25:31 -0500 Subject: [PATCH 4/8] Changed delay calls to avoid conflicts with qspi_disable --- shared-module/displayio/FourWire.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-module/displayio/FourWire.c b/shared-module/displayio/FourWire.c index 7261162089..8c56d7ab60 100644 --- a/shared-module/displayio/FourWire.c +++ b/shared-module/displayio/FourWire.c @@ -87,9 +87,9 @@ bool common_hal_displayio_fourwire_reset(mp_obj_t obj) { return false; } common_hal_digitalio_digitalinout_set_value(&self->reset, false); - common_hal_time_delay_ms(1); + common_hal_mcu_delay_us(1000); common_hal_digitalio_digitalinout_set_value(&self->reset, true); - common_hal_time_delay_ms(1); + common_hal_mcu_delay_us(1000); return true; } From 73d08df9adc603dd678b0d62e38b553eab18ff71 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 25 Sep 2020 12:23:31 -0700 Subject: [PATCH 5/8] Update TinyUSB to get MIDI SysEx fix Fixes #3465 --- lib/tinyusb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tinyusb b/lib/tinyusb index e90cf7a676..8b2c822557 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit e90cf7a676eddcbd9c35d2d99a0a9cd14686e2ce +Subproject commit 8b2c82255750488232eae72f3d5dcbacfd6227f3 From 96323ac3ac2e93b87834b368726f49b8b2796049 Mon Sep 17 00:00:00 2001 From: Anson He Date: Sun, 27 Sep 2020 10:21:25 +0800 Subject: [PATCH 6/8] Default power on Wio Terminal's 40 Pin --- .../boards/seeeduino_wio_terminal/board.c | 23 +++++++++++++++++++ .../seeeduino_wio_terminal/mpconfigboard.h | 4 ++++ 2 files changed, 27 insertions(+) diff --git a/ports/atmel-samd/boards/seeeduino_wio_terminal/board.c b/ports/atmel-samd/boards/seeeduino_wio_terminal/board.c index b7fc736eb0..f6b1e0dd15 100644 --- a/ports/atmel-samd/boards/seeeduino_wio_terminal/board.c +++ b/ports/atmel-samd/boards/seeeduino_wio_terminal/board.c @@ -31,8 +31,12 @@ #include "shared-bindings/displayio/FourWire.h" #include "shared-module/displayio/__init__.h" #include "shared-module/displayio/mipi_constants.h" +#include "shared-bindings/digitalio/DigitalInOut.h" displayio_fourwire_obj_t board_display_obj; +digitalio_digitalinout_obj_t CTR_5V; +digitalio_digitalinout_obj_t CTR_3V3; +digitalio_digitalinout_obj_t USB_HOST_ENABLE; uint8_t display_init_sequence[] = { 0x01, 0x80, 0x80, // Software reset then delay 0x80 (128ms) @@ -106,6 +110,25 @@ void board_init(void) { true, // auto_refresh 60, // native_frames_per_second true); // backlight_on_high + + // Enabling the Power of the 40-pin at the back + CTR_5V.base.type = &digitalio_digitalinout_type; + CTR_3V3.base.type = &digitalio_digitalinout_type; + USB_HOST_ENABLE.base.type = &digitalio_digitalinout_type; + + common_hal_digitalio_digitalinout_construct(&CTR_5V, PIN_CTR_5V); + common_hal_digitalio_digitalinout_construct(&CTR_3V3, PIN_CTR_3V3); + common_hal_digitalio_digitalinout_construct(&USB_HOST_ENABLE, PIN_USB_HOST_ENABLE); + + common_hal_digitalio_digitalinout_set_value(&CTR_5V, true); + common_hal_digitalio_digitalinout_set_value(&CTR_3V3, false); + common_hal_digitalio_digitalinout_set_value(&USB_HOST_ENABLE, false); + + // Never reset + common_hal_digitalio_digitalinout_never_reset(&CTR_5V); + common_hal_digitalio_digitalinout_never_reset(&CTR_3V3); + common_hal_digitalio_digitalinout_never_reset(&USB_HOST_ENABLE); + } bool board_requests_safe_mode(void) { diff --git a/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.h b/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.h index f7d0448df9..c87ca46d81 100644 --- a/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.h +++ b/ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.h @@ -27,6 +27,10 @@ #define DEFAULT_UART_BUS_RX (&pin_PB27) #define DEFAULT_UART_BUS_TX (&pin_PB26) +#define PIN_CTR_5V (&pin_PC14) +#define PIN_CTR_3V3 (&pin_PC15) +#define PIN_USB_HOST_ENABLE (&pin_PA27) + // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 From 8e4f08a109980e76df43cd95f8bca96422ae89ce Mon Sep 17 00:00:00 2001 From: caternuson Date: Mon, 28 Sep 2020 13:15:43 -0700 Subject: [PATCH 7/8] add MP const info to Design Guide --- docs/design_guide.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/design_guide.rst b/docs/design_guide.rst index 6f87ecf798..9ce8dc9636 100644 --- a/docs/design_guide.rst +++ b/docs/design_guide.rst @@ -448,6 +448,19 @@ struct.pack Use `struct.pack_into` instead of `struct.pack`. +Use of MicroPython `const()` +-------------------------------------------------------------------------------- +The MicroPython `const()` feature, as discussed in `this forum post +`_, and in `this issue thread +`_, provides some +optimizations that can be useful on smaller, memory constrained devices. However, +when using `const()`, keep in mind these general guide lines: + +- Always use via an import, ex: `from micropython import const` +- Limit use to global (module level) variables only. +- If user will not need access to variable, prefix name with a leading + underscore, ex: `_SOME_CONST`. + Sensor properties and units -------------------------------------------------------------------------------- From 4d4dbbcafe4330d9dcd16535605d8990960972b1 Mon Sep 17 00:00:00 2001 From: caternuson Date: Mon, 28 Sep 2020 13:28:38 -0700 Subject: [PATCH 8/8] RST tweak --- docs/design_guide.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/design_guide.rst b/docs/design_guide.rst index 9ce8dc9636..a00caf1d69 100644 --- a/docs/design_guide.rst +++ b/docs/design_guide.rst @@ -448,18 +448,18 @@ struct.pack Use `struct.pack_into` instead of `struct.pack`. -Use of MicroPython `const()` +Use of MicroPython ``const()`` -------------------------------------------------------------------------------- -The MicroPython `const()` feature, as discussed in `this forum post +The MicroPython ``const()`` feature, as discussed in `this forum post `_, and in `this issue thread `_, provides some optimizations that can be useful on smaller, memory constrained devices. However, -when using `const()`, keep in mind these general guide lines: +when using ``const()``, keep in mind these general guide lines: -- Always use via an import, ex: `from micropython import const` +- Always use via an import, ex: ``from micropython import const`` - Limit use to global (module level) variables only. - If user will not need access to variable, prefix name with a leading - underscore, ex: `_SOME_CONST`. + underscore, ex: ``_SOME_CONST``. Sensor properties and units --------------------------------------------------------------------------------