Commit Graph

26506 Commits

Author SHA1 Message Date
Jeff Epler 1b2da0cda3 Rename mp_type_getbuffer -> mp_type_get_getbuffer_slot 2021-07-12 07:04:02 -05:00
Jeff Epler cdd879a3cc Rename mp_type_iternext -> mp_type_get_iternext_slot 2021-07-12 07:03:59 -05:00
Jeff Epler 9f6132b2ba Rename mp_type_getiter -> mp_type_get_getiter_slot 2021-07-12 07:03:57 -05:00
Jeff Epler 0efdf4a549 Rename mp_type_subscr -> mp_type_get_subscr_slot 2021-07-12 07:03:55 -05:00
Jeff Epler 6b8190b408 Rename mp_type_binary_op -> mp_type_get_binary_op_slot 2021-07-12 07:03:52 -05:00
Jeff Epler 46b5ed33ed Rename mp_type_unary_op -> mp_type_get_unary_op_slot 2021-07-12 07:03:50 -05:00
Jeff Epler ec53a674cf Rename mp_type_call -> mp_type_get_call_slot 2021-07-12 07:03:25 -05:00
Jeff Epler 9c1434014c remove redundant docs of struct _mp_obj_full_type_t 2021-07-12 07:01:14 -05:00
Jeff Epler 52540a9830 Rename EXTENDED_FIELDS -> MP_TYPE_EXTENDED_FIELDS 2021-07-12 06:57:59 -05:00
Damien George 136369d72f all: Update to point to files in new shared/ directory.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-12 17:08:10 +10:00
Damien George 4d546713ec shared: Introduce new top-level dir and move 1st party lib code there.
This commit moves all first-party code developed for this project from lib/
to shared/, so that lib/ now only contains third-party code.

The following directories are moved as-is from lib to shared:

    lib/libc            -> shared/libc
    lib/memzip          -> shared/memzip
    lib/netutils        -> shared/netutils
    lib/timeutils       -> shared/timeutils
    lib/upytesthelper   -> shared/upytesthelper

All files in lib/embed/ have been moved to shared/libc/.

lib/mp-readline has been moved to shared/readline.

lib/utils has been moved to shared/runtime, with the exception of
lib/utils/printf.c which has been moved to shared/libc/printf.c.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-12 17:07:36 +10:00
Damien George 925878b2f8 ports: Update for move of crypto-algorithms, uzlib to lib.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-12 16:37:20 +10:00
Damien George 94dfaff18b extmod: Update for move of crypto-algorithms, re1.5, uzlib to lib.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-12 16:37:07 +10:00
Damien George 966e8bf934 LICENSE: Update for move of crypto-algorithms, re1.5, uzlib to lib.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-12 16:36:40 +10:00
Damien George 6dd92d7742 lib/crypto-algorithms: Move crypto-algorithms code from extmod to lib.
It's third-party code, and not necessarily tied to extmod.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-12 16:36:37 +10:00
Damien George d1bfb271d7 lib/uzlib: Move uzlib code from extmod to lib.
It's third-party code, and not necessarily tied to extmod.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-12 16:36:34 +10:00
Damien George d1d172f536 lib/re1.5: Move re1.5 code from extmod to lib.
It's third-party code, and not necessarily tied to extmod.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-12 16:36:26 +10:00
root 9d5fbea7a3 Fix for Issue #4983 - stop state machine before restarting 2021-07-11 21:02:28 -05:00
Jeff Epler 0c6dc6f0a4
Merge pull request #4936 from jepler/supervisor-ticks
supervisor: Add a function to get "wrapping" milliseconds
2021-07-11 19:54:32 -05:00
root 0ea750b2d0 Fix handling of short pulses 2021-07-11 16:38:24 -05:00
Jeff Epler 1600f11545 Merge remote-tracking branch 'origin/main' into supervisor-ticks 2021-07-11 15:12:55 -05:00
Jeff Epler 22e8a50585
Merge pull request #4978 from jepler/dictionary-better-heuristic
makeqstrdata: use an extremely accurate dictionary heuristic
2021-07-11 12:49:03 -05:00
Jeff Epler 0b8b16f6ac increase comment on accuracy of the net savings estimate function
Thanks to tyomitch for suggesting the comment could be more accurate.
2021-07-11 08:57:27 -05:00
Jeff Epler 7bee37e9c7
Merge pull request #4981 from DavePutz/issue_4939
Add LED and GP25 for Cytron Maker Pi Pico
2021-07-10 20:04:40 -05:00
Jeff Epler fd4a7fce91 add tool to parse out firmware sizes for comparison 2021-07-10 19:11:47 -05:00
DavePutz 25e799e51a
Add LED and GP25 for Cytron Maker Pi Pico 2021-07-09 20:49:59 -05:00
Radomir Dopieralski b2aa17a553 pewpew10 - use _pew.get_ticks() for time tracking
Somehow PR https://github.com/adafruit/circuitpython/pull/4200 got
reverted, repeating it, with a proper tag.
2021-07-10 01:50:43 +02:00
Jeff Epler 7302bc09a7 rename the type flag to EXTENDED for consistency 2021-07-09 14:59:37 -05:00
Jeff Epler 52e75c645d makeqstrdata: Don't include strings that are a net loss! 2021-07-09 14:26:43 -05:00
Jeff Epler 8836198ff1 TextSplitter: don't mutate 'words'
I was puzzled by why the dictionary words were sorted by length.
It was because TextSplitter sorted its parameter, instead of a copy.

This doesn't affect encoding size, but does affect the encoding NUMBER
of the found words.  We'll deliberately restore sorting by length next,
for other reasons, but not by spooky action.
2021-07-09 14:02:31 -05:00
Scott Shawcroft 58fdf9e940
Merge pull request #4975 from DavePutz/issue_4945
Issue #4945 - handle multiple PulseIns
2021-07-09 11:03:16 -07:00
Scott Shawcroft 0e88b77b3e
Merge pull request #4977 from pewpew-game/samd21-filesystem-size
Allow changing size of the filesystem on samd21 per board
2021-07-09 11:00:13 -07:00
Jeff Epler 99abd03b7a makeqstrdata: use an extremely accurate dictionary heuristic
Try to accurately measure the costs of including a word in the dictionary
vs the gains from using it in messages.

This saves about 160 bytes on trinket_m0 ja, the fullest translation
for that board.  Other translations on the same board all have savings,
ranging from 24 to 228 bytes.

```
Translation     Before  After   Savings
ja              1164    1324    160
de_DE           1260    1396    136
fr              1424    1652    228
zh_Latn_pinyin  1448    1520    72
pt_BR           1584    1736    152
pl              1592    1640    48
es              1724    1816    92
ko              1724    1816    92
fil             1764    1800    36
it_IT           1896    2040    144
nl              1956    2136    180
ID              2072    2180    108
cs              2124    2148    24
sv              2340    2448    108
en_x_pirate     2644    2740    96
en_GB           2652    2752    100
el              2656    2768    112
en_US           2656    2768    112
hi              2656    2768    112
```
2021-07-09 12:45:49 -05:00
Dan Halbert 7c2fd270a2
Merge pull request #4976 from kattni/rainbow
Adding rainbow module.
2021-07-08 21:56:38 -04:00
Jeff Epler 3191357807 Merge remote-tracking branch 'origin/main' into refine-stubs 2021-07-08 19:05:26 -05:00
Kattni Rembor 825a706135 Turn off MIDI on one build, fix name. 2021-07-08 17:31:10 -04:00
Radomir Dopieralski 92fa1055ef Allow changing size of the filesystem on samd21 per board
As the CircuitPython grows, it may at some point no longer be possible
to squeeze it on some of the flash-less SAMD21 boards, so it would be
good to have the option of shrinking the filesystem size on per-board
basis. This change allows to define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE
inside the board's mpconfigborard.h file.
2021-07-08 22:19:54 +02:00
Kattni Rembor 289575a811 Adding rainbow module. 2021-07-08 15:55:13 -04:00
root 4046b0fb0a Issue #4945 - handle multiple PulseIns 2021-07-08 14:09:21 -05:00
Dan Halbert e51d5e4df2
Merge pull request #4974 from dhalbert/rp2040-audio-and-spi-fixes
Rp2040 audio fixes; disallow ctrl-C interrupts of SPI and PIO.
2021-07-08 14:42:37 -04:00
Scott Shawcroft 45ed2f4008
Merge pull request #4973 from lesamouraipourpre/patch-1
Minor docs fix in TileGrid.c
2021-07-08 11:23:13 -07:00
Dan Halbert ab52a92704 Disallow ctrl-C interrupts of RP2040 SPI and PIO 2021-07-08 13:42:24 -04:00
Damien George e2f0b181f9 extmod/axtls-include: Add axtls_os_port.h to customise axTLS.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-08 23:51:49 +10:00
Damien George 75c1609c3a lib/axtls: Update to latest axtls 2.1.5 wih additional commits.
Changes are:
- update axTLS from 2.1.3 to 2.1.5
- os_port.h is now provided by the user of the library
- PLATFORM_RNG_U8 can be defined for get_random
- fix -fsanitize=undefined diagnostics

Signed-off-by: Damien George <damien@micropython.org>
2021-07-08 23:51:39 +10:00
Damien George 2e634d5ead lib/axtls: Switch to repo at micropython/axtls.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-08 23:40:00 +10:00
Dan Halbert a843b8a0d4 Merge remote-tracking branch 'adafruit/main' into rp2040-audio-and-spi-fixes 2021-07-08 08:22:21 -04:00
Dan Halbert bd6826496c Fix various RP2040 audio dma things: (see detailed commit message)
1. Check for correct error values from dma_claim_unused_channel.
2. Introduce a .stereo flag for simplicity.
3. Clarify PWM carrier frequency choice.
4. Start introducing quiescent audio value. Still need to ramp up/down.
5. Redo audio stop logic a bit.
6. Fix (unrelated) displayio dependency things.

There is still an interference problem between other DMA users and audio. Still debugging this.
2021-07-08 08:14:49 -04:00
Damien George 0613d3e356 rp2/tusb_config.h: Set CFG_TUD_CDC_EP_BUFSIZE to 256.
This improves the speed of data going out of the MCU.

See related #7479.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-08 13:20:53 +10:00
Damien George 132d93886f ports: Use common mp_hal_stdout_tx_strn_cooked instead of custom one.
To reduce code duplication.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-08 12:59:31 +10:00
Damien George 20a6044952 lib/utils/stdout_helpers: Make mp_hal_stdout_tx_strn_cooked efficient.
To reduce the number of calls to mp_hal_stdout_tx_strn and improve the
overall throughput of printing data.  This implementation is taken from
ports/stm32/mphalport.c.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-08 12:59:31 +10:00