Commit Graph

2000 Commits

Author SHA1 Message Date
Dan Halbert
b7541088f4 shrink circuitplayground_express_crickit 2022-04-26 17:51:47 -04:00
Dan Halbert
7a77aae4be shrink feather_m0_supersized 2022-04-26 16:52:43 -04:00
Dan Halbert
6b25ccf1a4 remove stray space 2022-04-26 14:26:42 -04:00
Dan Halbert
63abd9a9cf
Merge pull request #6312 from dhalbert/adjust-neopixel-timings
test and adjust NeoPixel timings on multiple ports
2022-04-26 13:18:47 -04:00
Dan Halbert
3a8fb4e956
Merge pull request #5852 from jepler/floppy
Add floppyio
2022-04-26 11:40:19 -04:00
Dan Halbert
4eeaf41edc test and adjust NeoPixel timings on multiple products 2022-04-25 23:12:24 -04:00
Dan Halbert
0642917cf7
Merge pull request #6270 from FoamyGuy/tilegrid_bitmap_property
adding bitmap property to TileGrid
2022-04-25 09:09:28 -04:00
Dan Halbert
76d54ca8ad shrink sparkfun_redboard_turbo 2022-04-21 12:58:46 -04:00
George White
3b5171c4ff Move hook implementation to supervisor 2022-04-18 14:09:36 +00:00
George White
32fc084b39 Removed compiler flag in favor of MP_WEAK implementation 2022-04-18 13:10:12 +00:00
George White
0ba93b20e5 Setup flash pins on Sparkfun SAMD51 Micromod 2022-04-18 13:10:12 +00:00
foamyguy
948040f1f0 disable onewire instead of displayio on boards without room 2022-04-10 10:00:37 -05:00
foamyguy
7ad5fa511e disable displayio for some boards 2022-04-09 16:24:06 -05:00
Jeff Epler
766bf8f671
disable floppyio on kicksat-sprite 2022-04-07 10:57:37 -05:00
Jeff Epler
f7be4345d9
Merge remote-tracking branch 'origin/main' into floppy 2022-04-07 08:37:46 -05:00
Dan Halbert
2693a4cfe1
Merge pull request #6069 from gamblor21/uzlib-module
zlib Module
2022-04-06 12:06:44 -04:00
Mark
8ed7b114cd
Merge branch 'main' into uzlib-module 2022-04-03 11:48:37 -05:00
gamblor21
9d67e62f4d Removed from small board 2022-04-03 11:47:19 -05:00
Jeff Epler
372306411a
samd: Don't rely on RTC interrupt
I instrumented RTC_Handler and determined that on SAMD51 it was possible
for the interrupt to be delivered well before the actual overflow of the
RTC COUNT register (e.g., a value as small as 0xffff_fffd could be seen
at the time of overflow)

Rather than depending on the overflow interrupt coming in at the same time
as COUNT overflows (exactly), rely only on observed values of COUNT in
_get_count, overflowing when it wraps around from a high value to a low
one.

With this change, PLUS a second change so that it is possible to warp
the RTC counter close to an overflow and test in 20ms instead of 3 days,
there was no problem detected over 20000+ overflows. Before, a substantial
fraction (much greater than 10%) of overflows failed.

Fixes #5985

Change to common-hal/rtc/RTC.c for time warping (plus make rtc_old_count non-static):
```patch
 void common_hal_rtc_set_calibration(int calibration) {
+
+    common_hal_mcu_disable_interrupts();
+
+        RTC->MODE0.COUNT.reg = 0xffffff00;
+        rtc_old_count = 0;
+        do {
+        while ((RTC->MODE0.SYNCBUSY.reg & (RTC_MODE0_SYNCBUSY_COUNTSYNC | RTC_MODE0_SYNCBUSY_COUNT)) != 0) { }
+    }
+    while(RTC->MODE0.COUNT.reg < 0xffffff00);
+    common_hal_mcu_enable_interrupts();
+
+    mp_printf(&mp_plat_print, "Warping RTC in calibration setter count=%08x rtc_old_count=%08x\n", RTC->MODE0.COUNT.reg, rtc_old_count);
```

Test program:
```python
import time
from rtc import RTC

i = 0
while True:
    RTC().calibration = 1 # Warps to ~16ms before overflow, with patch to RTC code
    t0 = time.monotonic_ns()
    et = t0 + 20_000_000 # 20ms
    while (t1 := time.monotonic_ns()) < et: pass
    i += 1
    print(f"{i:6d}: duration {t1-t0}")
    if t1-t0 > 200_000_000: break
    print()
```
2022-03-25 14:48:03 -05:00
Jeff Epler
d91ca7369c
Merge remote-tracking branch 'origin/main' into revamp-duplicate-usb-check 2022-03-24 09:44:41 -05:00
Jeff Epler
a07ac72cc5
Improve the USB vid:pid duplicate checker
To me, it made more sense to track which boards go together in a cluster;
when reviewing a request to actually use a duplicate vid/pid, you want
to know what board(s) it is aliasing.

I also revamped the detection of non-USB boards so that a board .mk file
that couldn't be parsed by the code here would raise a problem instead
of just being skipped for the purposes of checking.

There were some lines with comments on the end, and some variation in
capitalization of the IDs. These are all normalized and a (sometimes
unfriendly!) error printed when it's incorrect.

Before this, here were some ways to trick the duplicate vid/pid checker:
```
USB_PID = 0XABCD
USB_PID = 0xAbCd
USB_PID = 0xABCD # harmless comment?
```
None of these things were ever done on purpose.
2022-03-24 09:42:11 -05:00
Scott Shawcroft
4363361c87
Board definition clean up
Removes:
* AUTORESET_DELAY_MS which never did anything but was introduced
  somehow.
* CIRCUITPY_BOOT_BUTTON in all but one ESP board because they all have
  them. There is a default based on the strapping pins.
* BOARD_USER_SAFE_MODE_ACTION because it was all the same for boards
  with boot buttons. Now the safe mode code manages the message.
2022-03-21 17:58:43 -07:00
Scott Shawcroft
c098474854
Disable aesio and traceback on matrixportal to save space 2022-03-16 10:41:17 -07:00
Scott Shawcroft
dcc3ec171e
Merge remote-tracking branch 'adafruit/7.2.x' into merge_7.2.2 2022-03-15 13:56:11 -07:00
Scott Shawcroft
f602296e59
Re-enable BLE on MatrixPortal. Remove PortalBase
We have a guide that uses it. It was removed in #6043 without
realizing that.

Fixes #6152
2022-03-14 17:04:46 -07:00
Dan Halbert
f13d218749
Merge pull request #6125 from tannewt/usb_host
Start of USB host API
2022-03-11 21:41:28 -05:00
Scott Shawcroft
7cb66dd316
Merge pull request #6142 from dhalbert/7.2.x-autoreload-fake-sleep
7.2.x autoreload rework (again)
2022-03-11 16:46:04 -08:00
Dan Halbert
e4cd9690f1 rework auto-reload delay logic 2022-03-11 14:03:04 -05:00
Dan Halbert
19e7647f3d turn off MIDI on sensebox_mcu for sapce 2022-03-10 18:20:04 -05:00
Dan Halbert
a7260a8b61 squeeze arduino_zero further 2022-03-10 15:56:51 -05:00
Dan Halbert
c5947fd6de squeeze arduino_zero and sensebox_mcu 2022-03-10 12:46:08 -05:00
Dan Halbert
6ddab0f3c8 shrink matrixportal_m4 2022-03-10 11:20:44 -05:00
Dan Halbert
9b2e22a6df Make autoreload checking more robust
- Add reset for autoreload. De-request ticks.
- Separate state a little more in autoreload.c
- Rename some routines.
- Remove redundant settings of CIRCUITPY_AUTORELOAD_DELAY_MS.
2022-03-09 11:07:55 -05:00
Scott Shawcroft
4ac6ef0086
Fix SAMD51 builds on GCC11.2
Fixes #5351
2022-03-08 10:41:34 -08:00
Dan Halbert
1c8f671f0a
Merge pull request #6118 from pewpew-game/parallel-reset-optional
paralleldisplay: reset and read pins should be optional
2022-03-08 09:34:25 -05:00
Dan Halbert
05a4d24a0f
Merge pull request #6117 from dhalbert/__future__
implement `from __future__ import annotations`
2022-03-08 09:33:36 -05:00
Dan Halbert
eff6057fa3 shrink matrixportal_m4 2022-03-07 21:37:28 -05:00
Scott Shawcroft
83593a1558
Start of USB host API
This allows you to list and explore connected USB devices. It
only stubs out the methods to communicate to endpoints. That will
come in a follow up once TinyUSB has it. (It's in progress.)

Related to #5986
2022-03-07 18:07:25 -08:00
Michael Himing
78d7bce02a seeeduino_xiao_kb: Copy pins from seeeduino_xiao 2022-03-08 08:58:32 +11:00
Scott Shawcroft
ff865b60da
Merge pull request #5298 from pewpew-game/logo-remove
Add a flag for removing the Blinka logo from the REPL
2022-03-07 12:53:56 -08:00
Dan Halbert
96aec37ead fix whitespace 2022-03-07 09:11:29 -05:00
Dan Halbert
e91c2e13fb
Seediuno XIAO SAMD21: inverted pins 2022-03-07 09:03:32 -05:00
Rick Sorensen
be3129a917
Update ports/atmel-samd/boards/seeeduino_xiao/pins.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-03-06 22:59:54 -06:00
Rick Sorensen
6fd0643b1e Remove trailing white space 2022-03-06 21:15:37 -06:00
Rick Sorensen
d7ef8f18df pins.c: added comment of reverse wiring for XIAO LEDs 2022-03-06 20:07:42 -06:00
Rick Sorensen
36a27806d8 pins.c: Modify and correct LED pin mappings and names for Xiao
Added YELLOW_LED=LED=D13,
      BLUE1_LED=RX_LED,
      BLUE2_LED=TX_LED
2022-03-06 19:20:37 -06:00
Radomir Dopieralski
b69a06b2ed Also fix the read pin in the atmel and rp2040 ports 2022-03-06 11:33:07 +01:00
Radomir Dopieralski
93ea1bd9bd Add a flag for removing the Blinka logo from the REPL
There may be several reasons why we might want to remove the logo form
the REPL: a fork of CircuitPython that doesn't have the right to use the
logo, an especially small display that needs all the room it has to be
useful, displays that are especially vulnerable to burn-in, maybe even
the smaller chips where we want to save as much flash memory as
possible.
2022-03-05 15:38:59 +01:00
James Bowman
353ea6f70e Add EVE support to Feather M4 CAN 2022-02-27 18:34:30 -08:00
Dan Halbert
01d880829a
Merge pull request #6041 from t-ikegami/enable_uasyncio
Enable _uasyncio module
2022-02-25 13:42:29 -05:00