- 09 Sep, 2022 2 commits
-
-
Jim Mussared authored
This is technically a breaking change, but: a) We need the end handle to do descriptor discovery properly. b) We have no possible use for the existing definition handle in the characteristic result IRQ. None of the methods can use it, and therefore no existing code should be using it in a way that changing it to a different integer value should break. Unfortunately NimBLE doesn't make it easy to get the end handle, so also implement a mechanism to use the following characteristic to calculate the previous characteristic's end handle. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Incorrect use of "continue" when the tuple was length zero meant it broke the rest of the argument handling. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
- 08 Sep, 2022 10 commits
-
-
Jim Mussared authored
The matches should not have been quoted. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Previous the build directory just used the board name, now make it use the variant name too. This shouldn't have any change because the existing directory should not exist (all builds run by these scripts remove their build directory after completion), but it makes debugging easier. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
I.e. for whichever SPI/I2C instance is PICO_DEFAULT_I2C, there's no need to set MICROPY_HW_SPIn_SCK. The only ones remaining are for the non-default instance. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Inherits the default values for whichever instance is PICO_DEFAULT_I2C. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Rather than hardcoding the defaults, use pico-sdk's board definition. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
In most cases, it's calculated automatically from the board name, and so doesn't need to be set at all. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Phil Howard authored
This allows support for partitioned flash on rp2 boards. See issue #9208. Signed-off-by: Phil Howard <phil@gadgetoid.com>
-
Jim Mussared authored
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
-
Jim Mussared authored
This brings in the drivers and libraries that were previously in this repo. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
- 06 Sep, 2022 8 commits
-
-
Jeff Epler authored
And add a test. Fixes issue #9202. Signed-off-by: Jeff Epler <jepler@gmail.com>
-
yn386 authored
Signed-off-by: Damien George <damien@micropython.org>
-
yn386 authored
Since L4 HAL version 1.17.0, HAL_TIM_IC_Start_IT() checks whether specified channel of timer is busy or not, which is the case if this function is called more than once without first calling HAL_TIM_IC_Stop_IT(). The fix in this commit is to call the stop function before calling start. The PWM and OC modes have the same issue with the same fix. Fixes issue #8732.
-
yn386 authored
Prior to this commit, excuting this code: i2c = I2C(1, I2C.CONTROLLER, dma=True) i2c.send(data, addr=i2c_addr) the call to i2c.send() does not return and the board needs a reset. This code works when dma=False. According to the specification, I2Cx_EV_IRQHandler should: - Write DR to address when Start condition generated. - Clear ADDR by reading SR2 after reading SR2 when address sent. These processes are included in HAL_I2C_EV_IRQHandler(), however the firmware size increses about 2KB if HAL_I2C_EV_IRQHandler is called. This commit adds above processes to i2c_ev_irq_handler, and increases firmware by less than 100 bytes. Fixes issue #2643.
-
yn386 authored
pyb.ADC(channel) checks whether specified channel is valid or have ADC capability but pyb.ADCAll().read_channel() does not. This change adds checking whether specified channel is valid and throw ValueError if channel is invalid. This is same as pyb.ADC().
-
Damien George authored
Although this driver and associated hardware can be used on any board, it makes to only freeze it for PYB and PYBD boards. It can be easily copied to any board if needed. Fixes issue #8056. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
The tests can be copied to the board if needed. Also update the docs to reflect this change. Signed-off-by: Damien George <damien@micropython.org>
-
Jim Mussared authored
This was added after 203dae41 and missed in the rebase. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
- 05 Sep, 2022 9 commits
-
-
Jim Mussared authored
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 fbe9417b. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Jim Mussared authored
The metadata can be version, description, and license. After executing a manifest, the top-level metadata can be queried, and also each file output from the manifest will have the metadata of the containing manifest. Use the version metadata to "tag" files before freezing such that they have __version__ available.
-
Jim Mussared authored
By default, don't include micropython-lib/unix-ffi in the search. If unix_ffi=True is passed to require(), then include unix-ffi and make it take precedence over the other locations (e.g. python-stdlib). This does two things: - Prevents non-unix builds from using unix-only packages. - Allows the unix build to optionally use a more full-featured (e.g. ffi) based package, even with the same name as one from e.g. stdlib. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
If an include path is a directory, then it implicitly grabs the manifest.py file inside that directory. This simplifies most manifest.py files. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Rather than invoking mpy-cross directly via system/subprocess in our build tools and other tools, this provides a Python interface for it. Based on https://gitlab.com/alelec/mpy_cross (with the intention of eventually replacing that as the "official" pypi distribution once setup.py etc are added). Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
This splits the manifest file loading logic from makemanifest.py and updates makemanifest.py to use it. This will allow non-freezing uses of manifests, such as defining packages and dependencies in micropython-lib. Also adds additional methods to the manifest "API": - require() - to get a package from micropython-lib. - module() - to define a single-file module - package() - to define a multi-file package module() and package() should replace most uses of freeze() and can also be also used in non-freezing scenarios. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
micropython-lib is now a submodule, and the manifest compilation process will ensure it is available, so manifests no longer need to check that it is available. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
- 31 Aug, 2022 4 commits
-
-
robert-hh authored
Avoiding a watchdog reset during i2c.scan() if the hardware is not properly set up (eg on esp8266), and also allowing to stop the scan with a KeyboardInterrupt. Fixes issue #8876.
-
Takeo Takahashi authored
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
-
Takeo Takahashi authored
Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
-
Takeo Takahashi authored
Changes are: - Support drive= keyword argument. - Fix trigger keyword check. - Fix GPIO pin setting. Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
-
- 30 Aug, 2022 7 commits
-
-
hoihu authored
-
robert-hh authored
-
robert-hh authored
uart.flush() flush() will wait until all characters have been sent. To avoid a permanent lock, a timeout applies depending on the size of FIFO and the baud rate. ret = uart.txdone() ret is True if no transfer is in progress. ret is False otherwise.
-
robert-hh authored
Since uart.write() of the nrf port waits until all bytes but the last one have been sent, uart.flush() and uart.txdone() are implemented as empty functions to provide API consistency. uart.flush() flush() will always return immediately, even if the last byte may still be sent. ret = uart.txdone() uart.txdone() will always return True, even if the last byte may still be sent.
-
robert-hh authored
Since uart.write() of the STM32 port waits until all bytes have been sent, uart.flush() and uart.txdone() are implemented as empty functions to provide API consistency. uart.flush() flush() will always return immediately. ret = uart.txdone() uart.txdone() will always return True.
-
robert-hh authored
uart.flush() flush() will wait until all characters but the last one have been sent. It returns while the last character is sent. If needed, the calling code has to add one character wait time. To avoid a permanent lock, a timeout applies depending on the size of the FIFO and the baud rate. ret = uart.txdone() ret is True if no transfer is in progress. It returns already True when the last byte of a transfer is sent. ret is False otherwise.
-
robert-hh authored
uart.flush() flush() will wait until all characters have been sent.To avoid a permanent lock, a timeout applies depending on the size of txbuf and the baud rate. ret = uart.txdone() ret is True if no transfer is in progress. ret is False otherwise.
-