The WLAN.config() method now supports "ssid", "security" and "key" as
aliases to the existing "essid", "authmode" and "password", which are now
deprecated. The help text and setup helper are also updated.
Addresses issue #8083.
The WLAN.config() method now supports "ssid", "security" and "key" as
aliases to the existing "essid", "authmode" and "password", which are now
deprecated.
Addresses issue #8083.
Rename WLAN keyword args to scan(), connect() and config() to be more
consistent across ports and WLAN drivers. This change is backwards
compatible and will support obsolete keyword args, except for positional
"essid" which is now deprecated in favor of "ssid".
The changed argument names are
- "essid" changed to "ssid"
- "auth" or "authmode" changed to "security"
- "password" changed to "key"
Addresses issue #8083.
The CI scripts were using a PPA to get a backported version of uncrustify
on Ubuntu 20.04. However, this causes CI to intermittently fail due to
connection issues to launchpad.net or the key server.
Ubuntu 22.04 has a newer version of uncrustify removing the need for the
PPA. Ubuntu 22.04 is now in beta on GitHub actions, so it can be used.
Signed-off-by: David Lechner <david@pybricks.com>
Updates the Zephyr port build instructions and CI to use the latest Zephyr
release tag.
Tested on frdm_k64f.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
When MICROPY_PY_MACHINE_I2C_TRANSFER_WRITE1 is enabled the port's hardware
I2C transfer functions should support the MP_MACHINE_I2C_FLAG_WRITE1
option, but software I2C will not. So add a flag to the I2C protocol
struct so each individual protocol can indicate whether it supports this
option or not.
Fixes issue #8765.
Signed-off-by: Damien George <damien@micropython.org>
Catch calls to legacy:
MP_REGISTER_MODULE(name, module, enable)
Emit a friendly error suggesting they be rewritten to:
MP_REGISTER_MODULE(name, module).
Signed-off-by: Phil Howard <phil@pimoroni.com>
* The mbedtls config file path is hard-coded to the config file in
the stm32 port. Any port using this cmake fragment is not actually
using its own config file.
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>
Both led_init and led_state are configurable via MBOOT_BOARD_LED_INIT and
MBOOT_BOARD_LED_STATE respectively, so don't need to be MP_WEAK.
Furthermore, led_state and led0_state are private to ui.c so can be made
static.
Signed-off-by: Damien George <damien@micropython.org>
This IO was enabled in IDF commit 68f8b999bb69563f2f3d1d897bc073968f41f3bf,
which is available in IDF release v4.3.2 and above.
Signed-off-by: Damien George <damien@micropython.org>
This tests the build when -O2 is used, which can lead to additional
compiler analysis and warnings.
Signed-off-by: Damien George <damien@micropython.org>
This file is not executable so shouldn't have the shebang line. This line
can cause issues when building on Windows msvc when the PyPython variable
is set to something other than "python", because it reverts back to using
the shebang line.
The top comment is also changed to """ style which matches all other
preprocessing scripts in the py/ directory.
Signed-off-by: Damien George <damien@micropython.org>
Without this, newer versions of gcc (eg 11.2.0) used with -O2 can warn
about `q_ptr` being maybe uninitialized, because it doesn't know that there
is at least one qstr being written in to this (alloca'd) memory.
As part of this, change the type of `n` to `size_t` so the compiler knows
it's unsigned and can generate better code.
Code size change for this commit:
bare-arm: -28 -0.049%
minimal x86: -4 -0.002%
unix x64: +0 +0.000%
unix nanbox: -16 -0.003%
stm32: -24 -0.006% PYBV10
cc3200: -32 -0.017%
esp8266: +8 +0.001% GENERIC
esp32: -52 -0.003% GENERIC
nrf: -24 -0.013% pca10040
rp2: -32 -0.006% PICO
samd: -28 -0.020% ADAFRUIT_ITSYBITSY_M4_EXPRESS
Signed-off-by: Damien George <damien@micropython.org>
Otherwise include directories are added unconditionally to the build
variables if the component (submodule) is checked out. This can lead to,
eg, the esp32 build using lib/lwip header files, instead of lwip header
files from the IDF.
Fixes issue #8727.
Signed-off-by: Damien George <damien@micropython.org>