Commit Graph

487 Commits

Author SHA1 Message Date
Scott Shawcroft
177b98174e
Shrink by combining error messages 2023-05-18 16:24:37 -07:00
Scott Shawcroft
bc30475d09
Fix frequencyio 2023-04-07 12:02:54 -07:00
hathach
fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
Dan Halbert
96e2a72d71 run background tasks during multi-part DMA 2023-03-09 11:53:16 -05:00
gamblor21
6987d3d752 Fix for long length writes 2023-03-02 21:55:21 -06:00
Dan Halbert
859a48723f
Merge pull request #7633 from tannewt/fix_imx_pwm
Fix `pwmio` on iMX RT.
2023-02-28 14:11:06 -05:00
Dan Halbert
f9831b3bbc
Merge pull request #7639 from adafruit/8.0.x
Merge 8.0.x up to main
2023-02-24 19:32:09 -05:00
Scott Shawcroft
1acf65ee22
Fix pwmio on iMX RT.
It now handles deinit, never_reset and sharing tracking. PWM
now runs in the WAIT state as well during a time.sleep().

_reset_ok() was removed because it was called in one spot right
before deinit().

Some PWMOut were also switched to a bitmap for use instead of
reference count. That way init and deinit are idempotent.

Fixes #6589. Fixes #4841. Fixes #4541.
2023-02-22 11:22:39 -08:00
Scott Shawcroft
de5f58a61d
Merge branch 'main' into banglejs2 2023-02-21 12:04:28 -08:00
Dan Halbert
6d51356324 Fix pad assignments on atmel-samd UART 2023-02-19 20:42:44 -05:00
Scott Shawcroft
931c7c1c51
Add Bangle.js 2, JDI memory displays and ACeP epd
This 2-in-1 PR started with the goal of support the Bangle.js 2
smartwatch with *no USB*.
* Adds "secure" DFU build support with a committed private key.
* Adds 3-bit color support with one dummy bit for the JDI memory display
* Allows nrf boards to have a board_background_task() run in RUN_BACKGROUND_TASK.
  This is needed because the Bangle.js 2 uses the watchdog to reset.
* Renamed port_background_task() to port_background_tick() to indicate it
  runs on tick, not RUN_BACKGROUND_TASK.
* Marks serial connected when the display terminal is inited. This means
  that safe mode messages show up on the display.

ACep, 7-color epaper displays also pack 3 bits in 4. So, I added that
support as well.
* Adds 3-bit ACeP color support for 7-color e-paper displays. (Not
  watch related but similar due to color depth.)
* Allows a refresh sequence instead of a single int command. The 7" ACeP
  display requires a data byte for refresh.
* Adds optional delay after resetting the display. The ACeP displays
  need this. (Probably to load LUTs from flash.)
* Adds a cleaning phase for ACeP displays before the real refresh.

For both:
* Add dither support to Palette.
* Palette no longer converts colors when set. Instead, it caches
  converted colors at each index.
* ColorConverter now caches the last converted color. It should make
  conversions faster for repeated colors (not dithering.)
2023-02-15 15:03:40 -08:00
Dan Halbert
d8231f1588 Implement safemode.py 2023-02-13 18:26:38 -05:00
Jeff Epler
beb053a94d
more thoroughly disable UART when 2022-11-30 12:06:19 -06:00
Jeff Epler
4af95f1cb1
atmel-samd: Ensure sdioio.SDCard pins are released 2022-11-29 13:45:18 -06:00
Dan Halbert
79f4344860 fix playing mono files on stereo output 2022-11-23 22:11:41 -05:00
Dan Halbert
ded134c346 store wake_alarm in a static object 2022-10-29 16:26:36 -04:00
Dan Halbert
9307b62ad5 wip 2022-10-27 22:42:04 -04:00
microDev
b33a2b45dc
add coproc alarm 2022-10-20 18:38:20 +05:30
Jeff Epler
f7d39ceae4
comment on the revised algorithm 2022-10-12 16:25:09 -05:00
Jeff Epler
a943167d69
samd: Reduce a further 48 bytes for non-full builds
Another reduction of -48 bytes can be had if the fine calculation
step is skipped. The worst difference compared to the old reference
code with my calibration values in the 0° to 60° was 2°C,
and the difference at 25°C is 1°C.

The final size decrease for non-full builds like Trinket M0 is 268
bytes.
2022-10-12 15:53:44 -05:00
Jeff Epler
b251e78ac5
samd: size-optimize microcontroller temp calc
Perform most arithmetic with scaled integer values.
For my calibration values
```
const uint32_t NVMCTRL_TEMP_LOG[]={0xfc05511e, 0xcc7ac0f7};
```
the maximum difference between the old and new calculation is 0.50°C.
The difference is smallest (0.13°) at 25.87°C in the old scale.

This reduces mcu_processor_get_temperature from 568 bytes to 348 bytes
(-220 bytes)
2022-10-12 15:44:14 -05:00
Dan Halbert
86a0f9a861 save about 112 bytes 2022-10-09 19:22:39 -04:00
Dan Halbert
90f6096955 fix ai-thinker creation ids; fix some typos elsewhere 2022-10-03 15:29:03 -04:00
Jeff Epler
346fff2e7c
cyw43 basic gpio support, hwaddr in boot_out 2022-09-28 10:06:33 -05:00
Dan Halbert
60f43b1703 allow preserving pin state during deep sleep 2022-09-15 17:35:14 -04:00
Dan Halbert
84807cd6eb Change I2C terminology from "peripheral" to "target" 2022-08-09 13:13:19 -04:00
Dan Halbert
9baa2724a7 code formatting suggestion 2022-08-01 00:27:25 -04:00
Dan Halbert
1348cb435b Fix SAMD I2C frequency check 2022-07-29 19:07:33 -04:00
Scott Shawcroft
6d3698848c
Fix PDMIn.c formatting 2022-06-01 11:04:33 -07:00
Scott Shawcroft
9d10a3da66
Conditionalize LTO 2022-05-27 12:59:54 -07:00
George White
8539d6518e flip CTS and RTS pinmux to match RX and TX 2022-05-26 00:06:00 +00:00
George White
99b23b96d9 fix comment typo and mention datasheet 2022-05-26 00:03:46 +00:00
George White
fb3077ccc2 Implement UART hardware flow control on SAMD chips 2022-05-25 21:34:06 +00:00
Paint Your Dragon
eefba16644
Correctly scale analog reading per issue #4794 2022-05-24 08:40:51 -07:00
Dan Halbert
f63b26c534 address jepler's comments and further squeezes 2022-05-20 10:10:55 -04:00
Dan Halbert
a01dec1df9 message consolidation and more use of validators 2022-05-19 15:38:37 -04:00
Michael Wisslead
e63a327107 Bound PulseIn start indexes to maxlen. 2022-04-28 02:28:34 +00: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
4eeaf41edc test and adjust NeoPixel timings on multiple products 2022-04-25 23:12:24 -04:00
Jeff Epler
f7be4345d9
Merge remote-tracking branch 'origin/main' into floppy 2022-04-07 08:37:46 -05:00
Radomir Dopieralski
b69a06b2ed Also fix the read pin in the atmel and rp2040 ports 2022-03-06 11:33:07 +01:00
Tsutomu IKEGAMI
6499d18bb8 Remove board_deep_sleep_hook, which should be done in board_deinit. 2022-02-21 19:21:42 +09:00
Tsutomu IKEGAMI
bd9dd3dc63 Fix atmel-samd alarm module. 2022-02-17 23:00:26 +09:00
Scott Gauche
a8d8651873 Canonical C style for half_duplex = true/false 2022-02-08 23:13:22 -05:00
Scott Gauche
89ad767b8f add half_duplex to spi constructs in other ports but raise not implemented errors 2022-02-08 22:25:23 -05:00
Jeff Epler
07e710b0a0
Merge remote-tracking branch 'origin/main' into floppy 2022-02-04 09:01:36 -06:00
Dan Halbert
cc410ad6a3 common-hal I2C combined write_read 2022-01-31 22:03:30 -05:00
Scott Shawcroft
13db65566d
ESP NeoPixel fixes
This tweaks the RMT timing to better match the 1/3 and 2/3 of 800khz
guideline for timing. It also ensures a delay of 300 microseconds
with the line low before reset.

Pin reset is now changed to the IDF default which pulls the pin up
rather than CircuitPython's old behavior of floating the pin.

Fixes #5679
2022-01-19 16:29:07 -08:00
Jeff Epler
d816a4f19d
Add floppyio
Initially enabled for samd51, this enables reading raw flux data as well
as DOS/MFM formatted media.

This is only the low-level code for reading & decoding flux pulses from a floppy drive.
high level details will live in a Python library.

adafruit-circuitpython-floppy will take care of details like stepping
from track to track, etc.
2022-01-13 15:37:36 -06:00