summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-27tools/ci.sh: Add functions to check code spelling using codespell.Damien George
Signed-off-by: Damien George <damien@micropython.org> tools/ci.sh: Explicitly specify pyproject.toml. Signed-off-by: Damien George <damien@micropython.org> tools/ci.sh: Import tomli. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27tools/ci.sh: Build both SAMD21 and SAMD51 boards as part of samd CI.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-04-27zephyr/modutime: Use extmod version of time module.Damien George
API change: time.time_ns() is added, but it just returns 0. No API or functional change to existing time functions. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27webassembly/modutime: Use extmod version of time module.Damien George
No API or functional change. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27unix/modutime: Use extmod version of time module.Damien George
No API or functional change. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27stm32/modutime: Use extmod version of time module.Damien George
No API or functional change. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27samd/modutime: Use extmod version of time module.Damien George
No API or functional change. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27rp2/modutime: Use extmod version of time module.Damien George
No API or functional change. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27renesas-ra/modutime: Use extmod version of time module.Damien George
No API or functional change. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27nrf/modules/utime: Use extmod version of time module.Damien George
API additions; - time.sleep() is added - time.ticks_cpu() is added, but it just returns 0 No API or functional change to existing time functions. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27mimxrt/modutime: Use extmod version of time module.Damien George
No API or functional change. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27esp8266/modutime: Use extmod version of time module.Damien George
No API or functional change. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27esp32/modutime: Use extmod version of time module.Damien George
No API or functional change. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27cc3200/mods/modutime: Use extmod version of time module.Damien George
API change: time.time_ns() is added, but it just returns 0. No API or functional change to existing time functions. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27extmod/modutime: Provide a generic time module.Damien George
Based on extmod/utime_mphal.c, with: - a globals dict added - time.localtime wrapper added - time.time wrapper added - time.time_ns function added New configuration options are added for this module: - MICROPY_PY_UTIME (enabled at basic features level) - MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME - MICROPY_PY_UTIME_TIME_TIME_NS Signed-off-by: Damien George <damien@micropython.org>
2023-04-27ports: Use extmod version of mktime instead of port-specific one.Damien George
Apart from slight differences in the error message, the functionality of all ports is unchanged. Signed-off-by: Damien George <damien@micropython.org>
2023-04-27extmod/utime_mphal: Provide a general mktime function.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-04-27renesas-ra: Change MICROPY_HW_BOARD_NAME definition to product name.Takeo Takahashi
Changes in this commit: - Change MICROPY_HW_BOARD_NAME definition to match the product name. - Rename board folder's name to match the product name style. - Change related files like Makefile, document descriptions, test cases, CI and tools. Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2023-04-27github/workflows: Fetch full history for mpremote workflow.Jim Mussared
Instead of doing the shallow checkout followed by an unshallow-with-tags, just set fetch-depth=0 to get the full history to start with. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26all: Bump version to 1.20.0.v1.20.0Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-04-26LICENSE,docs: Update copyright year range to include 2023.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-04-26lib/micropython-lib: Update submodule to latest.Damien George
This brings in support to publish packages to PyPI, adds missing metadata and fixes aioble descriptor flags. Signed-off-by: Damien George <damien@micropython.org>
2023-04-26stm32/cyw43_configport: Provide cyw43_hal_pin_config_irq_falling func.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-04-26lib/cyw43-driver: Update driver to latest version v1.0.0.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-04-26rp2/memmap_mp.ld: Allow a board to reserve memory for the C heap.Damien George
Since c80e7c14e6305e50e3b39f97172d4d8fe1214d3b changed the GC heap to use all unused RAM, there is no longer any RAM available for the traditional C heap (which is not used by default in MicroPython but may be used by C extensions). This commit adds a provision for a board to reserve RAM for the C heap, by defining MICROPY_C_HEAP_SIZE. Signed-off-by: Damien George <damien@micropython.org>
2023-04-26esp32/esp32_rmt: Fix looping behaviour for RMT on ESP32-S3.IcedRooibos
The previous code worked on ESP32 but not ESP32-S3. All the IDF (v4.4.3) examples call rmt_set_tx_loop_mode before rmt_write_items, so make that change here. Signed-off-by: Damien George <damien@micropython.org>
2023-04-26extmod/btstack/modbluetooth_btstack: Add default services.Jim Mussared
Even if the user doesn't call ble.gatts_register_services, always provide the default services. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26extmod/modbluetooth: Make all HCI transports trace in the same format.Jim Mussared
- Use HCI_TRACE macro consistently. - Use the same colour formatting. - Add a tool to convert to .pcap for Wireshark. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26tests/multi_bluetooth: Use multitest.broadcast instead of sleep.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26examples/bluetooth/ble_temperature_central.py: Remove service tuple.Jim Mussared
This is unused in the client, only needed in the server. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26tests/multi_bluetooth/ble_characteristic.py: Add write-no-response.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26tests/multi_bluetooth: Add test for descriptors.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26extmod/nimble: Fix flags for descriptor registration.Jim Mussared
The att_flags for descriptors does not use the same bitfield as for characteristics. This was leading to NimBLE descriptors getting the wrong flags set. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26extmod/btstack: Add support for CCCD to allow client subscriptions.Jim Mussared
This allows gatts_write(..., send_update=True) to work, which will send notifications/indications to subscribed clients. btstack already created the CCCD but writes to it were ignored. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26tests/multi_bluetooth/ble_subscribe: Use end_handle in desc discovery.Jim Mussared
Obtaining the end_handle was added in cacc96d9. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26extmod/btstack: Fix MTU handling.Jim Mussared
There was no event handler for central-initiated MTU exchange. Fix truncation of notify/indicate to match NimBLE. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26tests/multi_bluetooth/ble_mtu: Split peripheral/central-initiated.Jim Mussared
btstack only supports central-initiated, so this allows us to have a test that works on both (ble_mtu.py), and then another one for just the NimBLE supported behavior (ble_mtu_peripheral.py). Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26tests/multi_bluetooth: Use time.sleep_ms instead of time.sleep.Jim Mussared
On unix, time.sleep is implemented as select(timeout=<time>) which means that it does not run the poll hook during sleeping. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26extmod/btstack: Include value handle in client read/write events.Jim Mussared
This replaces the previous pending operation queue (that used to also be shared with pending server notify/indicate ops) with a single pending operation per connection. This allows the value handle to be correctly passed to the Python-level events. Also re-structure GATT client event handling to simplify the packet handler functions. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26extmod/btstack: Fix indicate/notify queuing.Jim Mussared
This adds a mechanism to track a pending notify/indicate operation that is deferred due to the send buffer being full. This uses a tracked alloc that is passed as the content arg to the callback. This replaces the previous mechanism that did this via the global pending op queue, shared with client read/write ops. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-26extmod/modbluetooth: Merge gatts_notify/indicate implementation.Jim Mussared
Makes gatts_notify and gatts_indicate work in the same way: by default they send the DB value, but you can manually override the payload. In other words, makes gatts_indicate work the same as gatts_notify. Note: This removes support for queuing notifications and indications on btstack when the ACL buffer is full. This functionality will be reimplemented in a future commit. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-22extmod/btstack: Switch to use hci_dump_init instead of hci_dump_open.Damien George
The latter is no longer available in the version of BTstack now in use by this repository. Signed-off-by: Damien George <damien@micropython.org>
2023-04-21shared/tinyusb: Revert setting of CFG_TUD_CDC_EP_BUFSIZE to 256.Damien George
This reverts commit 0613d3e3561a82fffa36594647ef916b19bc912b. The value of CFG_TUD_CDC_EP_BUFSIZE should match the endpoint size, otherwise data may stay in the lower layers of the USB stack (and not passed up to the higher layers) until a total of CFG_TUD_CDC_EP_BUFSIZE bytes have been received, which may not happen for a long time. Fixes issue #11253. Signed-off-by: Damien George <damien@micropython.org>
2023-04-21rp2/machine_i2c: Add timeout parameter for machine.I2C().David (Pololu)
This commit adds support for the `timeout` keyword argument to machine.I2C on the rp2 port, following how it's done on other ports. The main motivation here is avoid the interpreter crashing due to infinite loops when SDA is stuck low, which is quite common if the board gets reset while reading from an I2C device. A default timeout of 50ms is chosen because it's consistent with: - Commit a707fe50b085ec83722106609f6fd219faf9f030 which used a timeout of 50,000us for zero-length writes on the rp2 port. - The machine.SoftI2C class which uses 50,000us as the default timeout. - The stm32 port's hardware I2C, which uses 50,000us for I2C_POLL_DEFAULT_TIMEOUT_US. This commit also fixes the default timeout on the esp32 port to be consistent with the above, and updates the documentation for machine.I2C to document this keyword argument.
2023-04-15tools/mpremote: Add ctrl-x as additonal mpremote disconnect shortcut.Jonas Scharpf
The mpremote REPL can now be closed with either ctrl+] or ctrl+x, which gives users a choice, useful if the ']' key is difficult to access. Fixes issue #11197. Signed-off-by: Jonas Scharpf <jonas@brainelectronics.de>
2023-04-12mimxrt: Fix the build for boards without ROM API.iabdalkader
2023-04-11mimxrt/modmachine: Implement machine.bootloader().iabdalkader
If a board defines a custom bootloader entry function it will be called first, if not and the ROM API supports RUN bootloader API, then `machine.bootloader()` will jump to the ROM serial downloader in USB mode.
2023-04-11mimxrt/mpconfigport: Allow configuring different network interfaces.iabdalkader
This commit allows boards to disable Ethernet and keep the networking stack enabled, to use an alternate networking interface, such as WiFi. Note that the `network` and `socket` modules are now enabled by default for a board.
2023-04-11mimxrt/boards/MIMXRT1064_EVK: Fix board config to use internal flash.iabdalkader
This commit is necessary to make MicroPython work on this eval kit out of the box, as the eval kit ships with the HyperFlash physically disconnected from the bus (refer to the schematics or the user guide) and the QSPI connected instead, but the fuses/board/pins are configured to boot from internal flash (on FlexSPI2). Note that enabling the HyperFlash is not trivial, as it requires soldering and desoldering of many small footprint resistors and changing fuses.
2023-04-11mimxrt/Makefile: Fix internal flash configuration and build.iabdalkader