Commit Graph

20 Commits

Author SHA1 Message Date
Scott Shawcroft 1a0b4193b7
Simplify the status LED to save power
This also removes the need to pin share because we don't use the
status LED while user code is running.

The status flashes fallback to the HW_STATUS LED if no RGB LED is
present. Each status has a unique blink pattern as well.

One caveat is the REPL state. In order to not pin share, we set the
RGB color once. PWM and single color will be shutoff immediately but
DotStars and NeoPixels will hold the color until the user overrides
it.

Fixes #4133
2021-05-13 14:41:20 -07:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Jeff Epler 7401aa8e85
Merge pull request #3888 from microDev1/fix-reset-pin
FIX : common_hal_reset_pin()
2020-12-29 10:08:47 -06:00
microDev dc332baa87
update common_hal_reset_pin() 2020-12-28 20:04:00 +05:30
Scott Shawcroft 0dcc659d53
Swap to IDF release/4.2 branch for stability 2020-12-15 18:12:59 -08:00
Scott Shawcroft 40118bcf57
Add `board_deinit` for use with sleep
This changes lots of files to unify `board.h` across ports. It adds
`board_deinit` when CIRCUITPY_ALARM is set. `main.c` uses it to
deinit the board before deep sleeping (even when pretending.)

Deep sleep is now a two step process for the port. First, the
port should prepare to deep sleep based on the given alarms. It
should set alarms for both deep and pretend sleep. In particular,
the pretend versions should be set immediately so that we don't
miss an alarm as we shutdown. These alarms should also wake from
`port_idle_until_interrupt` which is used when pretending to deep
sleep.

Second, when real deep sleeping, `alarm_enter_deep_sleep` is called.
The port should set any alarms it didn't during prepare based on
data it saved internally during prepare.

ESP32-S2 sleep is a bit reorganized to locate more logic with
TimeAlarm. This will help it scale to more alarm types.

Fixes #3786
2020-12-08 10:52:25 -08:00
Lucian Copeland 59458a9013 Add pin claiming to SPI construct 2020-11-24 16:46:11 -05:00
Scott Shawcroft 95cb5961d2
Fix ESP32-S2 SPI when DMA is sometimes used 2020-10-26 16:59:59 -07:00
Lucian Copeland 66b8559fd4 Change submodule, rework all includes 2020-09-30 11:26:07 -04:00
Lucian Copeland 00517b2600 Move missing pin warning to shared-bindings 2020-09-23 11:39:39 -04:00
Lucian Copeland 22d9a94f2b Use write_value, add missing pin exceptions 2020-09-21 13:47:14 -04:00
Scott Shawcroft c7c90f47b0
Add non-DMA SPI support.
This fixes SPI with PSRAM allocated buffers. DMA with SPI2 was
attempted but produced junk output. This manual copy is less than
2x slower than DMA when not interrupted.

Fixes #3339
2020-09-10 17:32:20 -07:00
Scott Shawcroft 5028804878
Remove fixed pointers and check UART return 2020-06-30 15:29:42 -07:00
Scott Shawcroft 08749630a2
Fix SPI RX and remove debug prints 2020-06-26 16:30:24 -07:00
Scott Shawcroft a9f257bcd6
Store host_id so that never reset works 2020-06-26 12:32:56 -07:00
Scott Shawcroft ed6e81d688
Switch SPI to polling DMA and enable displayio 2020-06-24 13:10:08 -07:00
Scott Shawcroft 496e16d99b
Handle memory (hopefully). Short TX works 2020-06-24 12:47:59 -07:00
Scott Shawcroft c5fa9730a8
Compiles! 2020-06-24 12:47:59 -07:00
Scott Shawcroft fc9c0ba573
Initial SPI implementation. Almost certainly doesn't compile 2020-06-24 12:47:59 -07:00
Scott Shawcroft d0401f02a9
Add initial I2C support, not quite working fully though 2020-06-24 12:47:58 -07:00