Commit Graph

4748 Commits

Author SHA1 Message Date
microDev 1977011cfd
use `mp_arg_validate_type` for keyword args 2021-10-10 15:28:35 +05:30
microDev 0eafb672b8
Convert all modules to use MP_REGISTER_MODULE
Convert binascii, errno, json, and re to use MP_REGISTER_MODULE.

Resolves #5183.
2021-10-05 18:45:44 +05:30
microDev a46aa48e23
Convert more modules to use MP_REGISTER_MODULE
Convert espidf, os, rp2pio, samd and time to use MP_REGISTER_MODULE.

Related to #5183.
2021-10-05 16:58:24 +05:30
Jeff Epler 10fdc80b9c
Merge pull request #5378 from jepler/esp32s2-paralleldisplay-i2s
Espressif: Use i2s peripheral for parallel LCD displays
2021-09-23 20:25:43 -05:00
Jeff Epler a0cfceec28 Stub out the non-sequential parallel bus constructor
.. most boards can't support non-sequential pins, so share the
implementation of the error routine so we get an identical message.
2021-09-21 15:00:43 -05:00
Max Holliday f16a4754ba changed boot counter #ifdef to safer #if 2021-09-17 14:40:16 -06:00
Max Holliday 818020d4c9
Merge branch 'adafruit:main' into pycubed_v05c 2021-09-17 14:35:17 -06:00
Jeff Epler 2916167bf4 paralleldisplay: make it actually importable 2021-09-16 14:11:16 -05:00
Max Holliday 5b69aa0a58
Merge branch 'adafruit:main' into pycubed_v05c 2021-09-15 14:23:56 -06:00
Scott Shawcroft e544909b5b
Clear the buffer byte between ATB and FTB
This ensures it has a known start state. An unknown state risks it
looking like a tail block similar to the problem fixed by #5245.

Fixes #5305
2021-09-14 16:24:37 -07:00
Scott Shawcroft 973a90f2aa
Rename esp32s2 port to espressif
This is in preparation for ESP32-S3 support and potentially others.

Related to #4363
2021-09-13 16:44:55 -07:00
Max Holliday fa83c1c2f9
adding boot counter to main.c
The boot counter is a uint8_t single-byte counter stored in the first NVM byte position (`micrcontroller.nvm[0]`). The counter increments by 1 each time the board boots, regardless if it's a hard or soft reset. 

Enable the boot counter by adding `#define CIRCUITPY_BOOT_COUNTER 1` to your board's mpconfigboard.h file. Note that an error will be thrown during the build if `CIRCUITPY_INTERNAL_NVM_SIZE` is not also set within mpconfigboard.h.
2021-09-08 19:56:23 -06:00
microDev 86221b9895
revert localization of repl messages 2021-09-07 16:28:00 +05:30
microDev d526925d49
make aesio module full build dependent 2021-09-02 19:02:01 +05:30
Rob Capellini 9002f351b4 Convert more modules to use MP_REGISTER_MODULE
Convert _eve, _pew, aesio, alarm, audiopwmio, bitops, camera, canio, dualbank, gnss, i2cperipheral, imagecapture, ipaddress, memorymonitor, sdioio, socketpool, ssl, uheap, ustack, watchdog, and wifi modules to use MP_REGISTER_MODULE.

Related to #5183.
2021-09-01 00:19:05 -04:00
Scott Shawcroft 92a43192f8
Fix mpy-cross by providing default 2021-08-31 13:38:37 -07:00
Scott Shawcroft 771b4c7464
Add two space saving knobs
* Reduce the number of supported HID reports of IDs per descriptor.
  This saves ~200 bytes in the default HID objects.
* (Not enabled) Compute QSTR attrs on init. This trades 1k RAM for
  flash. Flash is the default (1).
2021-08-31 13:02:34 -07: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 5fb4fa6f12
Merge pull request #5260 from jepler/paralleldisplay
Split out paralleldisplay to its own module
2021-08-30 18:35:15 -07: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 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 7520feed1c Move ParallelBus to its own module 2021-08-29 07:33:54 -05:00
Scott Shawcroft 31b9dd408d
Merge pull request #5245 from jepler/pool-fix-circuitpython
gc.c: Ensure a gap of one byte before the finaliser table.
2021-08-27 09:33:05 -07:00
Jeff Epler 955c0276c2 Merge remote-tracking branch 'origin/main' into pool-fix-circuitpython 2021-08-27 09:26:29 -05:00
Jeff Epler 5a162eb168 gc.c: Ensure a gap of one byte before the finaliser table.
.. or, for !MICROPY_ENABLE_FINALISER, before the first block of the pool.

Closes: adafruit/circuitpython#5021
Closes: micropython/micropython#7116
Signed-off-by: Jeff Epler <jepler@gmail.com>
2021-08-27 09:23:08 -05:00
Jeff Epler 15133cbf59 gc.c: Avoid valgrind false positives.
When you wish to use the valgrind memory analysis tool on micropython,
you can arrange to define MICROPY_DEBUG_VALGRIND to enable use of
special valgrind macros. For now, this only fixes `gc_get_ptr`
so that it never emits the diagnostic "Conditional jump or move depends
on uninitialised value(s)".

Signed-off-by: Jeff Epler <jepler@gmail.com>
2021-08-27 09:23:08 -05:00
Rob Capellini b8f2799609 Convert more modules to use MP_REGISTER_MODULE
Convert bitbangio, bitmaptools, _bleio, board, busio, countio, digitalio, framebufferio, frequencyio, gamepadshift, getpass, keypad, math, microcontroller, and msgpack modules to use MP_REGISTER_MODULE.

Related to #5183.
2021-08-26 21:35:02 -04:00
Dan Halbert a608934f31 restrict WaveFile buffer size to 8-1024 2021-08-26 09:34:02 -04:00
microDev 5425454341
Merge pull request #5208 from jepler/small-memory-savings
Small memory savings
2021-08-26 09:22:14 +05:30
Rob Capellini ad103ac6f1 Convert more modules to use MP_REGISTER_MODULE
Convert adafruit_bus_device, adafruit_pixelbuf, analogio, atexit, audiobusio, audiocore, audioio, audiomixer, and audiomp3 modules to use MP_REGISTER_MODULE.

Related to #5183.
2021-08-25 20:48:55 -04:00
Rob Capellini deb8e2a50a Remove comment that no longer applies 2021-08-24 20:55:39 -04:00
Rob Capellini 17af5cd492 Use MP_REGISTER_MODULE with displayio, terminalio, and fontio
Convert from using MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS to using MP_REGISTER_MODULE for displayio, terminalio, and fontio modules.

Related to #5183.
2021-08-24 20:07:10 -04:00
Jeff Epler 6d26225b60 objgenerator: Unify two messages 2021-08-23 20:27:20 -05:00
Jeff Epler c310a618e8 objtraceback: merge with an existing message in objtype 2021-08-23 20:23:23 -05:00
microDev 57b4d0176f
Merge pull request #5077 from microDev1/atexit
Add atexit module
2021-08-23 19:49:46 +05:30
Dan Halbert 57841dc92b
Merge pull request #5171 from tannewt/unicode_filenames
Turn on unicode for FATFS
2021-08-21 16:31:54 -04:00
microDev 25437dcb33
Merge branch 'main' into atexit 2021-08-20 09:45:54 +05:30
microDev dd5b711dc7
Merge pull request #5166 from jepler/issue5154
Don't double-list modules that MP_REGISTER_MODULE
2021-08-20 09:25:03 +05:30
Scott Shawcroft 5c6e80a2bb
Shrink builds by defining advanced micropython API
Also, ignore more pins on SAMD boards and disable EXFAT on others.
2021-08-19 16:49:33 -07:00
Jeff Epler f1bbf406c4 remove a straggling QRIO_MODULE mention 2021-08-19 14:01:14 -05:00
Scott Shawcroft e0ce5ff045
Fix some builds by disabling exfat 2021-08-18 08:22:29 -07:00
Scott Shawcroft 11f1c42bb5
Turn on unicode for FATFS
This also tweaks the repr for unicode strings to only escape a few
utf-8 code points. This makes emoji show in os.listdir() for
example.

Also, enable exfat support on full builds.

Fixes #5146
2021-08-17 17:41:59 -07:00
Dan Halbert 5b0009cbc4
Merge pull request #5151 from dhalbert/usb_hid-changes
Support multiple reports per device in usb_hid
2021-08-17 17:14:28 -04:00
microDev 6c763762d4
restore sys.atexit() to prevent merge conflict 2021-08-17 10:13:01 +05:30
Scott Shawcroft 58b3b48939
Merge pull request #5157 from DavePutz/issue_5155
Make MICROPY_CPYTHON_COMPAT settable
2021-08-16 12:15:35 -07:00
microDev 1c4a6c3667
atexit module refinements
- add test for atexit module
- add callback to gc collection
- fix callback memory allocation
- execute callback on both code and repl exit
2021-08-16 21:37:32 +05:30
Jeff Epler ccc371ed53 Don't double-list modules that MP_REGISTER_MODULE
Closes: #5154
2021-08-16 08:50:57 -05:00
root 6c0e983658 Make MICROPY_CPYTHON_COMPAT settable 2021-08-15 20:49:24 -05:00
microDev 27563936ed
fix crash on raise of reload exception 2021-08-15 11:11:11 +05:30
Dan Halbert 4f8ff12afa wip 2021-08-14 12:36:40 -04:00