summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-21esp32/modesp32: Add new gpio_deep_sleep_hold function.Jonathan Hogg
Add a new function to control whether held pins will retain their function through deep-sleep. Also document this function and explain how to use this in quickref to retain pin configuration during deep-sleep.
2022-03-21esp32/machine_pin: Add new hold keyword argument and remove PULL_HOLD.Jonathan Hogg
The current pull=Pin.PULL_HOLD argument doesn't make a lot of sense in the context of what it actually does vs what the ESP32 quickref document says it does. This commit removes PULL_HOLD and adds a new hold=True|False keyword argument to Pin()/Pin.init(). Setting this to True will cause the ESP32 to lock the configuration of the pin – including direction, output value, drive strength, pull-up/-down – such that it can't be accidentally changed and will be retained through a watchdog or internal reset. Fixes issue #8283, and see also #8284.
2022-03-21docs/esp32/quickref: Refine deep-sleep power-saving notes.Jonathan Hogg
This attempts to better explain how pull-ups and pull-downs operate in deep-sleep mode.
2022-03-17mimxrt/mbedtls: Add NULL pointer check in m_free_mbedtls.Peter Züger
Signed-off-by: Peter Züger <zueger.peter@icloud.com>
2022-03-17stm32/mbedtls: Add NULL pointer check in m_free_mbedtls.Peter Züger
According to the C standard the free(void *ptr) function: if ptr is a null pointer, no action occurs. Signed-off-by: Peter Züger <zueger.peter@icloud.com>
2022-03-17stm32/boards: Convert F4xx and F7xx to new flash FS config.iabdalkader
Following on from 35e70c1698047170f9fb8b1edc65a7f7125f267f. Fixes issue #8390.
2022-03-16extmod/modure: Set subject begin_line so ^ doesn't match interior.Damien George
Fixes issue #8402. Signed-off-by: Damien George <damien@micropython.org>
2022-03-16lib/re1.5: Distinguish between subject start-of-line and start-of-srch.Damien George
Otherwise a repeated sub/split will continue to match ^ to the start of that search. Signed-off-by: Damien George <damien@micropython.org>
2022-03-16py/showbc: Remove global variables and make DECODE_PTR work correctly.Damien George
The bytecode state variables mp_showbc_code_start and mp_showbc_constants have been removed and made local variables passed into the various functions. As part of this, the DECODE_PTR macro is fixed so it extracts the relevant pointer from the child_table (a regression introduced in f2040bfc7ee033e48acef9f289790f3b4e6b74e5). Signed-off-by: Damien George <damien@micropython.org>
2022-03-16py/parse: Handle check for target small-int size in parser.Damien George
This means that all constants for EMIT_ARG(load_const_obj, obj) are created in the parser (rather than some in the compiler). Signed-off-by: Damien George <damien@micropython.org>
2022-03-16py/parse: Put const bytes objects in parse tree as const object.Damien George
Instead of as an intermediate qstr, which may unnecessarily intern the data of the bytes object. Signed-off-by: Damien George <damien@micropython.org>
2022-03-16py/parse: Simplify handling of const int parse nodes.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-10unix/variants: Enable a few optimisations and features on dev, coverage.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-10unix/variants: Use rom feature config for standard, dev, coverage.Damien George
This change is a no-op in terms of functionality. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10unix/mpconfigport.h: Collect together config options from extra level.Damien George
This change is a no-op in terms of functionality. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10py/modsys: Add optional mutable attributes sys.ps1/ps2 and use them.Damien George
This allows customising the REPL prompt strings. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10py/modsys: Add optional sys.tracebacklimit attribute.Damien George
With behaviour as per CPython. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10py/modsys: Add optional attribute delegation.Damien George
To be enabled when needed by specific sys attributes. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10py/objmodule: Support delegating failed attr lookups.Damien George
This commit adds generic support for mutable module attributes on built in modules, by adding support for an optional hook function for module attribute lookup. If a module wants to support additional attribute load/ store/delete (beyond what is in the constant, globals dict) then it should add at the very end of its globals dict MP_MODULE_ATTR_DELEGATION_ENTRY(). This should point to a custom function which will handle any additional attributes. The mp_module_generic_attr() function is provided as a helper function for additional attributes: it requires an array of qstrs (terminated in MP_QSTRnull) and a corresponding array of objects (with a 1-1 mapping between qstrs and objects). If the qstr is found in the array then the corresponding object is loaded/stored/deleted. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10tests/extmod/vfs_posix.py: Only test statvfs if it exists.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-10windows: Switch to VFS subsystem and use VfsPosix.Damien George
Following the unix port. Signed-off-by: Damien George <damien@micropython.org>
2022-03-09unix/moduos: Convert module to use extmod version.Damien George
All variants now use extmod/moduos.c as their uos module implementation. In particular this means they all have MICROPY_VFS enabled and use VfsPosix for their filesystem. As part of this, the available functions in uos become more consistent with other ports: - coverage variant gets uos.urandom - minimal and standard variant get: unlink, chdir, getcwd, listdir Signed-off-by: Damien George <damien@micropython.org>
2022-03-09esp8266/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09stm32/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09mimxrt/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09qemu-arm/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09samd/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09zephyr/moduos: Convert module to use extmod version.Damien George
This also adds uos.unlink(), for all ports that use extmod/moduos.c. Signed-off-by: Damien George <damien@micropython.org>
2022-03-09esp32/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09extmod/moduos: Create general uos module to be used by all ports.Damien George
Based on the rp2 port version, with the rp2 port converted to use this module. Signed-off-by: Damien George <damien@micropython.org>
2022-03-09rp2: Add USB MSC support.iabdalkader
It is currently not enabled by default on any board.
2022-03-08extmod/moduzlib: Fix parsing zlib header dict size.Daniël van de Giessen
From RFC 1950 section 2.2: "CINFO is the base-2 logarithm of the LZ77 window size, minus eight (CINFO=7 indicates a 32K window size)" Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
2022-03-08mimxrt/hal/pwm_backport: Make PWM symmetric, and round division calcs.robert-hh
Ensure the symmetry of PWM: the duty rate of X and Q channels was not 50%, when it should have been. That is evident at high frequencies, like 15Mhz or 37.5 MHz. At low frequencies the deviation mattered less. The A/B channels were fine. Also round up or down non-integer division factors. Before, always the floor value was used.
2022-03-08mimxrt/eth: Avoid a race condition for Ethernet.robert-hh
That caused Ethernet to lock up at high data rates after ~200MByte data average in a row. Tested now with data bursts up to 10 GByte and overall data rates of ~8MByte/s at the Eth100 port.
2022-03-08mimxrt/boards: Support using an optional board-specific manifest.py.robert-hh
If the board directory contains a manifest.py file, it will be included. File not found errors will be ignored.
2022-03-08mimxrt/boards/TEENSY41: Use the same SPI1 pins for Teensy 4.0 and 4.1.robert-hh
Teensy 4.1 used different pins for SPI1 than Teensy 4.0, which made the boards unnecessarily different.
2022-03-08mimxrt/eth: Fix an Ethernet transmit error.robert-hh
Sometimes frames could not be sent immediately because the controller was still busy with previous frames. Then, an error was returned to lwip. This fix adds a limited number of retries for this busy state, waiting 100µs before the next attempt. Typically the transmit succeeds now at the second attempt. Second change: Reset the controller for a clean state after soft reset.
2022-03-08mimxrt/boards: Add board files for MIMXRT1015 and MIMXRT1015_EVK.robert-hh
OCOTP_Init() has been removed from mphalport.c. The library files are missing for the MIMXRT1015, and for just reading the OCOTP the Init is not required.
2022-03-08mimxrt/machine_spi: Add omitted GPIO config.robert-hh
The method was changed, but not for the CSx pins. No functional change.
2022-03-08mimxrt/machine_pin: Change pin drive constants to DRIVE_x naming.Philipp Ebensberger
Updated DRIVE_x constants representing pin drive strength. Signed-off-by: Philipp Ebensberger
2022-03-07docs/library/machine.Pin: Update to use preferred DRIVE_x constants.Jonathan Hogg
Update documents with new common names for the drive strength constants.
2022-03-07docs/esp32/quickref: Document GPIO drive strength.Jonathan Hogg
Add brief documentation of the new `drive` keyword argument.
2022-03-07esp32/machine_pin: Add support for pin drive strength.Jonathan Hogg
Add support for configuring drive strength of output pins with `drive` keyword argument and `DRIVE_*` constants.
2022-03-07tests/micropython: Switch from set.pop to raise-0 to test exc strings.Damien George
To not rely on sets, which are an optional feature. Signed-off-by: Damien George <damien@micropython.org>
2022-03-07tests/run-tests.py: Include test files ending in _set as set tests.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-07zephyr/prj.conf: Enable CONFIG_BUILD_OUTPUT_HEX to generate .hex output.Damien George
The .hex file contains more information than .bin, useful for flashing. Signed-off-by: Damien George <damien@micropython.org>
2022-03-07zephyr: Upgrade to Zephyr v3.0.0.Maureen Helm
Updates the Zephyr port build instructions and CI to use the latest Zephyr release tag. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-03-07zephyr: Update include path to disk_access.h.Maureen Helm
The disk_access header was moved to a different path in Zephyr v2.6.0. The old path was deprecated for two releases (v2.6.0 and v2.7.0) and will no longer be supported after Zephyr v2.7.0. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-03-07tools/mpremote: Bump version to 0.2.0.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-07tests/basics: Add test for creating small-ints in nan-box builds.Damien George
Signed-off-by: Damien George <damien@micropython.org>