Commit Graph

495 Commits

Author SHA1 Message Date
Scott Shawcroft ab70f8eace
Merge remote-tracking branch 'adafruit/main' into i2s_mclk 2023-08-24 15:07:14 -07:00
Scott Shawcroft 8c5c73df38
Add I2S MCLK support to iMX RT 2023-08-17 11:39:14 -07:00
Dan Halbert d582407b06 pre-commit fixes 2023-08-14 00:59:22 -04:00
Dan Halbert 2171e67c1b merge latest adafruit/main 2023-08-13 19:43:54 -04:00
Dan Halbert fe0e2f13bc wip; fix qstr processing 2023-08-10 20:06:32 -04:00
Dan Halbert 2ff8667e75 wip; remove long-lived functionality; remove PR#2614
Trinket M0 compile has no compilation errors, but has link errors to fix.
2023-08-08 20:41:17 -04:00
Dan Halbert 0d2c3c3f08 wip: continuing compilation fixes; mp_obj_alloc everywhere 2023-08-07 20:45:57 -04:00
Blake Ramsdell 432f928286 Add RUNMODE_UF2 handling for SAMD 2023-08-06 13:46:34 +00:00
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