summaryrefslogtreecommitdiff
path: root/extmod
AgeCommit message (Collapse)Author
2022-01-13extmod/modbluetooth: Put declaration of connect_cancel in correct place.Damien George
This fixes a bug introduced in 851ecb2da178fff0b60aefdb5af502f28787a7ec Signed-off-by: Damien George <damien@micropython.org>
2022-01-13extmod/modbluetooth: Fix conditional compilation of ringbuf_put_uuid.Damien George
This fixes a bug introduced in a76604afba109d990e466cdcd5a69a82077a7f56 Signed-off-by: Damien George <damien@micropython.org>
2022-01-12extmod/network_ninaw10: Use socket timeout preset in modusocket.iabdalkader
2022-01-12extmod/modusocket: Initialise accepted socket state.iabdalkader
2022-01-12extmod/modusocket: Allow setting timeout on unbound sockets.iabdalkader
For an extended state socket, if settimeout() is called before a NIC is bound, save the timeout until the NIC is bound.
2022-01-06extmod/moduplatform: Detect xtensa arch.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-01-06extmod/network_ninaw10: Make recv/recvfrom interchangeable.iabdalkader
2022-01-06extmod/network_ninaw10: Return -1 on timeout from recv/send.iabdalkader
2022-01-06extmod/network_ninaw10: Make NIC state persistent.iabdalkader
2022-01-06extmod/network_ninaw10: Disable active connections before connecting.iabdalkader
2021-12-14extmod/network_ninaw10: Fix config of AP mode.iabdalkader
* Fix missing call to connect to configure module in AP mode. * Use enum for config/connect args indices.
2021-12-09extmod/modure: Redirect regex debug printing to mp_printf.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-12-09all: Update Python formatting to latest Black version 21.12b0.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-12-01extmod/modbluetooth: Support gap_connect(None) to cancel a connection.Jonathan Hogg
Allow cancellation of in-progress peripheral connections.
2021-11-19extmod/network_ninaw10: Fix scan list order to match other NICs.iabdalkader
2021-11-18extmod/uplatform: Use generic custom platform string.stijn
Don't force the 'HAL' string to be part of the platform string because it doesn't have a sensible meaning for all possible platforms, and swap it with the PLATFORM_ARCH string so the strings which most platforms have come first.
2021-11-18extmod/uplatform: Remove unused definitions.stijn
2021-11-17extmod/uasyncio: Fix gather returning exceptions from a cancelled task.Damien George
Fixes issue #5882.
2021-11-13drivers/ninaw10: Add ublox Nina-W10 WiFi/BT module driver.iabdalkader
- Add WiFi/BT drivers for ublox Nina-W10 (esp32 based) module. - Add ublox Nina-W10 Python module in extmod.
2021-10-26extmod/nimble: Remove workaround for OS_ENOMEM.Jim Mussared
This was fixed in NimBLE 1.4. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-10-26extmod/nimble: Update to NimBLE v1.4.Jim Mussared
We're using the MicroPython fork of NimBLE, which on the `micropython_1_4_0` branch re-adds support for 64-bit targets and fixes initialisation of g_msys_pool_list. Also updates modbluetooth_nimble.c to suit v1.4. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-10-26extmod/modbluetooth: Add connection interval to gap_connect.Jim Mussared
This forwards through directly to the NimBLE and BTStack connect functions. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-10-19extmod/vfs_posix_file: Support MP_STREAM_POLL in vfs_posix_file_ioctl.Andrew Leech
Allows asyncio reading of sys.stdin when MICROPY_PY_USELECT is used in the build configuration.
2021-09-24extmod/moduplatform: Improve implementation for PC ports.stijn
Fix identification of 32/64 bit and of the Windows platform and add a platform string mimicking CPython for the latter.
2021-09-19extmod: Add platform module.iabdalkader
It contains the compiler version, and underlying system HAL/SDK version.
2021-09-19rp2: Add framework for networking.iabdalkader
MICROPY_PY_NETWORK and MICROPY_PY_USOCKET need to be enabled by a board to get networking. No NICs have yet been defined.
2021-09-19extmod/nimble: Add nimble CMake fragment file.iabdalkader
2021-09-19extmod/mpbthci.h: Add mp_bluetooth_hci_uart_any prototype.iabdalkader
This allows drivers to use mpbthciport functions to read/write/poll UART.
2021-09-15extmod/modnetwork: Remove modnetwork socket u_state member.iabdalkader
To simplify the socket state. The CC3K driver (see drivers/cc3000/inc/socket.h and src/socket.c) has socket() returning an INT16 so there is now enough room to store it directly in the fileno member.
2021-09-15extmod/modnetwork: Remove STM32 references.iabdalkader
2021-09-15extmod/network_cyw43: Make consistent use of STA and AP constants.Damien George
The network.STA_IF and network.AP_IF constants are now independent to the CYW43_ITF_STA and CYW43_ITF_AP constants. Signed-off-by: Damien George <damien@micropython.org>
2021-09-15extmod/modnetwork: Define network interfaces in port config files.iabdalkader
So this network implementation becomes more generic.
2021-09-15extmod/modusocket: Add read/write stream methods to socket object.iabdalkader
Following other socket implementations.
2021-09-15extmod/modnetwork: Add extended socket state.iabdalkader
2021-09-15extmod/modnetwork: Add STA_IF and AP_IF constants.iabdalkader
2021-09-15extmod: Move modnetwork and modusocket from stm32 to extmod.iabdalkader
So they can be used by other ports.
2021-09-04extmod/machine_pwm: Factor out machine.PWM bindings to common code.Damien George
This commit refactors machine.PWM and creates extmod/machine_pwm.c. The esp8266, esp32 and rp2 ports all use this and provide implementations of the required PWM functionality. This helps to reduce code duplication and keep the same Python API across ports. This commit does not make any functional changes. Signed-off-by: Damien George <damien@micropython.org>
2021-09-02extmod/modonewire: Make _onewire module configurable via macro option.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-09-02extmod/machine_spi: Make SoftSPI configurable via macro option.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-09-02extmod/machine_i2c: Make SoftI2C configurable via macro option.Damien George
The zephyr port doesn't support SoftI2C so it's not enabled, and the legacy I2C constructor check can be removed. Signed-off-by: Damien George <damien@micropython.org>
2021-08-31drivers/cyw43: Make wifi join fail if interface is not active.Damien George
Otherwise the Python network object continues to report that it is attempting to connect. Also make the return error code consistent with wifi scan. Signed-off-by: Damien George <damien@micropython.org>
2021-08-25extmod/modframebuf: Enable blit between different formats via a palette.Peter Hinch
This achieves a substantial performance improvement when rendering glyphs to color displays, the benefit increasing proportional to the number of pixels in the glyph.
2021-08-19extmod: Add machine.bitstream.Jim Mussared
This is a generic API for synchronously bit-banging data on a pin. Initially this adds a single supported encoding, which supports controlling WS2812 LEDs. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-14extmod/modbluetooth: Add send_update arg to gatts_write.Jim Mussared
This allows the write to trigger a notification or indication, but only to subscribed clients. This is different to gatts_notify/gatts_indicate, which will unconditionally notify/indicate. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-13extmod/modlwip: Fix close and clean up of UDP and raw sockets.Damien George
The correct callback-deregister functions must be called dependent on the socket type, otherwise resources may not be freed correctly. Signed-off-by: Damien George <damien@micropython.org>
2021-08-07extmod/modujson: Add support for dump/dumps separators keyword-argument.Peter Züger
Optionally enabled via MICROPY_PY_UJSON_SEPARATORS. Enabled by default. For dump, make sure mp_get_stream_raise is called after mod_ujson_separators since CPython does it in this order (if both separators and stream are invalid, separators will raise an exception first). Add separators argument in the docs as well. Signed-off-by: Peter Züger <zueger.peter@icloud.com> Signed-off-by: Damien George <damien@micropython.org>
2021-07-31extmod/uasyncio: In open_connection use address info in socket creation.oclyke
Rudimentary support for various address families. Signed-off-by: oclyke <oclyke@gmail.com>
2021-07-23extmod/nimble: Add "memory stalling" mechanism for l2cap_send.Jim Mussared
When l2cap_send detects that the sys mempool is running low (used to store the outgoing HCI payloads), it will report stalled back to the application, and then only unstall once these HCI payloads have been sent. This prevents a situation where a remote receiver with very large MTU can cause NimBLE to queue up more than MYNEWT_VAL_MSYS_1_BLOCK_COUNT (i.e. 12) payloads, causing further attempts to send to fail with ENOMEM (even though the channel is not stalled and we have room in the channel mbufs). The regular credit/stall flow control is not effective here because the receiver's MTU is large enough that it will not activate (i.e. there are lots of credits available). Thresholds of 1/2 (stall) and 1/4 (unstall) chosen to allow headroom for other payloads (e.g. notifications) and that when a regular stall occurs it might keep sending (and creating more payloads) in the background.
2021-07-23extmod/nimble: Allow modbluetooth binding to hook "sent HCI packet".Jim Mussared
2021-07-23extmod/modbluetooth: Clamp MTU values to 32->UINT16_MAX.Jim Mussared