Commit Graph

26506 Commits

Author SHA1 Message Date
Jonathan Hogg eb3029c669 esp32/machine_spi: Calculate actual attained baudrate.
Calculate the actual baudrate that the hardware is capable of achieving 
and remember it so that printing the SPI object will show this. Fixes 
#7530.
2021-07-16 23:05:30 +10:00
root eebddbb16d Change min pulse calculation 2021-07-15 21:27:23 -05:00
Scott Shawcroft ca2cb9af2b
Remove MICROPY_PORT_* macros used for never reset
Now we use never_reset which is generally more correct and easier
to get right.

Fixes #5001 and fixes #4997
2021-07-15 16:20:04 -07:00
Scott Shawcroft 448597b4a0
ScanEntry.matches() kwarg all -> match_all
Related to #3007
2021-07-15 14:36:57 -07:00
Scott Shawcroft c16f559574
Merge pull request #4907 from jepler/refine-stubs
refine stubs-building procedure
2021-07-15 12:11:58 -07:00
Dan Halbert 698a392cf1
Merge pull request #4762 from Neradoc/small-timestamps-if-epoch-2000
time.localtime: low timestamps when epoch is 2000
2021-07-15 15:08:09 -04:00
Jeff Epler e528d8dac3
Merge pull request #5002 from tannewt/microbitv2
Create first BLE-only board, Micro:Bit v2
2021-07-15 14:02:35 -05:00
Jeff Epler 0bb21c7793
Merge pull request #5003 from weblate/weblate-circuitpython-main
Translations update from Weblate
2021-07-15 13:59:37 -05:00
Scott Shawcroft 4d3a355f0a
Tweak blink and treat SWD reset like reset button 2021-07-14 16:45:47 -07:00
Scott Shawcroft e0919c4b9c
Install intelhex on windows CI 2021-07-14 10:47:03 -07:00
Hosted Weblate fe12847afc
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/
2021-07-14 19:30:06 +02:00
Lucian Copeland e3bc800bbc
Merge pull request #4999 from hierophect/esp-timer-leak
ESP32S2: Fix PWM timer leak and variable frequency conflicts
2021-07-14 13:29:56 -04:00
Scott Shawcroft 0fadf028ef
Create first BLE-only board, Micro:Bit v2
This fixes build issues with USB off, tweaks the README to allow
for BLE-only boards and adds the Micro:Bit v2 definition.

Fixes #4546
2021-07-14 09:55:51 -07:00
robert-hh 98c5703027 mimxrt/machine_i2c: Add hardware-based machine.I2C to machine module.
It uses non-blocking transfer of data.  Advantage over SoftI2C:
- Higher data rate up to ~3 MHZ.
- Full protocol support.
2021-07-15 00:36:31 +10:00
Damien George 06277a9169 mimxrt/machine_led: Use mp_raise_msg_varg helper.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-15 00:12:41 +10:00
Damien George 70b8e1d1f5 py/obj: Fix formatting of comment for mp_obj_is_integer.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-15 00:12:41 +10:00
Damien George 022b8a7fea py/objexcept: Make mp_obj_new_exception_arg1 inline.
This function is rarely used so making it inline reduces code size.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-15 00:12:41 +10:00
Damien George 74085f167e py/modsys: Optimise sys.exit for code size by using exception helpers.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-15 00:12:41 +10:00
Damien George 38a204ed96 py: Introduce and use mp_raise_type_arg helper.
To reduce code size.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-15 00:12:41 +10:00
Damien George bb00125aaa py: Support single argument to optimised MP_OBJ_STOP_ITERATION.
The MP_OBJ_STOP_ITERATION optimisation is a shortcut for creating a
StopIteration() exception object, and means that heap memory does not need
to be allocated for the exception (in cases where it can be used).  This
commit allows this optimised object to take an optional argument (before,
it could only have no argument).

The commit also adds some new tests to cover corner cases with
StopIteration and generators that previously did not work.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-15 00:12:41 +10:00
Damien George e3825e28e6 py/objexcept: Make mp_obj_exception_get_value support subclassed excs.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-15 00:12:41 +10:00
Damien George b8255dd2e0 py/vm: Simplify handling of MP_OBJ_STOP_ITERATION in yield-from opcode.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-15 00:12:41 +10:00
Jim Mussared 22fdb21302 windows/appveyor: Update to VS 2017 and use Python 3.8 for build/test.
MicroPython implements some 3.5+ features, and this change helps to reduce
the need for some .exp files in the test suite.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-07-15 00:10:52 +10:00
Scott Shawcroft e7c5165ff6
Merge pull request #4994 from bobthechemist/atmel-samd-analogio-deinit
added pin object to analogout
2021-07-13 18:13:11 -07:00
Lucian Copeland c504a85ecc Add shared bindings check for invalid frequency 2021-07-13 18:22:43 -04:00
Lucian Copeland bd39641f7e Fix PWM timer leak and varfreq conflicts 2021-07-13 18:05:47 -04:00
Scott Shawcroft 6188301ccf
Merge pull request #3941 from AdamCummick/add_uart_subclassing
Add UART subclassing
2021-07-13 12:19:08 -07:00
Scott Shawcroft 1a4061ca4a
Merge pull request #4995 from hathach/fix-midi-write-offby1
update tinyusb to fix midi write off by one
2021-07-13 12:17:46 -07:00
Scott Shawcroft c2685970af
Merge pull request #4987 from DavePutz/issue_4983
Fix for Issue #4983 - stop state machine before restarting
2021-07-13 12:16:33 -07:00
Scott Shawcroft c6669e2241
Merge pull request #4993 from weblate/weblate-circuitpython-main
Translations update from Weblate
2021-07-13 12:16:01 -07:00
root 5c9823d8cb Change order of operations in restart 2021-07-13 11:17:03 -05:00
hathach ae48c3d2db update tinyusb to fix midi write off by one 2021-07-13 21:45:42 +07:00
Damien George 6430cd3e02 unix/variants: Enable help and help("modules") on standard and dev.
See related #1354, #2906, #3436.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-13 16:18:15 +10:00
Damien George 0ee256b8b1 github/workflows: Add workflow to build and test unix dev variant.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-13 15:58:39 +10:00
Damien George 240888a0d2 unix/Makefile: Add back LIB_SRC_C to list of object files.
This fixes the dev build (it needs LIB_SRC_C for Bluetooth) which was
broken by 136369d72f.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-13 15:58:39 +10:00
Damien George 831cc4a61d stm32/boards/NUCLEO_F446RE: Fix I2C1 pin assignment to match datasheet.
Thanks to @aureliano2nd.

Signed-off-by: Damien George <damien@micropython.org>
2021-07-13 15:25:27 +10:00
microDev 916bd92b0c
update native_uart implementation 2021-07-13 08:56:18 +05:30
microDev fc975d6147
Merge branch 'adafruit:main' into add_uart_subclassing 2021-07-13 08:53:37 +05:30
BoB LeSuer 35030fbb30 added pin object to analogout 2021-07-12 20:33:42 -04:00
Hosted Weblate 0da3a5de3d
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/
2021-07-13 01:38:04 +02:00
Scott Shawcroft 9fdecacec7
Merge pull request #4903 from jepler/split-type-objects
Split type objects
2021-07-12 16:37:55 -07:00
Scott Shawcroft 4b371a8182
Merge pull request #4991 from kattni/rainbowio
Rename rainbow to rainbowio
2021-07-12 13:14:14 -07:00
Scott Shawcroft 9034867967
Merge pull request #4980 from pewpew-game/pewpew-fixx
pewpew10 - use _pew.get_ticks() for time tracking
2021-07-12 13:11:55 -07:00
root 490f263a41 Added code to reset SM program counter during a restart 2021-07-12 14:09:11 -05:00
Kattni Rembor 4579bf9b12 Rename rainbow to rainbowio 2021-07-12 14:40:01 -04:00
Damien George e3291e1801 lib,shared: Update README's based on contents of these dirs.
Signed-off-by: Damien George <damien@micropython.org>
2021-07-13 00:17:02 +10:00
Jeff Epler 6d0ed1a898 update ulab 2021-07-12 08:48:47 -05:00
Jeff Epler 93c6d16d3c Rename mp_type_attr -> mp_type_get_attr_slot 2021-07-12 07:30:29 -05:00
Jeff Epler 88434c53c7 Rename mp_type_parent -> mp_type_get_parent_slot 2021-07-12 07:30:16 -05:00
Jeff Epler 75e995f372 Rename mp_type_protocol -> mp_type_get_protocol_slot 2021-07-12 07:04:04 -05:00