Commit Graph

26506 Commits

Author SHA1 Message Date
microDev d314df8b84
Merge pull request #5274 from capellini/mp-register-module-pybadge-remaining
Convert more modules to use MP_REGISTER_MODULE
2021-08-31 13:30:30 +05:30
microDev 513ca098f9
Merge pull request #5273 from tannewt/fix_nrf_light_sleep_cdc
Fix nrf light_sleep when on usb
2021-08-31 13:29:04 +05:30
Radomir Dopieralski e4baefc593 Add a flag to skip waiting for safe mode
Sometimes we don't want the delay in the device's startup.

I used a simple flag, but now it also occurs to me that we could
instead make the wait time a define, and set it to 0 to disable it.
2021-08-31 09:53:30 +02:00
microDev d7a92f7fd6
Merge pull request #5271 from tannewt/switch_cp_serial_uuids
Switch CircuitPython serial off Nordic UUIDs
2021-08-31 09:14:03 +05:30
microDev 1dbeed87af
Merge pull request #5253 from tannewt/fix_nrf_gpiote_crash
Fix GPIOTE crashes by checking everything is ok
2021-08-31 09:11:36 +05:30
David Lechner 86371781e9 tools/uncrustify: Force 1 newline at end of file.
To keep things neat and tidy, we ensure that each file has 1 and only 1
newline at the end of each file.

Signed-off-by: David Lechner <david@pybricks.com>
2021-08-31 13:14:45 +10:00
Damien George 30691ed2a1 drivers/cyw43: Make wifi join fail if interface is not active.
Otherwise the Python network object continues to report that it is
attempting to connect.

Also make the return error code consistent with wifi scan.

Signed-off-by: Damien George <damien@micropython.org>
2021-08-31 13:00:11 +10:00
Damien George 52a78e6965 drivers/cyw43: Fix cyw43_deinit so it can be called many times in a row.
This makes sure deinit() can be called on the interface many times without
error, and that the state of the driver is fully reset.

Fixes issue #7493.

Signed-off-by: Damien George <damien@micropython.org>
2021-08-31 13:00:11 +10:00
Rob Capellini 1c8828223f Convert more modules to use MP_REGISTER_MODULE
Convert neopixel_write, onewireio, ps2io, pulseio, pwmio, rainbowio, random, rgbmatrix, rotaryio, rtc, sdcardio, sharpdisplay, _stage, storage, struct, supervisor, synthio, touchio, traceback, usb_cdc, usb_hid, usb_midi, and vectorio modules to use MP_REGISTER_MODULE.

Related to #5183.
2021-08-30 22:29:51 -04:00
Scott Shawcroft 6ef5241f59
Merge pull request #5267 from pewpew-game/meowbit-stage
stm32: Add support for Stage games to Meowbit
2021-08-30 18:35:41 -07:00
Scott Shawcroft 5fb4fa6f12
Merge pull request #5260 from jepler/paralleldisplay
Split out paralleldisplay to its own module
2021-08-30 18:35:15 -07:00
Scott Shawcroft fa9c2189d4
Fix nrf light_sleep when on usb
Don't let pending serial input wake us up

Fixes #5257
2021-08-30 18:26:12 -07:00
Scott Shawcroft a4246bcfa3
Fix two watchdog crashes
Fixes a crash from trying to raise an exception when trying to
deinit a RESET wdt by not raising an exception.

Fixes a crash when raise a wdt exception in the REPL when waiting
for input. We now catch and print any exceptions raised.

Fixes #5261
2021-08-30 18:10:43 -07:00
Scott Shawcroft 3ea90dbc1e
Merge pull request #5263 from jepler/printf-0xp
Include leading 0x on addresses printed with %p
2021-08-30 18:00:43 -07:00
Scott Shawcroft 76cbd0d74a
Switch CircuitPython serial off Nordic UUIDs
This will un-break examples that got confused by the presence of
two Nordic UART Services. It also adds a version characteristic
that gives the CircuitPython build tag back.

Fixes #5252
2021-08-30 15:09:12 -07:00
Scott Shawcroft 838d30b3a4
Fix incorrect macros 2021-08-30 14:40:14 -07:00
Scott Shawcroft 558f9cdfc1
Fix meminfo test 2021-08-30 14:23:11 -07:00
Scott Shawcroft 8fbb3e6d25
Merge pull request #5239 from durapensa/s2mini
Add board Lolin S2 Mini
2021-08-30 14:12:56 -07:00
Scott Shawcroft eabceb9fce
Fix builds without alarm 2021-08-30 14:09:36 -07:00
Radomir Dopieralski 89fc1890af stm32: Add support for Stage games to Meowbit
This enables the _stage library and adds stage and ugame modules to the
frozen modules, so that all Stage games should work.

I had to do several hacks:

* Since displayio.release_displays doesn't release the pins, I couldn't
  re-initialize the display inside the ugame module. Instead I changed
  the default display initialization for the board to match what Stage
  expects.

* I wanted to make the MENU key works as K_Z, but when I try to use it
  with the keypad module, I get "pin in use" error. So for now only the
  A and B buttons are used.
2021-08-30 20:27:50 +02:00
hathach ec3dfed066
update tinyusb to commit 38f5aee9c3 2021-08-31 00:28:29 +07:00
microDev 156dfad41d
Merge pull request #5264 from pewpew-game/update-stage-pygamer
Update stage library to use keypad module on pygamer and pybadge
2021-08-30 20:54:14 +05:30
Damien George 6f19b9c08d stm32/boards/LEGO_HUB_NO6: Add make commands to backup/restore firmware.
Signed-off-by: Damien George <damien@micropython.org>
2021-08-31 00:16:39 +10:00
Damien George bac791c5fd stm32/boards/LEGO_HUB_NO6: Skip first 1MiB of SPI flash for storage.
The first 1MiB is used by the built-in bootloader and is best left as-is.

Signed-off-by: Damien George <damien@micropython.org>
2021-08-31 00:16:39 +10:00
Damien George e3eed26d0b stm32/boards/LEGO_HUB_NO6: Change SPI flash storage to use hardware SPI.
Signed-off-by: Damien George <damien@micropython.org>
2021-08-31 00:16:39 +10:00
Damien George 6936f410ab stm32/storage: Make extended-block-device more configurable.
A board can now define the following to fully customise the extended block
device interface provided by the storage sub-system:
- MICROPY_HW_BDEV_BLOCKSIZE_EXT
- MICROPY_HW_BDEV_READBLOCKS_EXT
- MICROPY_HW_BDEV_WRITEBLOCKS_EXT
- MICROPY_HW_BDEV_ERASEBLOCKS_EXT

Signed-off-by: Damien George <damien@micropython.org>
2021-08-31 00:16:39 +10:00
Patrick Van Oosterwijck a66bd7a489 esp32/boards: Add GENERIC_C3_USB board with USB serial/JTAG support.
Add a new board type for ESP32-C3 revision 3 and up that implement the USB
serial/JTAG port on pin 18 and 19.  This variant uses the USB serial for
programming and console, leaving the UART free.

- Pins 18 and 19 are correctly reserved for this variant.  Also pins 14-17
  are reserved for flash for any ESP32-C3 so they can't be reconfigured
  anymore to crash the system.
- Added usb_serial_jtag.c and .h to implement this interface.
- Interface was tested to work correctly together with webrepl.
- Interface was tested to work correctly when sending and receiving
  large files with ampy.
- Disconnecting terminal or USB will not hang the system when it's
  trying to print.
2021-08-31 00:12:41 +10:00
Peter Hinch 3720a570f2 docs/reference: Mention that slicing a memoryview causes allocation. 2021-08-30 23:55:29 +10:00
Fernando 4954290e86 docs/esp8266: Use monospace for software tools.
Signed-off-by: Fernando <fepegar@gmail.com>
2021-08-30 23:51:27 +10:00
Fernando 577a3c4192 docs/library: Fix usage of :term: for frozen module reference.
Signed-off-by: Fernando <fepegar@gmail.com>
2021-08-30 23:51:18 +10:00
Jim Mussared e9a26791e5 drivers/neopixel: Reduce code size of driver.
Saves 71 bytes of bytecode.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-30 23:26:45 +10:00
Jim Mussared d63b287c85 drivers/neopixel: Optimize fill() for speed.
This makes fill() about 7x faster (PYBV11 and PYBD_SF6) for the cost of +40
bytes of bytecode (or 120 bytes text).

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-30 23:26:29 +10:00
Durapensa 80cadc6ec1 Added Espressif-assigned PID for "Lolin S2 Mini - CircuitPython" 2021-08-30 06:31:20 -04:00
Limor "Ladyada" Fried 73be98c9d1
Merge pull request #5265 from ladyada/main
fix i2c
2021-08-29 21:37:51 -04:00
Radomir Dopieralski 02ada0af5f Update stage library to use keypad module on pygamer and pybadge 2021-08-29 23:57:32 +02:00
lady ada d50dc064ee fix i2c 2021-08-29 17:53:57 -04:00
Jeff Epler 83120eb1b2 Actually fix building ports without parallel displays 2021-08-29 11:49:47 -05:00
Jeff Epler f4bb3cc2c8 Fix stubs & doc redirects 2021-08-29 11:43:51 -05:00
Jeff Epler db3945edfe Make %p include the 0x prefix
.. and modify some messages where 0x was specified "manually".

This involves updating some tests to expect the new 0x to appear.
2021-08-29 11:36:29 -05:00
Jeff Epler 68af5fd040 unix: Filter out -std=gnu11
On Debian Bullseye, it is an error to include this flag when building
a C++ file, which caused the unix coverage build to fail.
2021-08-29 11:36:17 -05:00
Jeff Epler 266b6a1dd9 mkrules: Fix warning preprocessing C++ files
Messages like 'command-line option is [not valid] for C++' can result
from the way the preprocessor is invoked by `genlast`.  Instead, cause
the files to be preprocessed as though their content is "C".  This
should generally be OK, as they'll eventually be _compiled_ as C++.
When preprocessed as C, the file simply needs to generate all the same
QSTRS and TRANSLATEs.
2021-08-29 11:36:17 -05:00
Jeff Epler d7193dcf7c remove debug print 2021-08-29 11:36:17 -05:00
Jeff Epler 8f024316ad explicitly disable paralleldisplay on a few boards 2021-08-29 07:33:54 -05:00
Jeff Epler 468558896c remove paralleldisplay from ports where it was unimplemented 2021-08-29 07:33:54 -05:00
Jeff Epler 7520feed1c Move ParallelBus to its own module 2021-08-29 07:33:54 -05:00
iabdalkader a3ce8f08ec rp2/mpconfigport.h: Allow boards to add root pointers. 2021-08-29 12:22:50 +10:00
iabdalkader 79baef843b rp2/CMakeLists.txt: Add option to enable double tap reset to bootrom.
* For boards a with reset switch, pressing twice resets into bootloader.
* Enabled by linking with the pico_bootsel_via_double_reset library.
2021-08-29 12:20:01 +10:00
iabdalkader c82244a7c0 rp2/rp2_flash: Disable IRQs while calling flash_erase/program.
Flash erase/program functions disable the XIP bit.  If any code runs from
flash at the same time (eg an IRQ or code it calls) it will fail and cause
a lockup.
2021-08-29 12:15:01 +10:00
Jeff Epler be0b405e9b
Merge pull request #5256 from weblate/weblate-circuitpython-main
Translations update from Weblate
2021-08-28 18:58:24 -05:00
Hosted Weblate 92abe7b204
Merge remote-tracking branch 'origin/main' into main 2021-08-28 16:44:16 +02:00