This changes the signatures of QSPI write_cmd_data, write_cmd_addr_data and
read_cmd_qaddr_qdata so they return an error code. The softqspi and stm32
hardware qspi driver are updated to follow this new signature. Also the
spiflash driver is updated to use these new return values.
Signed-off-by: Damien George <damien@micropython.org>
Before this patch, WiFi connection was blocking, and could raise exceptions
if the connection failed for any reason (including timeouts). This doesn't
match the behavior of other WiFi modules, which connect asynchronously, and
requires handling of exceptions on connect. This change makes `connect()`
work asynchronously by scheduling code to poll connection status, and
handle reconnects (if needed), and return immediately without blocking.
Instead of being an explicit field, it's now a slot like all the other
methods.
This is a marginal code size improvement because most types have a make_new
(100/138 on PYBV11), however it improves consistency in how types are
declared, removing the special case for make_new.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Changes in this commit:
- Manifest include's now use the directory path where possible (no longer
necessary to include the manifest.py file explicitly).
- Add manifest.py for all drivers and components that are referenced by
port/board manifests.
- Replace all uses of freeze() with package()/module(), except for port and
board modules.
- Use opt=3 everywhere, for consistency and to reduce code size.
- Use require() instead of include() for all micropython-lib references.
- Remove support for optional board-level manifest.py in mimxrt port, to
make it behave the same as other ports (the board must set
FROZEN_MANIFEST to a custom manifest.py, which can optionally include the
default, port-level manifest).
- Also reinstates modules that were accidentally removed from the esp8266
512k build in fbe9417b90.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
Fixes:
- Should read `definitions` rather than `defintions`.
- Should read `resolution` rather than `resoultion`.
- Should read `inefficient` rather than `inefficent`.
- Should read `closed` rather than `closded`.
Signed-off-by: Tim Gates <tim.gates@iress.com>
1. Add -Wno-array-bounds to avoid false positive on gcc 12.1; see related
issue #8685.
2. Remove always-true not-NULL-check (Msg.Rsp.Args.Common.Bssid is an array
not a pointer).
3. Fix pointer-to-freed-stack in wlan_set_security.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Originally in drivers/ninaw10/nina_wifi_bsp.c but that isn't a QSTR source.
Also remove outdated commment about root pointers in mpconfigport.h.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This uses MP_REGISTER_ROOT_POINTER() to register mp_wifi_spi, mp_wifi_timer
and mp_wifi_sockpoll_list and removes the same from all mpconfigport.h.
Signed-off-by: David Lechner <david@pybricks.com>
For v2 cards that are standard capacity the read/write/erase commands take
byte address values. Use the result of CMD58 to distinguish SDSC from
SDHC/SDXC.
Signed-off-by: Damien George <damien@micropython.org>
For CSD v1.0 the computed size is in bytes, so convert it to number of
512-byte blocks, and then ioctl(4) will return the correct value.
Also implement ioctl(5) to return the block size, which is always 512.
Signed-off-by: Damien George <damien@micropython.org>
This codec is assembled for the MIMXRT1xxx_DEV boards and available for
WM8960 breakout boards as well.
The driver itself has been tested as working with the MIMXRT boards and a
Sparkfun WM6890 breakout board. It implements the initialization, basic
methods and some enhanced methods like 3D, ALC, soft-mute and deemphasis.
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>
This makes sure deinit() can be called on the interface many times without
error, and that the state of the driver is fully reset.
Fixes issue #7493.
Signed-off-by: Damien George <damien@micropython.org>
This makes fill() about 7x faster (PYBV11 and PYBD_SF6) for the cost of +40
bytes of bytecode (or 120 bytes text).
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
The 72x40 OLED requires selecting the internal IREF, as opposed to the
default external IREF. This is an undocumented feature in the SSD1306
datasheet, but is present in the SSD1315 datasheet. It's possible the
72x40 OLED is actually using the newer SSD1315 controller. Sending the
IREF select command to SSD1306 displays has no effect on them, so it's
added to the init_display() instead of wrapping in an "if width = 72".
Also tested on a 128x64 OLED using the SSD1315 controller (smaller ribbon
cable) and the proposed change has no effect on the display, as the module
comes with the correct current limiting resistor. Internal and external
IREF work the same.
Fixes issue #7281.