Commit Graph

7088 Commits

Author SHA1 Message Date
Dan Halbert 2451c788f4 valid channels in audio_dma_stop; cleaner supervisor_ticks mgmt in keypad 2021-08-09 09:47:13 -04:00
Dan Halbert 59b89fdc5c Fix various audio DMA issues:
RP2040 and SAMD51:
- Detect when DMA has finished, and stop DMA audio explicitly.
- Do not accidentally reuse `first_buffer` supplied by WaveFile or RawSample. Always realloc `first_buffer` and `second_buffer`

RP2040:
- When audio playing is stopped, write a final zero to the output register. This prevents residual PWM tones.
- Handle buffer size for 8-bit samples properly for 16-bit output.
- Fail on some edge cases (which may not be possible at the moment).
2021-08-09 09:47:13 -04:00
Dan Halbert 2cd80d1074 wip, with debugging printf's 2021-08-09 09:47:13 -04:00
Dan Halbert fd71d924d2 partial buffer mgmt fix 2021-08-09 09:47:13 -04:00
microDev 51f8603783
add getpass module 2021-08-09 17:50:28 +05:30
Pierre 7d02fd42f8 removed trailing spaces at end of pins.c 2021-08-08 21:56:24 -06:00
Pierre 1a7cad6562 removed trailing spaces in pins.c 2021-08-08 21:43:03 -06:00
Pierre b1d5b50551 fromatting updates to pins.c 2021-08-08 21:38:23 -06:00
Nathan Young 579194a543 Colocated board.LED and D13 together (GCM4) 2021-08-09 05:35:38 +02:00
Pierre 9de8045dca foromatting updates to pins.c 2021-08-08 21:31:07 -06:00
Pierre 45d4058981 adding initial files for BlueMicro840 Board 2021-08-08 21:25:54 -06:00
Nathan Young a15ac65fa0 Add board.LED for Grand Central M4 Express
Fixes #5111
2021-08-08 21:43:12 +02:00
microDev 063e3946d6
Merge pull request #5094 from jepler/quirc
Add qrio: Decode QR codes with quirc lib
2021-08-07 09:30:20 +05:30
Scott Shawcroft be2342f32f
Merge pull request #5072 from microDev1/traceback
Add traceback module
2021-08-06 12:10:17 -07:00
Scott Shawcroft 93aa4e9e47
Merge pull request #5102 from evildave666/blackpill-add-mfg-name
Add WeAct manufacturer for STM32F411 blackpill boards
2021-08-06 11:59:24 -07:00
evildave666 4d14bcf2a2 Add WeAct manufacturer for black pill boards 2021-08-06 16:06:16 +09:00
Scott Shawcroft 00b617c9c4
Merge pull request #5097 from anecdata/cucumber
Add Gravitech Cucumber M, MS, R, and RS boards
2021-08-05 11:49:51 -07:00
Jeff Epler f0e489f51f
Merge pull request #5098 from bd34n/bdmicro_vina_d51_flash_chip
board bdmicro_vina_d51: Add support for MX25L12833F flash chip.
2021-08-05 13:48:29 -05:00
Scott Shawcroft e3fa6e2c35
Merge pull request #5089 from tannewt/disable_ble_workflow
Add ability to disable BLE workflow
2021-08-05 11:21:17 -07:00
Jeff Epler 2e8eb43dcc Use new quirc define for small stacks
.. and revert stack enlargement of esp32-s2
2021-08-05 12:52:43 -05:00
Jeff Epler f9393c9e51 enable qrio in unix coverage build, and add a test 2021-08-05 12:24:07 -05:00
ZodiusInfuser f707fa107a Tweaks to Interstate75 pinout 2021-08-05 15:00:47 +01:00
Brian Dean 821f3d5532 board bdmicro_vina_d51: Add support for MX25L12833F flash chip. Add QSPI activity indicator LED. Add D15-D19 as aliases for the I2S peripheral pins. 2021-08-05 09:14:51 -04:00
ZodiusInfuser 11ed759cf9 Tweaks to Plasma2040 pinout 2021-08-05 13:01:50 +01:00
anecdata 10f74618cf Cucumber M, MS, R, and RS boards 2021-08-04 19:09:43 -05:00
Jeff Epler 131dbf1e87 Remove hard-coded disable of USB_HID for kaluga devkits 2021-08-04 18:17:20 -05:00
Dan Halbert 81833035fc raytac_mdbt50q-rx 2021-08-04 15:47:19 -04:00
Jeff Epler 38f392f318 esp32s2: Increase C stack size
The QR decoder has a single item that is 8908 bytes big and placed
on the stack.  (struct datastream)

Without enlarging the stack, this will reliably crash.
2021-08-03 13:40:27 -05:00
Jeff Epler dfc992b7be Make it easier to disable wifi 2021-08-03 13:40:27 -05:00
Jeff Epler ac4b10bcd9 It's "shared-module", not "shared-modules" 2021-08-03 10:37:47 -05:00
ZodiusInfuser 6663dacedb Added board configurations for Plasma and Interstate 2021-08-03 14:01:56 +01:00
Scott Shawcroft 1e225610cc
Add ability to disable BLE workflow
Call `supervisor.disable_ble_workflow()` and the BLE workflow will
be disabled until the chip is reset.

This also includes a couple fixes:
1. Terminals can now be deinit by setting the tilegrid to NULL. This
  prevents using the tilegrid before display is init.
2. Fix BLE serial send amount when sending more than a single packet.

Fixes #5049
2021-08-02 18:37:19 -07:00
Scott Shawcroft 686103fd8e
Merge pull request #5085 from dhalbert/board-specific-pico-sdk-settings
Add board-specific pico-sdk settings; set xosc multipler for Adafruit boards
2021-08-02 10:53:54 -07:00
Tyler Crumpton 5f2cd41bf2 Update PID/VID to real values 2021-07-31 18:05:43 -05:00
Tyler Crumpton f7727405d3 Add CrumpSpace CrumpS2 board definition 2021-07-31 17:01:48 -05:00
Dan Halbert a358e5f58a Add board-specific pico-sdk settings; set xosc multipler for Adafruit boards 2021-07-30 18:50:21 -04:00
Lucian Copeland da149b0a42 Merge remote-tracking branch 'upstream/main' into stm32-sleepmem 2021-07-30 15:35:55 -04:00
Scott Shawcroft bfe29786ce
Merge pull request #5074 from tannewt/break_deep_sleep
Fix a couple fake sleep bugs on nrf and esp
2021-07-30 09:19:08 -07:00
Scott Shawcroft d5cdceb9b9
Use all 4 status pixels on neotrinkey too 2021-07-28 14:25:21 -07:00
Scott Shawcroft bc0f8ac55d
Use all four LEDs for status on MagTag
Fixes #5051
2021-07-28 14:17:31 -07:00
Scott Shawcroft cdf978f3af
Fix a couple fake sleep bugs on nrf and esp
On ESP ctrl-c during fake sleep will now stop the sleep. A crash
on real deep sleep is now fixed as well. (Exception string saving
was crashing on reading the deep sleep exception.) Fixes #4010

This also fixes nRF fake sleep after the first time. The internal
variable wasn't being reset early enough. Fixes #4869
2021-07-28 13:27:48 -07:00
Dan Halbert e9369d50e1
Merge pull request #5067 from tannewt/pulseout_switch
Switch to pin, frequency and duty_cycle PulseOut
2021-07-28 14:58:06 -04:00
Scott Shawcroft 9e54606ba1
Set output low in SIO 2021-07-28 09:00:36 -07:00
microDev f371c0a609
add traceback module 2021-07-28 18:06:23 +05:30
Scott Shawcroft 4be904fd4a
Switch to gpio mux to disable/enable pwm signal 2021-07-27 12:38:18 -07:00
Scott Shawcroft e87e1d8175
Block when setting duty_cycle until the new value is taken 2021-07-27 12:37:35 -07:00
Kattni fc59a7ac02
Merge pull request #5068 from dhalbert/remove-gamepad
remove gamepad; deprecate gamepadshift
2021-07-27 11:35:06 -04:00
Kattni 460643f983
Merge pull request #5066 from dhalbert/led-everywhere
add board.LED wherever possible
2021-07-27 11:18:47 -04:00
Kamil Tomaszewski ff65863719 spresense: update SDK to 2.2.0 2021-07-27 11:25:51 +02:00
Dan Halbert b0fb709d83 more gamepad removal 2021-07-26 23:34:25 -04:00
Dan Halbert 901a6c27c0 remove gamepad; deprecate gamepadshift 2021-07-26 22:15:09 -04:00
Scott Shawcroft daf90aae83
Merge remote-tracking branch 'adafruit/main' into pulseout_switch 2021-07-26 18:48:59 -07:00
Scott Shawcroft 412eb87080
Switch to pin, frequency and duty_cycle PulseOut
Passing in a PWMOut still works but is deprecated. It will be
removed in CircuitPython 8.0.0

This also switches STM32 timer indices and channel indices to
0-based in our pin data rather than `- 1` everywhere. The latter is
more bug prone.

Most of the way for #3264

Tested on Metro M0, Metro M4, Feather S2, Feather nRF52840, Feather
STM32F4 and Arduino RP2040.
2021-07-26 18:35:49 -07:00
Dan Halbert 11ca505fdb add board.LED wherever possible 2021-07-26 19:57:12 -04:00
Scott Shawcroft 8258f51132
Merge pull request #5061 from evildave666/blackpill-remove-nvm
remove unused nvm reserved space from stm32f411ce_blackpill_with_flash
2021-07-26 14:13:29 -07:00
Jeff Epler b9fa06cf6b
Merge pull request #5056 from cdwilson/cdwilson/circuitpython/fix-feather-stm32f405-express-can-pins
Fix CAN pin assignment on Feather STM32F405 Express board.
2021-07-26 09:00:11 -05:00
evildave666 f059bab253 Modify mpconfigboard.mk to point to the new linker file and re-include modules 2021-07-26 14:13:41 +09:00
evildave666 57c6279b40 Added new linker file 2021-07-26 13:59:25 +09:00
lady ada f3a286a7ea can we add busdevice and have room? 2021-07-25 14:45:35 -04:00
Chris Wilson 49dc5805ee Fix CAN pin assignment on Feather STM32F405 Express board. 2021-07-24 22:01:50 -07:00
Tod Kurt 0d401e7bc8 fix whitespace on new flash chip for Arduino Nano RP2040 2021-07-24 13:22:02 -07:00
Tod Kurt dcd5b5ab50 added Arduino Nano RP2040 Connect alternate flash chip 2021-07-24 13:12:44 -07:00
Scott Shawcroft 70cbb4eddb
Support multiple status neopixels
Use the 10 neopixels on the playgrounds for status.

Fixes #5039
2021-07-23 15:17:09 -07:00
microDev c9ac8e77e8
Merge pull request #5042 from NathanY3G/add-support-for-jmp-pin
Added support for specifying the JMP pin (RP2 PIO)
2021-07-23 18:15:43 +05:30
Nathan Young 04ce6a6e8c Check jmp_pin specified when JMP PIN opcodes used 2021-07-23 13:35:20 +02:00
microDev e790ff7327
Merge pull request #5036 from tannewt/esp_oserror0
Remove OSError(0) and old network modules
2021-07-23 11:00:56 +05:30
Scott Shawcroft beda1f7998
Merge pull request #5037 from hierophect/getprevtraceback
Add supervisor.get_previous_traceback() function.
2021-07-22 17:00:14 -07:00
Lucian Copeland ace04ef600 Formatting fixes 2021-07-22 12:57:10 -04:00
Nathan Young 8221a12cf6 Added support for specifying the JMP pin (RP2 PIO) 2021-07-22 18:39:04 +02:00
Scott Shawcroft f84cb94819
Remove OSError(0) and old network modules
The newer modules are `socketpool` and `ssl`.

Fixes #3924, related to #2021, closes #1880, closes #2273, closes #2274
2021-07-21 17:33:40 -07:00
Scott Shawcroft 109bd2886b
Fix Arduino RP2040 flash size
For RP2040 boards, we now change the default flash size based on
the configured flash. We will still try to read the size from the
flash first.

Fixes #4874
2021-07-21 11:02:55 -07:00
Scott Shawcroft 8723a0335f
Merge pull request #5032 from DavePutz/multi_pulseout
Moved global variables to support multiple RP2040 PulseOuts
2021-07-21 10:26:17 -07:00
Scott Shawcroft e14923028f
Merge pull request #5030 from dhalbert/update-to-raspberrypi-pico-sdk-1.2.0
Update pico-sdk to 1.2.0, using raspberrypi repo
2021-07-21 08:14:13 -07:00
root b2d6203c63 fix formatting 2021-07-21 10:05:09 -05:00
root 0559fcd1c0 Moved global variables to support multiple PulseOuts 2021-07-21 09:52:17 -05:00
microDev 68070318f0
Merge pull request #5026 from tannewt/samd_uart
Fix crash when UART construct fails
2021-07-21 08:34:50 +05:30
Scott Shawcroft db0adf1253
Merge pull request #5025 from DavePutz/issue_5016
Turn off PWM pin during PulseOut construct
2021-07-20 17:25:10 -07:00
Scott Shawcroft fece0fb432
Fix crash when UART construct fails
After the script stops with the exception thrown the final gc_sweep
will call any finalizers and they usually call deinit. deinit on
invalid objects can wreak havoc by changing random memory or
(hopefully) crashing. This fixes ensures the object is deinited
until initialization succeeds and the object is valid.

Do the same fix for I2C and SPI too.

Fixes #4700 and fixes #5005
2021-07-20 17:15:19 -07:00
root 8fe4fa0114 Turn off PWN pin during PulseOut construct 2021-07-20 17:17:41 -05:00
Dan Halbert 0293ec261a Update pico-sdk to 1.2.0, using raspberrypi repo 2021-07-20 17:31:29 -04:00
Dan Halbert ce7301527a
Merge pull request #5024 from tannewt/rp2_ble_wait
Don't blink blue on non-BLE workflow boards
2021-07-19 23:51:27 -04:00
Scott Shawcroft f8290e746b
Don't blink blue on non-BLE workflow boards
This includes any boards that have _bleio implemented via HCI.

Fixes #4969
2021-07-19 18:40:37 -07:00
Dan Halbert 5e773b863f
Merge pull request #4793 from kmatch98/funhouse_spi_speed
reduce SPI display baudrate from 60 MHz to 5 MHz to eliminate display glitch
2021-07-19 18:24:48 -04:00
Dan Halbert 128bedae7e
Merge pull request #5019 from DavePutz/issue_5016
Ensure RP2040 pin is left low after PulseOut
2021-07-19 17:57:42 -04:00
Dan Halbert d2f2afe57b
Merge pull request #4925 from microDev1/update-run-mode
Add RunMode.UF2 and update esp32s2 run-modes
2021-07-19 16:37:46 -04:00
root 8d79d4e5ee Ensure pin is left low after PulseOut 2021-07-19 11:46:09 -05:00
microDev 3c25d8e2a0
Merge pull request #5013 from DavePutz/issue_5012
Issue #5012 - RP2040 moved globals to PulseIn object to fix multiple instances
2021-07-19 00:21:55 +05:30
root 43275e0b0d Made suggested changes (mostly) 2021-07-18 12:00:37 -05:00
microDev 9ac607dffa
update run-mode
- add microcontroller.RunMode.UF2
- add UF2, NORMAL and BOOTLOADER run-modes to esp32s2
2021-07-18 00:00:58 +05:30
Dan Halbert 50a8e995ff
Merge pull request #5007 from tannewt/samd_pin_reset
Remove MICROPY_PORT_* macros used for never reset
2021-07-16 18:29:30 -04:00
root 1c80696746 iFix formatting 2021-07-16 17:18:06 -05:00
root 588a19a1ab Issue #5012 - Moved globals to PulseIn object to fix multiple instances 2021-07-16 15:59:08 -05:00
Scott Shawcroft bba611336c
Merge pull request #4964 from DavePutz/issue_4937
Fix for issue #4937 - Implement minimum PulseOut time
2021-07-16 11:29:32 -07:00
Scott Shawcroft e042d54702
Fix three boards and xtensa cache key 2021-07-16 11:15:05 -07:00
root eebddbb16d Change min pulse calculation 2021-07-15 21:27:23 -05:00
Scott Shawcroft ca2cb9af2b
Remove MICROPY_PORT_* macros used for never reset
Now we use never_reset which is generally more correct and easier
to get right.

Fixes #5001 and fixes #4997
2021-07-15 16:20:04 -07:00
Jeff Epler e528d8dac3
Merge pull request #5002 from tannewt/microbitv2
Create first BLE-only board, Micro:Bit v2
2021-07-15 14:02:35 -05:00
Lucian Copeland e3bc800bbc
Merge pull request #4999 from hierophect/esp-timer-leak
ESP32S2: Fix PWM timer leak and variable frequency conflicts
2021-07-14 13:29:56 -04:00
Scott Shawcroft 0fadf028ef
Create first BLE-only board, Micro:Bit v2
This fixes build issues with USB off, tweaks the README to allow
for BLE-only boards and adds the Micro:Bit v2 definition.

Fixes #4546
2021-07-14 09:55:51 -07:00
Scott Shawcroft e7c5165ff6
Merge pull request #4994 from bobthechemist/atmel-samd-analogio-deinit
added pin object to analogout
2021-07-13 18:13:11 -07:00