Commit Graph

6886 Commits

Author SHA1 Message Date
Scott Shawcroft b81573d439
Merge pull request #4891 from dhalbert/keypad-scanning-events
keypad: support for vector and matrix key scanning
2021-06-24 10:25:21 -07:00
Tsutomu IKEGAMI 15fc4c21b6 Fix typo in pin names I2S_SDIN/SDOUT of Wio Terminal 2021-06-24 21:24:23 +09:00
Dan Halbert 836db4e4a1
Merge pull request #4816 from hierophect/rp2040-alarms
RP2040: add Alarm module
2021-06-24 08:15:57 -04:00
Scott Shawcroft a7e353b80e
Merge pull request #4897 from jepler/merge-1.16
Merge 1.16
2021-06-23 10:15:10 -07:00
Jeff Epler 4fd946682d another file to remove 2021-06-22 14:00:58 -05:00
Jeff Epler 680ac9388f review suggestion: remove files 2021-06-21 19:51:03 -05:00
Dan Halbert 624a53adee
Merge pull request #4900 from hathach/fix-nrf-control-race-condition
update tinyusb to fix nrf control race condition
2021-06-21 09:39:43 -04:00
Dan Halbert ed41acd879 merge from upstream to fix translations 2021-06-21 08:26:44 -04:00
Lucian Copeland 1f3d69d87c Clean up sleep memory, mark as not-implemented 2021-06-20 17:57:51 -04:00
Limor "Ladyada" Fried 6dbeb75a4f
Merge pull request #4880 from jepler/esp32s2-imagecapture
Esp32s2: implement ParallelImageCapture
2021-06-19 16:17:56 -04:00
hathach b3a91220de fix build with esp32s2 2021-06-19 12:55:54 +07:00
Dan Halbert db297add67 fix other too-big builds 2021-06-18 13:20:31 -04:00
Dan Halbert 03adbbca7c turn off keypad by default on all SAMD21, for now 2021-06-18 12:26:48 -04:00
Jeff Epler e1d7e46e88 fix keyboard interrupt 2021-06-18 11:15:51 -05:00
Jeff Epler 8647097078 remove micropython board 2021-06-18 10:59:52 -05:00
Jeff Epler 7b46187024 Fix trailing whitespace 2021-06-18 10:58:30 -05:00
Jeff Epler 87d3740c64 Merge tag 'v1.16' 2021-06-18 10:54:19 -05:00
Damien George eb7ae538f9 esp8266/boards/GENERIC_512K: Add custom minimal _boot.py.
Commit 0abf6f830c 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>
2021-06-18 14:13:18 +10:00
Damien George 4eb13c50cd esp32/machine_sdcard: Use deinit_p to deinit SD bus in SPI mode.
Fixes issue #7352.

Signed-off-by: Damien George <damien@micropython.org>
2021-06-18 09:55:22 +10:00
Dan Halbert 04b69cde9b turn off gamepad on most builds;turn off keypad where appropriate 2021-06-17 13:46:45 -04:00
Jonathan Hogg 89945b1989 esp32/machine_hw_spi: Allow None for unused pins in initializer.
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.
2021-06-17 18:52:22 +10:00
Thomas Wenrich 060066804a esp32/modnetwork: Add "reconnects" option to WLAN STA interface.
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.
2021-06-17 18:48:06 +10:00
Tobias Eydam 48437cec45 esp32/network_lan: Add Ethernet support for IDF v4.1 and above.
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>
2021-06-17 15:36:14 +10:00
Dan Halbert 4655a71793 Turn off keypad on some builds to avoid overflow 2021-06-15 14:11:04 -04:00
Dan Halbert f97e0ec631 fix ulab commit 2021-06-15 11:51:28 -04:00
robert-hh 8edc3aacdd mimxrt/modutime: Extend the time module.
Methods added:
- time.time()
- time.time_ns()
- time.gmtime()
- time.localtime()
- time.mktime()

The rp2 port was uses as the template for the change.
2021-06-16 01:50:09 +10:00
robert-hh 7417c6ac91 mimxrt/machine_pin: Implement pin.irq() functionality. 2021-06-16 01:42:10 +10:00
robert-hh 689476c576 mimxrt/machine_uart: Add the UART class to the machine module.
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
2021-06-16 01:21:15 +10:00
Dan Halbert a192f1ca2f merge from upstream 2021-06-15 11:21:08 -04:00
Tsutomu IKEGAMI fd222dd066 Fix typo in Wio Terminal pin board.I2S_BLCK to I2S_BCLK (bit clock) 2021-06-15 20:51:55 +09:00
Dan Halbert b151bee0a2
Merge pull request #4887 from mcauser2/tinys2spi
Change TinyS2 default SPI pins
2021-06-14 19:30:26 -04:00
Kattni Rembor 12d0e65a2a Space out pin groups. 2021-06-14 15:37:02 -04:00
Kattni Rembor f96642de25 Add A0 as alias to pot pin. 2021-06-14 15:32:12 -04:00
Mike Causer ceea6397a3 Change TinyS2 default SPI pins 2021-06-15 01:17:39 +10:00
Pavol Rusnak 95048129b1 unix: Fix build on arm64-darwin due to integer cast.
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>
2021-06-15 00:08:24 +10:00
Krzysztof Adamski e7f7094ef6 rp2/machine_rtc: Check return value from rtc_set_datetime.
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
).
2021-06-15 00:06:26 +10:00
iabdalkader 66115a3744 stm32/eth: Fix eth_link_status function to use correct BSR bit.
Fixes #7346.
2021-06-13 12:29:11 +10:00
iabdalkader 51614ce365 stm32/eth: Add low-power mode configuration option.
Add low power functionality configurable with:

    lan.config(low_power=True/False)
2021-06-13 12:27:33 +10:00
robert-hh 3ab8806c0d mimxrt/machine_rtc: Maintain microsecond offset.
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.
2021-06-12 23:20:12 +10:00
robert-hh fd4eec5555 mimxrt/machine_rtc: Change RTC.datetime() tuple to match other ports.
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.
2021-06-12 23:15:05 +10:00
Krzysztof Adamski 37d01d4be3 rp2/machine_rtc: Add initial support for RTC.
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>
2021-06-12 23:02:54 +10:00
Jeff Epler 1a06d06468 ulab: disable on several stm boards with constrained flash storage 2021-06-11 07:46:21 -05:00
IhorNehrutsa da8aad18a4 esp32/README: Describe how to select compatible version of existing IDF. 2021-06-11 19:52:10 +10:00
noslaver f314cac604 esp32/partitions-2MiB.csv: Update table so firmware fits.
The current MicroPython app size is larger than the size allocated in the
partitions table.
2021-06-11 17:57:40 +10:00
Damien George 865abba197 esp32/makeimg.py: Load sizes from partition table and verify data fits.
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>
2021-06-11 15:43:49 +10:00
Jeff Epler 2cbdd18a20 esp32s2: Implement parallel image capture 2021-06-10 11:27:49 -05:00
Jeff Epler 268717e427 ParallelImageCapture: Switch to taking a list of pins
.. adopting validate_pins from RGBMatrix into shared-bindings

.. updating other platforms for API change
2021-06-10 11:15:18 -05:00
Jeff Epler 7782bc2e2e Skeleton implementation, does nothing 2021-06-10 11:15:18 -05:00
Jeff Epler 98f812e0c2 esp32s2: cam.c: Remove GPIO interrupt at deinit 2021-06-10 11:15:18 -05:00
Jeff Epler 929d6dab73 esp32s2: cam.c: work around possible compiler bug 2021-06-10 11:15:18 -05:00