- 18 Jun, 2021 4 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
2.5 can be represented correctly in object representation C, but 2.3 cannot (it is slightly truncated). Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
It's not supported on older GCC versions. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Commit 0abf6f83 removed _boot.py from the manifest for the GENERIC_512K board because the build does not include a filesystem. But the main code expects _boot.py to be there and prints an error if it's not. So add a custom _boot.py, which just sets the gc.threshold(). Signed-off-by: Damien George <damien@micropython.org>
-
- 17 Jun, 2021 7 commits
-
-
Damien George authored
Fixes issue #7352. Signed-off-by: Damien George <damien@micropython.org>
-
Mike Causer authored
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.
-
Jonathan Hogg authored
Make the hardware SPI initializer method match the `init()` method by allowing `None` to be given for `sck`/`mosi`/`miso` to specify an unused signal.
-
Thomas Wenrich authored
-
Thomas Wenrich authored
This adds a wlan.config(reconnects=N) option to set the number of reconnect attempts that will be made if the WLAN connection goes down. The default is N=-1 (infinite retries, current behavior). Setting wlan.config(reconnects=0) will disable the reconnect attempts. A nice side effect of reconnects=0 is that wlan.status() will report the disconnect reason now. See related issue #5326.
-
Tobias Eydam authored
Ethernet-PHYs from ESP-IDF (LAN8720, IP101, RTL8201, DP83848) are now supported in IDF v4.1 and above. PHY_KSZ8041 is only for ESP-IDF 4.3 and above. ESP32S2 is not supported. Signed-off-by: Tobias Eydam <eydam-prototyping@outlook.com>
-
Damien George authored
The comments in NimBLE for ble_gattc_notify_custom() state that "This function consumes the supplied mbuf regardless of the outcome.". And inspection of NimBLE code shows that this is the case. So the comment can be removed. Signed-off-by: Damien George <damien@micropython.org>
-
- 16 Jun, 2021 1 commit
-
-
Damien George authored
This commit fixes a problem with a race between cancellation of task A and completion of task B, when A waits on B. If task B completes just before task A is cancelled then the cancellation of A does not work. Instead, the CancelledError meant to cancel A gets passed through to B (that's expected behaviour) but B handles it as a "Task exception wasn't retrieved" scenario, printing out such a message (this is because finished tasks point their "coro" attribute to themselves to indicate they are done, and implement the throw() method, but that method inadvertently catches the CancelledError). The correct behaviour is for B to bounce that CancelledError back out. This bug is mainly seen when wait_for() is used, and in that context the symptoms are: - occurs when using wait_for(T, S), if the task T being waited on finishes at exactly the same time as the wait-for timeout S expires - task T will have run to completion - the "Task exception wasn't retrieved message" is printed with "<class 'CancelledError'>" as the error (ie no traceback) - the wait_for(T, S) call never returns (it's never put back on the uasyncio run queue) and all tasks waiting on this are blocked forever from running - uasyncio otherwise continues to function and other tasks continue to be scheduled as normal The fix here reworks the "waiting" attribute of Task to be called "state" and uses it to indicate whether a task is: running and not awaited on, running and awaited on, finished and not awaited on, or finished and awaited on. This means the task does not need to point "coro" to itself to indicate finished, and also allows removal of the throw() method. A benefit of this is that "Task exception wasn't retrieved" messages can go back to being able to print the name of the coroutine function. Fixes issue #7386. Signed-off-by: Damien George <damien@micropython.org>
-
- 15 Jun, 2021 6 commits
-
-
robert-hh authored
Methods added: - time.time() - time.time_ns() - time.gmtime() - time.localtime() - time.mktime() The rp2 port was uses as the template for the change.
-
robert-hh authored
-
robert-hh authored
The implementation uses the LPUARTx devices. Up to 8 UARTs can be used, given that the pins are accessible. E.g. 8 on Teensy 4.1, 5 on MIMXRT1020_EVK. For Tennsy 4.0 and 4.1 the UART numbers are as printed on the pinout 1..N. The MIMXRT10xx-EVK boards have only one UART named, which gets the number 1. All other UART are assigned to different Pins: MIMXRT1010-EVK: D0/D1 UART 1 D6/D7 UART 2 A0/D4 UART 3 MIMXRT1020-EVK: D0/D1 UART 1 D6/D9 UART 2 D10/D12 UART 3 D14/D15 UART 4 A0/A1 UART 5 MIMXRT1050-EVK, MIMXRT1060-EVK, MIMXRT1064-EVK: D0/D1 UART 1 D7/D6 UART 2 D8/D9 UART 3 A1/A0 UART 4
-
Damien George authored
Now a ctrl-C will not stop mpremote, rather this character will be passed through to the attached device. The mpremote version is also increased to 0.0.5. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Using just the list of available ports, instead of a hard-coded list of possible ports, means that all ports will be available for auto connection. And the order that they will be attempted in will match what's printed by "mpremote connect list" (and will be the same as before, trying ACMx before USBx). Auto-connect will also now work on Mac, and will allow all COM ports on Windows. Signed-off-by: Damien George <damien@micropython.org>
-
Mike Teachman authored
With docs and a multi-test using TCP server/client. This method is a MicroPython extension, although there is discussion of adding it to CPython: https://bugs.python.org/issue41305Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
-
- 14 Jun, 2021 2 commits
-
-
Pavol Rusnak authored
This fixes error: cast to smaller integer type 'int' from 'pthread_t'. pthread_t is defined as long, not as int. Signed-off-by: Pavol Rusnak <pavol@rusnak.io>
-
Krzysztof Adamski authored
The rtc_set_datetime() from pico-sdk will validate the values in the datetime_t structure and refuse to set the time if they aren't valid. It makes sense to raise an exception if this happens instead of failing silently which might be confusing (as an example, see: https://github.com/micropython/micropython/pull/6928#issuecomment-860166044 ).
-
- 13 Jun, 2021 3 commits
-
-
iabdalkader authored
Fixes #7346.
-
iabdalkader authored
Add low power functionality configurable with: lan.config(low_power=True/False)
-
Zoltán Vörös authored
-
- 12 Jun, 2021 4 commits
-
-
robert-hh authored
The supplied value for microseconds in datetime() will be treated as a starting value for the reported microseconds. Due to internal processing in setting the time, there is an offset about 1 ms.
-
robert-hh authored
This change moves the datetime tuple format back to the one used by all the other ports: (year, month, day, weekday, hour, minute, second, microsecond) Weekday is a number between 0 and 6, with 0 assigned to Monday. It has to be provided when setting the RTC with datetime(), but will be ignored on entry and calculated when needed. The weekday() method was removed, since that is now again a part of the datetime tuple. The now() method was updated so it continues to return a tuple that matches CPython's datetime module.
-
Krzysztof Adamski authored
Initial support for machine.RTC on rp2 port. It only supports datetime() method and nothing else. The method gets/returns a tuple of 8 items, just like esp32 port, for example, but the usec parameter is ignored as the RP2 RTC only works up to seconds precision. The Pico RTC isn't very useful as the time is lost during reset and there seems to be no way to easily power up just the RTC clock with a low current voltage, but still there seems to be use-cases for that, see issues #6831, and a Thonny issue #1592. It was also requested for inclusion on v1.15 roadmap on #6832. Signed-off-by: Krzysztof Adamski <k@japko.eu>
-
Peter Hinch authored
This is the minimum change to fix the example code so it actually runs on the majority of ports.
-
- 11 Jun, 2021 3 commits
-
-
IhorNehrutsa authored
-
noslaver authored
The current MicroPython app size is larger than the size allocated in the partitions table.
-
Damien George authored
Changes introduced are: - the application offset is now loaded from the partition table instead of being hard-coded to 0x10000 - maximum size of all sections is computed using the partition table - an error is generated if any section overflows its allocated space - remaining bytes are printed for each section Signed-off-by: Damien George <damien@micropython.org>
-
- 10 Jun, 2021 3 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Because these boards use the SPI flash cache in their bdev.c configuration. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Usage: usb = pyb.USB_VCP() usb.irq(lambda u:print(u, u.read()), usb.IRQ_RX) Signed-off-by: Damien George <damien@micropython.org>
-
- 08 Jun, 2021 3 commits
-
-
Zoltán Vörös authored
This commit adds a few math functions to the source list in the Makefile, and implements the log2f function, so that ulab can be compiled on the nrf boards. It also addresses part of #5162.
-
Miguel Grinberg authored
This fix prevents server.wait_closed() from raising an AttributeError when trying to access server.task. This can happen if it is called immediately after start_server().
-
Abilio Marques authored
This commit fixes the following problems converting to/from Python integers and ffi types: - integers of 8 and 16 bits not working on big endian - integers of 64 bits not working on 32 bits architectures - unsigned returns were converted to signed Python integers Fixes issue #7269.
-
- 06 Jun, 2021 4 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
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-