Commit Graph

1471 Commits

Author SHA1 Message Date
Jeff Epler c92ad33a9c
synthio: allow negative amplitudes
Previously, negative amplitudes were clamped to zero.
Now, they are allowed to range from -ALMOST_ONE to +ALMOST_ONE.
This is useful in certain circumstances, such as using synthio
to create CV-like outputs that can be positive or negative, by
using the amplitude property of the note.
2023-11-21 08:54:07 -06:00
dcooperdalrymple 55db6b7947 Added `SYNTHIO_WAVEFORM_SIZE` definition, renamed 'loop_...' to 'waveform_loop_...', added 'ring_waveform_loop_...` parameters, and updated docstrings. 2023-11-20 09:50:03 -06:00
dcooperdalrymple 785ef5abd2 Add loop_start and loop_end properties to synthio.Note for waveshaping and sampling capabilities. 2023-11-17 17:41:49 -06:00
Scott Shawcroft 8137e2d6d2
Switch all ports to auto-growing split heap
This simplifies allocating outside of the VM because the VM doesn't
take up all remaining memory by default.

On ESP we delegate to the IDF for allocations. For all other ports,
we use TLSF to manage an outer "port" heap. The IDF uses TLSF
internally and we use their fork for the other ports.

This also removes the dynamic C stack sizing. It wasn't often used
and is not possible with a fixed outer heap.

Fixes #8512. Fixes #7334.
2023-11-01 15:24:16 -07:00
Jeff Epler 774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally 2023-10-30 09:49:06 +01:00
Scott Shawcroft 523d95e192
Switch warnings to mp_rom_error_text_t 2023-10-27 09:31:20 -07:00
Dan Halbert 32b6ac79d5
Merge pull request #8519 from jepler/compressed-message-type
Rename compressed_string_t to mp_rom_error_text_t to match upstream
2023-10-27 10:53:44 -04:00
Scott Shawcroft f439f02492
Add `warnings` and warn about displayio changes
Follow up to #8493
2023-10-25 15:45:45 -07:00
Jeff Epler de541cf155
Fix pointer-ness, const-ness of compressed messages
micropython puts the pointer-ness into the typedef; we can put the
const-ness there too.

this reduces the delta to micropython; for instance, emitinlinextensa
and emitinlinethumb now match upstream.
2023-10-25 21:40:11 +02:00
Scott Shawcroft 9354c921c2
Merge pull request #8467 from pypewpew/qrio-find
Add qrio.QRDecoder.find() to locate codes without decoding
2023-10-25 11:51:06 -07:00
Jeff Epler 55874b6470
Rename compressed_string_t to mp_rom_error_text_t to match upstream 2023-10-25 08:14:13 +02:00
Scott Shawcroft e1df598199
Split displayio hardware support from core
These are moved:
* Display -> busdisplay.BusDisplay
* FourWire -> fourwire.FourWire
* EPaperDisplay -> epaperdisplay.EPaperDisplay
* I2CDisplay -> i2cdisplaybus.I2CDisplayBus

`paralleldisplay` is now `paralleldisplaybus` (and registered as
`paralleldisplay` too).

Bus related helpers are split out of display_core into bus_core.
It is in still displayio since it is a dependency of both
busdisplay and epaperdisplay.

Fixes #7667
2023-10-24 15:43:34 -07:00
Scott Shawcroft 89467ecdab
Merge tag '8.2.7' into merge_in_8.2.7 2023-10-20 15:21:30 -07:00
Radomir Dopieralski 12b6a9b5be Add qrio.QRDecoder.find() to locate codes without decoding
Fix #8452
2023-10-14 21:57:54 +02:00
Scott Shawcroft 9633c4e78f
Merge remote-tracking branch 'adafruit/main' into v1.20-merge 2023-10-11 11:21:57 -07:00
Scott Shawcroft 923a5b28ca
Add NO_FPS_LIMIT instead of magic numbers 2023-10-05 14:56:11 -07:00
Scott Shawcroft 807edd4c66
Improve framebufferdisplay.refresh()
Now the defaults make it easy to refresh when you want. It matches
the displayio.Display().refresh() behavior.
2023-10-05 14:56:11 -07:00
Dan Halbert 06765ccfa6 RP2040 now builds 2023-10-05 14:49:49 -04:00
Dan Halbert b4e29e9426
Merge pull request #8456 from tannewt/remove_deprecated_apis
Remove deprecated apis
2023-10-03 15:08:39 -04:00
Dan Halbert 7e0e6fcdca Metro M4 now compiles 2023-10-03 15:03:59 -04:00
Scott Shawcroft 8183d8ef50
Remove `displayio.*.show()`
Use `displayio.*.root_group =`.
2023-10-02 14:28:59 -07:00
Scott Shawcroft a15c111d5c
Merge pull request #7718 from microdev1/watchdog-rp
Update WatchDog implementation
2023-10-02 14:17:29 -07:00
Scott Shawcroft 4c21f22114
Improve RGBMatrix allocation tracking
This prevents leaks but not all use-after-free issues.
2023-09-29 14:55:42 -07:00
Dan Halbert 1c388ab315 finish converting to MP_REGISTER_ROOT_POINTER() 2023-09-29 10:49:34 -04:00
Dan Halbert 76ff01452b Trinket M0 comes up; still very much wip 2023-09-28 16:22:10 -04:00
Jeff Epler b3141933af
FramebufferDisplay: dirty rows are physical
.. so they need a correct row count, which could be the "core.width"
of a 90/180 rotated display.

While I discovered this on the very unusual 320x960 display it could have
affected any framebuffer display that was taller than it was wide,
including sharp memory displays and rgbmatrix displays.
2023-09-27 15:15:34 -05:00
Jeff Epler f80d08e207
Make dot clock displays with a masked portion on the left work 2023-09-27 15:15:32 -05:00
Jeff Epler 04ad525c09
Re-work ioexpander_send_init_sequence
* can now send the I2C bus initialization code
 * can now reset the display on an I/O expander pin
 * parameters re-ordered to enable easy use with **board.TFT_IO_EXPANDER
2023-09-25 11:31:16 -05:00
Jeff Epler 409d1a83b6
displayio: fix releasing dot clock framebuffres in release_displays
this caused problems particularly when the framebuffer was not associated
with a display.
2023-09-25 09:45:35 -05:00
MicroDev 27fd60d739
implement suggested changes
- update the docs
- split out common `watchdog_reset`
- revert to using `None` instead of `WatchDogMode.NONE`
2023-09-24 15:23:38 +00:00
Jeff Epler 1c09a0b494
fix string construction 2023-09-22 13:53:56 -05:00
Jeff Epler ea5bc12a07
fix getting protocol 2023-09-22 13:53:20 -05:00
Dan Halbert 2c0fa0f7dc initial merge from v1.20.0; just satisifying conflicts 2023-09-19 11:10:12 -04:00
Jeff Epler 5a60b8d573
Only delay when explicitly called for 2023-09-18 12:58:54 -05:00
Jeff Epler 91b98dc9d5
fix constness 2023-09-15 14:45:53 -05:00
Jeff Epler ef9f75ead1
Correct idle status of SCK pin 2023-09-14 14:56:39 -05:00
Jeff Epler 4b41fdb586
Fast(ish) special purpose bitbang spi over i2c
with the i2c bus operating at 400kHz this achieves a 4.8kHz SPI clock
rate which could be worse.

It accepts the same style of init sequence as displayio.

tested by scoping the pins on the espressif lcd dev kit with a dummy init sequence:
```python
dotclockframebuffer.ioexpander_send_init_sequence(
    bus=bus,
    i2c_address=expander_addr,
    gpio_address=1,
    gpio_data_len=1,
    gpio_data=0xff,
    cs_bit=1,
    mosi_bit=3,
    clk_bit=2,
    init_sequence=init_sequence)
```
2023-09-14 14:42:48 -05:00
Jeff Epler ed9cacf41d
Add DotClockFramebuffer 2023-08-30 10:30:15 -05:00
Bobby Jap ae181d69af Update wrappers to use new gzip changes 2023-08-28 21:59:00 -07:00
Jeff Epler c029d6a165
Merge remote-tracking branch 'origin/8.2.x' into merge-82x 2023-08-22 08:49:16 -05:00
Dan Halbert 10a022db87 consolidate and shorten some error messages 2023-08-19 12:39:54 -04:00
Dan Halbert 6851faacaa Merge remote-tracking branch 'adafruit/main' into merge-micropython-v1.19.1 2023-08-18 13:29:39 -04: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
Melissa LeBlanc-Williams ce61fd857b Bug fix for skip on only one bmp 2023-08-10 08:15:18 -07:00
Melissa LeBlanc-Williams 78d1ebb529 Fix calculations 2023-08-08 18:33:09 -07: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
Melissa LeBlanc-Williams 5393bc4ed0 More formatting 2023-08-08 13:07:50 -07:00
Melissa LeBlanc-Williams c9c7f02ba4 Fix formatting 2023-08-08 13:03:09 -07:00