Commit Graph

9866 Commits

Author SHA1 Message Date
Jeff Epler b011468251
Add synthio.Synthesizer
In contrast to MidiTrack, this can be controlled from Python code,
turning notes on/off as desired.

Not tested on real HW yet, just the acceptance test based on checking
which notes it thinks are held internally.
2023-04-02 20:37:23 -05:00
Jeff Epler 05cf5213e2
Allow disabling each class in keypad
.. for boards like pewpewm4 which need a specific kind. And need
some space.
2023-04-01 19:22:52 -05:00
Jeff Epler 13e17e6dcd
Make synthio debuggable in unix coverage port 2023-04-01 11:46:36 -05:00
Jeff Epler 02f8a45dfa
synthio: allow increasing number of channels
12 channels works well on metro m7
2023-04-01 11:46:27 -05:00
Dan Halbert 0aacb146ef take wifi.radio.enabled into account 2023-03-31 22:31:41 -04:00
Dan Halbert 5c429320a8 Add wifi.radio.connected, wifi.radio.ap_active 2023-03-31 17:57:53 -04:00
Dogus Cendek 2d48e9b0b7 Fix VID and Local_Hostname of DeneyapKart1A_v2
Fix VID and Local_Hostname of DeneyapKart1A_v2
2023-03-31 11:44:23 +03:00
Dan Halbert b07de078f9
Merge pull request #7818 from CDarius/m5stack_stickc_fixes
M5stack Stick-C fixes
2023-03-30 09:33:07 -04:00
CDario 1ea6d7b9f4 Updatate PMU initializaiton. Increased low battery waring levels and disabled some interrupts 2023-03-30 09:24:52 +00:00
CDario 808df200ab Added pin connected to AXP192 N_VBUSSEN 2023-03-30 09:15:17 +00:00
CDario 24ed20b1fc Fixed boot led inverted status 2023-03-30 09:06:34 +00:00
Dan Halbert b863fba992
Merge pull request #7813 from gneverov/issue_7790
don't set tcp_err callback for listen sockets (fixes #7790)
2023-03-29 17:14:42 -04:00
Dan Halbert 9203b66142
Merge pull request #7815 from bill88t/intercontinental-ballistic-typo
24Mhz -> 240Mhz
2023-03-29 17:12:09 -04:00
Bill Sideris b746fd05ba
24Mhz -> 240Mhz 2023-03-29 23:58:54 +03:00
Dan Halbert 5909ceacc6
Merge pull request #7806 from dhalbert/no-report-id-out-reports
Handle HID OUT reports with no report ID
2023-03-29 15:33:36 -04:00
Gregory Neverov 173bc198c6 don't set tcp_err callback for listen sockets 2023-03-29 11:49:32 -07:00
MicroDev f14861c245
fix espnow reinit, remove todos and improve docs 2023-03-29 10:21:58 +05:30
Dan Halbert b57b8dc3b8
Merge pull request #7805 from jepler/mimxrt1011-i2s-sample-rate
mimxrt: Fix output frequency for samples that don't divide 192kHz
2023-03-28 16:50:30 -04:00
Dan Halbert b2535496b0 use max-inline-insns-auto=110 only on SAMD21 2023-03-28 16:28:31 -04:00
Dan Halbert 11082435f1 shrink SAMD21 builds by a few hundred bytes 2023-03-28 16:05:17 -04:00
Kattni Rembor 2a4383e633 Add Feather RP2040 RFM, update DVI. 2023-03-28 15:23:19 -04:00
Jeff Epler cb5e1a1e98
mimxrt: Fix output frequency for samples that don't divide 192kHz
This makes all the samples from Dan's collection register as 440Hz
when playing on pwmio or i2sout, using https://webaudiodemos.appspot.com/pitchdetect/index.html
to detect the frequency played (all should show as A 440Hz; an error
of up to 20 "cents" should be treated as OK)

There's an audible carrier with PWM output and the 8kHz samples. This is
probably a limitation of the peripheral which is documented as being for
input signals of 44 kHz or 48 kHz; the carrier frequency is a fixed
multiple of the sample frequency.

Closes #7800
2023-03-28 10:18:28 -05:00
Dan Halbert d4e6772cc2
Merge pull request #7791 from deneyapkart/add-new-boards
Update creator and creation IDs (deneyapkart/1a/g) and add new boards (deneyapmini/v2 and deneyapkart1av2)
2023-03-28 10:21:00 -04:00
Dan Halbert bf2df1b053
Merge pull request #7801 from CDarius/m5stack-atoms3-lite
Add M5Stack AtomS3 Lite
2023-03-28 09:53:50 -04:00
Dan Halbert 31f46f2460
Merge pull request #7797 from Neradoc/espnow-peer-arguments
espnow.Peer: fix argument types and default values
2023-03-28 09:05:46 -04:00
Neradoc 02c628a3c7
Update ports/espressif/bindings/espnow/ESPNow.c
Co-authored-by: MicroDev <70126934+microdev1@users.noreply.github.com>
2023-03-28 14:36:43 +02:00
Neradoc a481c564da change Peer(encrypt=) to encrypted to match the property 2023-03-28 14:00:03 +02:00
CDario 89bd5fae61 Add M5stack AtomS3 Lite 2023-03-28 06:28:56 +00:00
Dan Halbert 1597b32f96
Merge pull request #7798 from kattni/feather-rp2040-dvi-pin-update
Add BUTTON option and reorganise pins.
2023-03-27 20:46:46 -04:00
Dan Halbert 77cd20af8f
Merge pull request #7785 from jepler/mimxrt10xx-mqs
mimxrt10xx: Add PWMAudioOut
2023-03-27 20:46:11 -04:00
Kattni Rembor 16854ae570 Add BUTTON, reorganise pins. 2023-03-27 16:29:03 -04:00
Jeff Epler 9d090ee73e
get rid of another debug print 2023-03-27 10:52:52 -05:00
Neradoc 19429d3626 espnow.Peer: fix argument types and default values 2023-03-27 16:58:44 +02:00
Ozgur BOSTAN 2ede907746
Merge branch 'adafruit:main' into add-new-boards 2023-03-26 14:57:12 +03:00
ozgurbostan 297d9d0a81 Add new boards (deneyapmini/v2 and deneyapkart1a) 2023-03-26 14:54:34 +03:00
Ozgur BOSTAN 872495ef36
Update mpconfigboard.mk Deneyap Kart G 2023-03-26 01:03:40 +03:00
Ozgur BOSTAN c8b329c4ee
Update mpconfigboard.mk of Deneyap Kart 1A 2023-03-26 01:03:01 +03:00
Ozgur BOSTAN efeaa1ad20
Update mpconfigboard.mk of Deneyap Kart 2023-03-26 01:02:08 +03:00
MicroDev 730a2a9c2c
remove certain excludes from pre-commit 2023-03-25 13:09:35 +05:30
Dan Halbert 57ac9aa763
Merge pull request #7783 from deneyapkart/add-new-boards
Add new boards (deneyapkart/1a/g)
2023-03-24 08:58:29 -04:00
Ozgur BOSTAN 8814e0f4f7
Update sdkconfig
Add missing new line
2023-03-24 15:34:17 +03:00
Ozgur BOSTAN c5a6fd97b0
Update sdkconfig
Add missing new line
2023-03-24 09:43:49 +03:00
Jeff Epler b1d9331367
move comment next to its associated #if 2023-03-23 21:11:05 -05:00
Jeff Epler 0c0e06c940
remove comment that was copypasted 2023-03-23 21:10:04 -05:00
Jeff Epler e1c8a3062a
remove debugging print 2023-03-23 21:06:53 -05:00
Jeff Epler e2565e2305
mimxrt10xx: Add PWMAudioOut
.. via a peripheral known as the "MQS" (medium quality sound). It uses an
~192kHz PWM signal to generate audio. It sounds OK on a small speaker with
no amplifier. There's a small pop when starting/stopping audio, as is
typical.
2023-03-23 14:08:44 -05:00
Jeff Epler df916e0484
Merge remote-tracking branch 'origin/main' into mimxrt10xx-rotaryio 2023-03-23 13:02:12 -05:00
Dan Halbert 0639c0850f
Merge pull request #7751 from hathach/add-codespell
Add codespell to pre-commit to scan and fix typo
2023-03-23 13:26:24 -04:00
Scott Shawcroft 5c72828997
Merge pull request #7760 from Neradoc/01space-042-oled-c3
Adding 01space OLED 0.42 C3
2023-03-23 10:14:48 -07:00
Scott Shawcroft cd69e1cec3
Merge pull request #7764 from jepler/mimxrt10xx-i2sout-v2
mimxrt10xx: implement i2sout
2023-03-23 10:07:51 -07:00
Jeff Epler b235b50647
mimxrt: no longer need to collect the pin chainge interrupt ptrs
.. the objects on the gc heap are guaranteed to be alive, as their
finali(s/z)er will disable the interrupt.
2023-03-23 09:58:40 -05:00
Jeff Epler de74b63472
move pin change interrupt stuff to peripherals 2023-03-23 09:28:14 -05:00
Jeff Epler d247e5c6c9
Add the ability for a port to gc things, collect pin change objects that way 2023-03-23 09:16:00 -05:00
Jeff Epler 47e1abdbc7
Add IncrementalEncoder for mimxrt1011
.. and write a general 'pin change interrupt' facility to power it

This uses the same quadrature state machine as atmel-samd, nrf, and
rp2040. The 1011 doesn't have a dedicated encoder peripheral, so we
go the pin-change + software route.
2023-03-23 09:14:58 -05:00
Jeff Epler b50c80e3d9
remove unused macro 2023-03-23 09:12:46 -05:00
Dan Halbert b947605ab7
Touch up 2023-03-23 09:24:11 -04:00
Dan Halbert db76fbd55f
Merge pull request #7712 from gamblor21/ondiskgif_freemem_fix
Add deinit to OnDiskGif
2023-03-23 09:03:07 -04:00
ozgurbostan b38c0a4dc1 Add new boards (deneyapkart/1a/g) 2023-03-23 14:32:01 +03:00
hathach 8c1095b268
Merge branch 'main' into add-codespell 2023-03-23 14:09:57 +07:00
hathach a8abe8e705
remove lib from exludes, fix all remaining typos 2023-03-23 13:59:08 +07:00
Dan Halbert 2365f9b3be shrink SAMD21 builds; rework shrink logic in Makefile 2023-03-22 19:20:20 -05:00
Dan Halbert 3ef2b7f81f
Merge pull request #7777 from tannewt/fix_epd_grayscale
Fix tricolor epd and add EPD feather
2023-03-22 20:13:23 -04:00
Dan Halbert 2282d8ea2d
Merge pull request #7779 from jepler/revert-socket-error
Revert "Correctly raise OS error in socketpool_socket_recv_into()"
2023-03-22 20:10:03 -04:00
Dan Halbert d45cde1d6f
Merge pull request #7776 from dhalbert/metro-m7-esp-tx-rx-swap
Swap ESP32 RX and TX pins on Metro M7 1011
2023-03-22 20:09:38 -04:00
Jeff Epler e05f0ba3b2
Revert "Correctly raise OS error in socketpool_socket_recv_into()"
This reverts commit 7e6e824d56.

Fixes #7770

The change in #7623 needs to be revered; the raise-site added in #7632
is the correct one and the one in socketpool needs to be reverted.

This is not affecting 8.0.x because #7623 was not back-ported to there
before we realized it was not a full fix.

Both #7770 and #7606 should be re-tested. I didn't test.
2023-03-22 14:32:06 -05:00
Scott Shawcroft a280c010c2
Fix tricolor epd and add EPD feather 2023-03-22 11:14:38 -07:00
Dan Halbert 57188885d3 Swap ESP32 RX and TX pins on Metro M7 1011 2023-03-22 14:08:03 -04:00
Jeff Epler f40504b7bc
enable MP3 2023-03-22 12:16:29 -05:00
Jeff Epler 04bb0513df
enable audiomixer 2023-03-22 12:16:26 -05:00
Jeff Epler c6bc9c48c9
mimxrt10xx: implement i2sout
tested on metro m7 (green prototype version) with max98357a i2s amplifier and the following test code:
```py
import board
import time
import digitalio
from audiobusio import I2SOut
from audiocore import RawSample
from microcontroller import pin
from ulab import numpy as np

n = np.array(np.sin(np.linspace(0, np.pi*2, 218, endpoint=False)) * 200, dtype=np.int16)
print(n)
r = RawSample(n, sample_rate=8000, channel_count=2)
def main():
    with digitalio.DigitalInOut(board.LED) as l:
        l.switch_to_output(True)
        value = False
        while True:
            with I2SOut(pin.GPIO_06, pin.GPIO_07, pin.GPIO_04) as i:
                time.sleep(.01)
                l.value = value = not value
                i.play(r, loop=True)
                print(i.playing)
                time.sleep(.5)
                i.stop()
                print("STOPPED")
                print(i.playing)
                time.sleep(.5)
                i.play(r, loop=True)
                print(i.playing)
                print("PLAY AGAIN")
                time.sleep(.5)
            time.sleep(1)
```

Only stereo, 16-bit, raw samples were tested; the sample rate is actually fixed
at 48kHz in the core right now. There is more to do, but the basics work.

# Conflicts:
#	ports/mimxrt10xx/Makefile
#	ports/mimxrt10xx/mpconfigport.mk
2023-03-22 12:15:25 -05:00
Dan Halbert 45257147dc
Merge pull request #7772 from jepler/fix-struct-pack
struct: Check that argument counts match, similar to cpython3
2023-03-22 13:11:34 -04:00
Jeff Epler 1e1172bc24
fix sorting of block 2023-03-22 12:04:34 -05:00
Jeff Epler 08358ecd50
constify spi, i2c, uart bank data 2023-03-22 12:03:20 -05:00
Scott Shawcroft e1f16472c1
Merge pull request #7766 from tannewt/switch_nxp_sdk
Switch iMX RT sdk to NXP repo
2023-03-22 09:57:12 -07:00
Jeff Epler 349dedca54
struct: Check that argument counts match, similar to cpython3
.. and test our struct module during the build-time tests

Closes #7771
2023-03-22 09:35:09 -05:00
Dan Halbert c93560144b
Merge pull request #7678 from FoamyGuy/boundary_fill_background_tasks
do background tasks and handle interrupt during boundary fill
2023-03-21 23:38:05 -04:00
Scott Shawcroft 9c3c0555dd
Switch iMX RT sdk to NXP repo
Fixes #7645
2023-03-21 16:21:57 -07:00
Scott Shawcroft 67e0a49a1f
Merge pull request #7724 from tannewt/get_perfbench_running
Improve iMX RT performance
2023-03-21 09:00:48 -07:00
Neradoc b45d128726 fix lwip name in 01space_lcd042_esp32c3 2023-03-21 16:46:08 +01:00
Neradoc 36e4dc2588 Adding 01space OLED 0.42 C3 2023-03-21 05:01:17 +01:00
Scott Shawcroft 41a8ada327
Merge pull request #7750 from Neradoc/add-ttgo-tdisplay-esp32
Add Lilygo TTGO T-display ESP32 board
2023-03-20 14:40:16 -07:00
Scott Shawcroft 32a596df39
Merge pull request #7757 from adafruit/8.0.x
Merge latest 8.0.x changes
2023-03-20 14:34:59 -07:00
Scott Shawcroft b75d99c5d7
Merge pull request #7745 from Neradoc/lilygo-twatch-v3-MAIN
Add Lilygo T-Watch 2020 V3 (ESP32)
2023-03-20 14:31:32 -07:00
Scott Shawcroft bdf592089a
Fix .bin, .hex and .uf2 with new linker sections
Also, format perfbench output in table with reference timing from
the host.
2023-03-20 14:02:57 -07:00
Jeff Epler 3ac696e7ba
Merge pull request #7731 from kreasteve/statemachine_run_fix
Statemachine run fix
2023-03-19 20:47:09 -05:00
Neradoc b88e76d3a4 Add builtin display support with shared board.I2C to Lolin S2 Pico 2023-03-19 17:48:36 +01:00
hathach fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
Neradoc e7c349ea43 Add Lilygo TTGO T-display ESP32 board 2023-03-18 15:27:59 +01:00
Neradoc f1b7612b5a Add Lilygo T-Watch 2020 V3 (ESP32)
- DISPLAY is in, brightness is ok
- default busses and pin names
- enabled PSRAM
2023-03-18 01:17:46 +01:00
Dan Halbert ca292f3427 Turn off mkfs FAT32 on all SAMD21 builds; note in doc 2023-03-17 12:18:24 -04:00
Benjamin Shockley f35af4c9ce
Update mpconfigboard.mk
Added trailing line
2023-03-16 16:54:55 -05:00
Benjamin Shockley d59a57ecc9
Update pins.c
Changed GIO00 to GIO0
2023-03-16 16:54:38 -05:00
Benjamin Shockley eab8633a9e
Updated Fig Pi Pins and Added Memory Option
Updated the Fig Pi pin definition to match latest production and fix errors.  Added an optional memory chip for parts shortage issues.
2023-03-16 16:41:49 -05:00
kreasteve 208c081c95 bugfix_#7706 2023-03-16 11:10:57 +01:00
kreasteve d7fb21ec76 Revert "bugfix"
This reverts commit 4f1627f68e.
2023-03-16 11:02:41 +01:00
kreasteve 4f1627f68e bugfix 2023-03-16 10:56:22 +01:00
MicroDev 37b9f778e1
Merge pull request #7237 from kdb424/main
Add Boardsource Blok
2023-03-16 00:02:10 +05:30
Kyle Brown 6062e75b08 add Blok 2023-03-15 08:58:53 -07:00
foamyguy f2931dec7a empty RUN_BACKGROUND_TASKS for unix port 2023-03-14 18:26:23 -05:00
Scott Shawcroft 5bb8a7a7c6
Improve iMX RT performance
* Enable dcache for OCRAM where the VM heap lives.
* Add CIRCUITPY_SWO_TRACE for pushing program counters out over the
  SWO pin via the ITM module in the CPU. Exempt some functions from
  instrumentation to reduce traffic and allow inlining.
* Place more functions in ITCM to handle errors using code in RAM-only
  and speed up CP.
* Use SET and CLEAR registers for digitalio. The SDK does read, mask
  and write.
* Switch to 2MiB reserved for CircuitPython code. Up from 1MiB.
* Run USB interrupts during flash erase and write.
* Allow storage writes from CP if the USB drive is disabled.
* Get perf bench tests running on CircuitPython and increase timeouts
  so it works when instrumentation is active.
2023-03-14 12:30:58 -07:00