- 26 Apr, 2023 22 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
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>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Since c80e7c14 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>
-
IcedRooibos authored
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>
-
Jim Mussared authored
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>
-
Jim Mussared authored
- 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>
-
Jim Mussared authored
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
This is unused in the client, only needed in the server. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
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>
-
Jim Mussared authored
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>
-
Jim Mussared authored
Obtaining the end_handle was added in cacc96d9. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
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>
-
Jim Mussared authored
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>
-
Jim Mussared authored
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>
-
Jim Mussared authored
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>
-
Jim Mussared authored
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>
-
Jim Mussared authored
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>
-
- 21 Apr, 2023 3 commits
-
-
Damien George authored
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>
-
Damien George authored
This reverts commit 0613d3e3. 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>
-
David (Pololu) authored
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 a707fe50 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.
-
- 14 Apr, 2023 1 commit
-
-
Jonas Scharpf authored
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>
-
- 12 Apr, 2023 1 commit
-
-
iabdalkader authored
-
- 11 Apr, 2023 5 commits
-
-
iabdalkader authored
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.
-
iabdalkader authored
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.
-
iabdalkader authored
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.
-
iabdalkader authored
-
Alex Riesen authored
The GreenHills preprocessor produces #line directives without a file name, which the regular expression used to distiguish between "# <number> file..." (GCC and similar) and "#line <number> file..." (Microsoft C and similar) does not match, aborting processing. Besides, the regular expression was unnecessarily wide, matching lines containing a "#", followed by any number of 'l','i','n', and 'e' characters. Signed-off-by: Alex Riesen <alexander.riesen@cetitec.com>
-
- 07 Apr, 2023 1 commit
-
-
Jim Mussared authored
This adds a new MODE_PYPROJECT, which gives basic support to allow packaging a small subset of micropython-lib packages to PyPI. This change allows a package in micropython-lib to: - Add a "pypi" name to its metadata indicating that it's based on a PyPI package. - Add "stdlib" to its metadata indicating that it's a micropython version of a stdlib package. - Add a "pypi_publish" name to its metadata to indicate that it can be published to PyPI (this can be different to the package name, e.g. "foo" might want to be published as "micropython-foo"). When a package requires() another one, if it's in MODE_PYPROJECT then if the package is from pypi then it will record that as a pypi dependency instead (or no dependency at all if it's from stdlib). Also allows require() to explicitly specify the pypi name. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
- 05 Apr, 2023 4 commits
-
-
David Grayson authored
Helps prevent the filesystem from getting formatted by mistake, among other things. For example, on a Pico board, entering Ctrl+D and Ctrl+C fast many times will eventually wipe the filesystem (without warning or notice). Further rationale: Ctrl+C is used a lot by automation scripts (eg mpremote) and UI's (eg Mu, Thonny) to get the board into a known state. If the board is not responding for a short time then it's not possible to know if it's just a slow start up (eg in _boot.py), or an infinite loop in the main application. The former should not be interrupted, but the latter should. The only way to distinguish these two cases would be to wait "long enough", and if there's nothing on the serial after "long enough" then assume it's running the application and Ctrl+C should break out of it. But defining "long enough" is impossible for all the different boards and their possible behaviour. The solution in this commit is to make it so that frozen start-up code cannot be interrupted by Ctrl+C. That code then effectively acts like normal C start-up code, which also cannot be interrupted. Note: on the stm32 port this was never seen as an issue because all start-up code is in C. But now other ports start to put more things in _boot.py and so this problem crops up. Signed-off-by: David Grayson <davidegrayson@gmail.com>
-
iabdalkader authored
The dispatch active flag is only set once and never reset, so it will always call the dispatch handler (once enabled), and it's not really needed because it doesn't make things more efficient. Also remove unused included headers.
-
robert-hh authored
Like frame error, overrun, etc. Fix is provided by @ricksorensen.
-
robert-hh authored
It was incomplete.
-
- 04 Apr, 2023 3 commits
-
-
robert-hh authored
Changes in this commit: - Move the pwm_seq array to the p_config data structure. That prevents potential resource collisions between PWM devices. - Rename the keyword argument 'id' to 'device'. That's consistent with the SAMD port as the other port allowing to specify it.
-
iabdalkader authored
This regression was introduced by 3d46fe67.
-
Oliver Joos authored
This enables the use of WLAN(0).status('rssi') to get current RSSI of the AP that the STA is connected to. Signed-off-by: Damien George <damien@micropython.org>
-