Commit Graph

4777 Commits

Author SHA1 Message Date
DavePutz 6f4510d7aa
Merge branch 'main' into issue_4111 2021-03-08 23:28:21 -06:00
root 576da73a17 Added check for maxlen 2021-03-08 23:23:51 -06:00
root 95b7a59156 Merge branch 'issue_4111' of https://github.com/DavePutz/circuitpython into issue_4111 2021-03-08 23:22:05 -06:00
root 3db0fec267 Added check for maxlen 2021-03-08 23:20:57 -06:00
DavePutz 88650bc4d0
Removed leftover debug code 2021-03-08 22:48:57 -06:00
Dan Halbert 7029783985 funhouse board 2021-03-08 21:24:28 -05:00
Scott Shawcroft 775f1b9e0d
Merge pull request #4329 from jepler/rp2-rotaryio
raspberrypi: Implement rotaryio, improve StateMachine
2021-03-08 17:49:45 -08:00
Scott Shawcroft 4fc6c7d8c9
Merge pull request #4347 from FBSeletronica/franzininhoWIFI
Adding Circuitpython port for Franzininho WIFI board with the ESP32-S2 wroom module
2021-03-08 15:37:42 -08:00
FBSeletronica 27703f3156 fix quote error 2021-03-08 10:32:37 -03:00
FBSeletronica fe29780afb updating USB_VID and USB_PID for Espressif modules 2021-03-08 08:51:48 -03:00
FBSeletronica 2771e7fe75 Updating USB vendor ID and producfor Espressif modules 2021-03-08 08:47:33 -03:00
Jeff Epler cdb0fda72a Merge remote-tracking branch 'origin/main' into count-flash-devices 2021-03-07 20:26:04 -06:00
Dan Halbert 26eb429cc6 restore install/delete for i2c driver 2021-03-07 18:23:14 -05:00
Jeff Epler f1ada8e880 Automatically count EXTERNAL_FLASH_DEVICES 2021-03-07 11:48:39 -06:00
jerryneedell a23129bc49 add GD25Q16C flash to BlackPill 2021-03-07 17:23:39 +00:00
Jeff Epler a4133c4545
Merge pull request #4344 from jepler/vm-size-optimizations
Vm size optimizations: Get back 1500 bytes for 3.2% VM speed decrease
2021-03-07 10:09:51 -06:00
nitz 3b76299f39
Add new nRF port for SF MicroMod nRF52840. 2021-03-07 01:06:50 -05:00
FBSeletronica 17aa9ae3f6 Update vendor ID for Espressif ESP32S2 Modules 2021-03-06 18:43:34 -03:00
FBSeletronica 4a50f1dd6f Update Vendor ID for Espressif 2021-03-06 18:36:53 -03:00
FBSeletronica 48e727f7d6 adding port for Franzininho WIFI board ESP32S2 w/Wrover 2021-03-06 17:47:27 -03:00
FBSeletronica 6cf9c5158c adding port for Franzininho WIFI board 2021-03-06 17:15:54 -03:00
Jeff Epler 4f040af481 vm: Make the speed-size trade-off compile time settable
.. and enable for all samd21 boards
2021-03-05 18:29:27 -06:00
Jeff Epler 67fb3054b4
Merge pull request #4342 from jamesbowman/main
Enable EVE low-level for Teensy 4.0 and 4.1
2021-03-05 17:25:00 -06:00
Jeff Epler d2056a46ee
Merge pull request #4335 from tyomitch/main
[nrf] No need to store `buffer_length` as part of `audiopwmio_pwmaudioout_obj_t`
2021-03-05 15:54:10 -06:00
Jeff Epler bed96a98d2
Merge pull request #4337 from tyomitch/patch-1
[stm] `curr_pulseout` can be `STATIC`
2021-03-05 15:53:31 -06:00
James Bowman bff585ffd2 Enable EVE low-level for Teensy 4.0 and 4.1 2021-03-05 11:32:58 -08:00
Jeff Epler cd1f19020f raspberrypi: move landmine Makefile comments 2021-03-05 12:59:55 -06:00
Jeff Epler 2ae1e7de61 WIPrp2040: Implement IncrementalEncoder
Any two consecutive pins can be used for an IncrementalEncoder

Testing performed: Put a synthesized (few hundred counts per second) quadrature signal into GP2/3 and read the encoder out.  Performed filesystem operations at the same time to stress test it.

The reasons for not using common_hal_rp2pio_statemachine_readinto are commented on.
2021-03-05 10:31:29 -06:00
Dan Halbert 4cf6579e22 remove general changes; not consistent across builds 2021-03-05 10:10:50 -05:00
Artyom Skrobov e0b96c0f43 [nrf] No need to store `buffer_length` as part of `audiopwmio_pwmaudioout_obj_t` 2021-03-05 06:01:58 -05:00
Artyom Skrobov 4720dc179a
[stm] `curr_pulseout` can be `STATIC`
Not used outside of PulseOut.c
2021-03-05 12:52:13 +02:00
Dan Halbert c97721455a Shrink the smallest builds with compile options 2021-03-04 23:07:06 -05:00
DavePutz a4dda3a5ba
Merge branch 'main' into issue_4111 2021-03-04 14:38:00 -06:00
DavePutz c5c297d2c0
Update PulseOut.c 2021-03-04 13:53:19 -06:00
DavePutz b7f03f9487
Update PulseOut.h 2021-03-04 13:52:40 -06:00
DavePutz 2d941b070f
Changed interrupt to per-word basis; cleaned up other small items 2021-03-04 13:51:46 -06:00
Jeff Epler bc14ed31f6 StateMachine.h: Add header for declaration of mcu_pin_obj_t typedef 2021-03-04 12:28:46 -06:00
Jeff Epler c023ec03ff PDMIn: Add missing deinit call 2021-03-04 12:28:06 -06:00
Jeff Epler bd01d31542 rp2pio: Add pins_are_sequential
This can be used where the standard API calls for a list of pins, to check that they satisfy the requirements of the rp2pio state machine, e.g.,
```python
    def __init__(self, pin_a, pin_b):
        if not rp2pio.pins_are_sequential([pin_a, pin_b]):
            raise ValueError("Pins must be sequential")
```
2021-03-04 11:26:33 -06:00
Jeff Epler ff62b0d2c0 StateMachine: Add pull up/down for inputs 2021-03-04 11:26:29 -06:00
Jeff Epler 68ac14b309 StateMachine: Add in_available property
I named the property `in_available` because it is similar to pyserial.
However, it indicates the number of words in the fifo, not the number
of bytes.
2021-03-04 11:14:09 -06:00
Dan Halbert 2ae8a44b2a
Merge pull request #4325 from microDev1/fix-wdt
ESP32S2: Fix watchdog deinit
2021-03-04 11:04:01 -05:00
hathach 6f99026a64 rp2040 use normal usb_irq_handler() 2021-03-04 21:29:04 +07:00
microDev 13453d35c6
fix watchdog deinit 2021-03-04 13:23:34 +05:30
Dan Halbert 71c43ca2dd
Merge pull request #4319 from jepler/feather-default-uart
feather rp2040: enable default board.UART
2021-03-03 16:46:00 -05:00
Jeff Epler b0fca4fcda feather rp2040: enable default board.UART 2021-03-03 13:13:06 -06:00
Dan Halbert cd48c5ee83
Merge pull request #4315 from dhalbert/rp2040-i2c-short-writes
RP2040: Implement short I2C writes (2 bytes or less) using bitbangio
2021-03-03 12:42:47 -05:00
DavePutz 88353f2f5b
Update mpconfigport.mk 2021-03-03 11:00:58 -06:00
DavePutz ced707ed32
Update call to rp2pio_statemachine_construct 2021-03-03 10:55:08 -06:00
Scott Shawcroft 514b73bcf8
Merge pull request #4254 from gamblor21/rp2040_countio
Rp2040 countio
2021-03-03 08:47:24 -08:00
Scott Shawcroft 1d8933dd05
Merge pull request #4265 from DavePutz/pio_soft_reset
Clear out PIOs and State Machines on RP2040 soft reset
2021-03-03 08:43:57 -08:00
Dan Halbert fb7a0f7efc add 1sec timeouts for I2C read and write 2021-03-03 09:43:57 -05:00
gamblor21 98075c5255 Fixed merge 2021-03-02 22:32:59 -06:00
Dan Halbert e3ab394cd6 works on nearly all sensors 2021-03-02 23:27:37 -05:00
Dan Halbert 4167778bbc
Merge pull request #4312 from jepler/feather-rp2040-led
feather rp2040: add board.LED
2021-03-02 23:19:14 -05:00
DavePutz 9b96bae668
Update mpconfigport.mk 2021-03-02 21:36:00 -06:00
DavePutz 30d491e136
Update mpconfigport.mk 2021-03-02 21:30:49 -06:00
DavePutz 58fb7b9b32
Update mpconfigport.mk to get builds working 2021-03-02 21:27:46 -06:00
DavePutz 6046d37f31
Update PulseIn.c 2021-03-02 21:23:45 -06:00
Mark 37ee18349f
Merge branch 'main' into rp2040_countio 2021-03-02 19:47:53 -06:00
gamblor21 4246cc3f6d Counter and PWMOut slice conflict check 2021-03-02 19:32:06 -06:00
Jeff Epler b27afad9cb move LED to the right spot in the file 2021-03-02 19:02:38 -06:00
Jeff Epler efc2667b5f
Merge pull request #4186 from jepler/update-protomatter-rp2
Enable protomatter on RP2040 builds
2021-03-02 19:01:37 -06:00
Dan Halbert 15615effc2
Merge pull request #4276 from bergdahl/patch-1
Update StateMachine.c
2021-03-02 17:11:45 -05:00
Dan Halbert 0a58d451ad
Merge pull request #4306 from Neradoc/fix-reset-to-safe
press reset to safe mode on ports where reset reason is not implemented
2021-03-02 15:44:52 -05:00
Dan Halbert f31b472309 Merge remote-tracking branch 'adafruit/main' into rp2040-i2c-short-writes 2021-03-02 15:17:12 -05:00
Dan Halbert 9939c59caa wip 2021-03-02 15:16:55 -05:00
Jeff Epler 8bfd308d37 feather rp2040: add board.LED 2021-03-02 13:16:09 -06:00
Scott Shawcroft e4f0e47d9f
Merge pull request #4233 from pewpew-game/displayio-group-list
displayio: make Group use a python list internally
2021-03-02 09:59:58 -08:00
Scott Shawcroft ce70b95990
Merge pull request #4177 from microDev1/nvm-rp
RP2040: Support for NVM
2021-03-02 09:57:36 -08:00
Dan Halbert 248acd07c8 shrink builds 2021-03-02 12:25:42 -05:00
Dan Halbert f41fb6fafc
Apply suggestions from code review
copyediting
2021-03-02 12:01:50 -05:00
Dan Halbert 9f6ebf3012
Merge pull request #4310 from kamtom480/spresense_analogin
spresense: return valid reference voltage
2021-03-02 11:55:42 -05:00
Scott Shawcroft 2651e15a52
Merge pull request #4309 from jepler/rp2040-interrupt-pio
rp2pio: allow keyboard interrupt while waiting for tx fifo to empty (& stall)
2021-03-02 08:55:27 -08:00
Scott Shawcroft 722a7150ca
Merge pull request #4308 from jepler/rp2040-build-boot2
raspberrypi: allow directly specifying the original boot .S file
2021-03-02 08:54:30 -08:00
Jeff Epler f560b5f3a3 raspberry: switch pico back to the boot2 for W25Q16
Presumably, switching it to generic hurt performance a bit.

I verified that the build-raspberry_pi_pico/boot2_padded_checksummed.S
built file has the same checksum as the old
bs2_default_padded_checksummed.S
2021-03-02 08:08:41 -06:00
Kamil Tomaszewski 7c921b808b spresense: Define LONGINT_IMPL as MPZ 2021-03-02 14:25:22 +01:00
Kamil Tomaszewski f9d21637a3 spresense: return valid reference voltage 2021-03-02 14:25:22 +01:00
Radomir Dopieralski cb2cf81136 ugame10 - disable pulseio to make more room for the French 2021-03-02 11:11:55 +01:00
microDev b029031286
minor structural modification 2021-03-02 14:36:28 +05:30
Dan Halbert 54d11a8e2d
Merge pull request #4299 from jamesbowman/main
Add EVE support for Feather M4 Express
2021-03-01 22:56:50 -05:00
Jeff Epler 5a00862b1d raspberrypi: allow directly specifying the original boot .S file
.. all the necessary steps to transform it into a padded, checksummed
file are now done by the build system.

Since it is assigned by "?=", it _should_ be the case that individual
builds can override it.

I did not "test" this per se, but it gives the same content and checksum
(except for the identifying comment with a path) as #4302.
2021-03-01 21:08:19 -06:00
Jeff Epler 4b63a8c9b4 rp2pio: allow keyboard interrupt while waiting for tx fifo to empty (& stall) 2021-03-01 21:07:04 -06:00
Scott Shawcroft d0eab5c561
Merge pull request #4256 from kmatch98/bt_cleanup
Add `bitmaptools` module
2021-03-01 18:24:12 -08:00
James Bowman 0dabd1ace2 Add EVE support for Feather M4 Express 2021-03-01 14:42:48 -08:00
Scott Shawcroft 1b3bca14cb
Merge pull request #4294 from kamtom480/spresense_analogin
spresense: return the correct value for Analog In
2021-03-01 13:21:15 -08:00
Scott Shawcroft 21a8752166
Merge pull request #4297 from adafruit/tannewt-patch-1
Update flash sizes for Adafruit RP2040 boards
2021-03-01 13:19:50 -08:00
Jeff Epler 238484ec26 Merge remote-tracking branch 'origin/main' into update-protomatter-rp2 2021-03-01 15:18:32 -06:00
Scott Shawcroft 532e7db293
Merge pull request #4267 from dhalbert/rp2040-digitalinout-fixes
RP2040: change DigitalInOut direction only when necessary; strong drive strength
2021-03-01 13:14:13 -08:00
Scott Shawcroft af9dfccab1
Update QT Py flash size 2021-03-01 10:34:25 -08:00
Scott Shawcroft dac047db61
Update Feather RP2040 to 8MB 2021-03-01 10:33:04 -08:00
Kamil Tomaszewski d68fdf3a3d spresense: return the correct value for Analog In 2021-03-01 15:45:10 +01:00
gamblor21 d7bc8a46a5 Added counters per slice 2021-02-27 15:17:27 -06:00
root 29c89a2487 Removed more includes 2021-02-26 22:35:38 -06:00
root f3515502b7 Removed unecessary includes 2021-02-26 22:33:50 -06:00
root 6374408c06 Changed reset_rp2pio_statemachine to clean up any PIO interrupts. 2021-02-26 22:28:50 -06:00
Jonny Bergdahl f7eac46c78
Update StateMachine.c
Changed woring to use max instead
2021-02-27 00:07:30 +01:00
Scott Shawcroft 776301c932
Typo fix: direcion -> direction 2021-02-26 15:03:56 -08:00
Scott Shawcroft 888a0c5f08
Merge pull request #4224 from microDev1/busio-uart-rp
RP2040: Support for UART
2021-02-26 14:57:23 -08:00
Dan Halbert d9234ffa82 need to gpio_set_dir() at some point 2021-02-26 15:27:35 -05:00
root 7942932176 Requested changes 2021-02-26 14:14:55 -06:00
Scott Shawcroft 7562b0cbb8
Turn off GC opt on catwan_usbstick 2021-02-26 12:00:01 -08:00
Scott Shawcroft 2e6e91dc5c
Merge pull request #4253 from tannewt/rp2040_fix_pwm_reuse
Fix second shared PWM
2021-02-26 11:53:54 -08:00
Scott Shawcroft 7c8d7d77dd
Merge remote-tracking branch 'adafruit/main' into busio-uart-rp 2021-02-26 09:04:42 -08:00
Limor "Ladyada" Fried caedc3bba6
Merge pull request #4270 from tannewt/rp2040_feather_pinout
Update RP2040 Feather pinout for production rev
2021-02-26 11:11:44 -05:00
Jeff Epler 1d1ff5f308 Merge remote-tracking branch 'origin/main' into update-protomatter-rp2 2021-02-26 09:56:35 -06:00
Scott Shawcroft 3f08cb47b8
Merge remote-tracking branch 'adafruit/main' into busio-uart-rp 2021-02-25 16:59:15 -08:00
Scott Shawcroft 52bc935fa7
A few minor fixes for corner cases
* Always clear the peripheral interrupt so we don't hang when full
* Store the ringbuf in the object so it gets collected when we're alive
* Make UART objects have a finaliser so they are deinit when their
  memory is freed
* Copy bytes into the ringbuf from the FIFO after we read to ensure
  the interrupt is enabled ASAP
* Copy bytes into the ringbuf from the FIFO before measuring our
  rx available because the interrupt is based on a threshold (not
  > 0). For example, a single byte won't trigger an interrupt.
2021-02-25 16:50:57 -08:00
Scott Shawcroft f0432b9d6f
Remove neopixel power 2021-02-25 16:37:34 -08:00
Kevin Matocha ec4cd68edc More mpconfigboard.mk corrections for small builds 2021-02-25 17:48:50 -06:00
Dan Halbert d0f1cfb039 address review; use gpio_set() carefully 2021-02-25 18:41:22 -05:00
Scott Shawcroft 2b163ccd6a
Fix incorrect deinit mask 2021-02-25 14:57:46 -08:00
Scott Shawcroft 1b00d94b23
Fix second shared PWM
Fixes #4210
2021-02-25 14:49:09 -08:00
Scott Shawcroft 80f7972f72
Update RP2040 Feather pinout for production rev 2021-02-25 14:46:08 -08:00
Jeff Epler 22276710e6 rp2pio: Fix writing where the stride was 2 or 4
The wrong stride value was being checked.
2021-02-25 15:50:49 -06:00
Kevin Matocha a7a4f93ff8 Updated build configs to turn off BITMAPTOOLS for smaller builds 2021-02-25 15:44:32 -06:00
Dan Halbert 94d7bfb1c9
Merge pull request #4264 from UnexpectedCircuitPython/main
Expanded pin names for TinyS2 + FeatherS2 pin additions for DAC1 & DAC2
2021-02-25 15:13:18 -05:00
Dan Halbert 199a8ce8b0 change DigitalInOut direction only when necessary; strong drive strength 2021-02-25 14:10:19 -05:00
root f8eb5bc275 Cleanup PIOs and State Machines on soft reset 2021-02-25 12:38:43 -06:00
microDev 8170e26a86
more uart improvements
- address suggested changes
- refine uart instance availibility checks
- improve pin validation and rx buffer handling
2021-02-25 23:46:00 +05:30
Dan Halbert bbe0602738
Merge pull request #4245 from kamtom480/spresense_usb_speed
spresense: Pass the correct USB bus speed after restart
2021-02-25 11:02:33 -05:00
Kamil Tomaszewski fb32e0a7fd qtpy_m0_haxpress: Change config to make it fit. 2021-02-25 09:44:33 +01:00
Seon Rozenblum 69b10d7925 Added DAC1 & DAC2 pin names for FeatherS2
Expanded pin names for TinyS2 and added some new ones for functionality I forgot to add pin names for
Cleaned up mpconfigboard
2021-02-25 17:32:34 +11:00
root 86e60f5f35 Clean up formatting 2021-02-24 17:26:35 -06:00
root 17ff5dcc99 Return NotImplementedError for PulseOut 2021-02-24 17:04:05 -06:00
root 8e15f36baa pulseio (pulsein) for RP2040 2021-02-24 16:58:29 -06:00
microDev 5d7fdafcde
implement suggested changes
- add internal buffering
- rtc initialization fix
2021-02-25 00:48:36 +05:30
Kamil Tomaszewski e369473794 spresense: change RX and TX buffer size for CDC 2021-02-24 18:19:18 +01:00
Mark b935dcafdc
Merge branch 'main' into rp2040_countio 2021-02-23 19:46:41 -06:00
gamblor21 379f454ce6 Adding countio to rp2040 2021-02-23 19:38:05 -06:00
Scott Shawcroft abbbb91fa8
Add state machine divisor check
This causes an exception when setting a state machine too slow or
too fast.

Fixes #4222
2021-02-23 16:30:46 -08:00
Scott Shawcroft 360475e266
Implement audiobusio and enhance PIO for it
This adds I2SOut and PDMIn support via PIO.

StateMachines can now:
 * read and read while writing
 * transfer in 1, 2 or 4 byte increments
 * init pins based on expected defaults automatically
 * be stopped and restarted
 * rxfifo can be cleared and rxstalls detected (good for tracking when
   the reading code isn't keeping up)

Fixes #4162
2021-02-23 15:50:00 -08:00
Scott Shawcroft e41137c745
Merge pull request #4244 from UnexpectedCircuitPython/main
Added Unexpected Maker TinyS2 board definition
2021-02-23 10:40:06 -08:00
Scott Shawcroft 001d7299b2
Merge pull request #4228 from ZodiusInfuser/rp2040-boards
Added definitions for Pimoroni RP2040-based boards
2021-02-23 10:00:19 -08:00
ZodiusInfuser 1a0bf4c33f
Added flash size for PicoSystem 2021-02-23 11:04:20 +00:00
ZodiusInfuser a9951c9b6c
Added flash size for Keybow2040 2021-02-23 11:01:40 +00:00
ZodiusInfuser ca9b7debe0
Added flash size for Tiny2040 2021-02-23 10:43:35 +00:00
Seon Rozenblum 78b2daa2a7 Added Unexpected Maker TinyS2 board definition 2021-02-23 17:55:17 +11:00
Dan Halbert a30d4ad25d set SUPEROPT_VM = 0 on most non-Express SAMD21 boards 2021-02-22 23:03:11 -05:00
Scott Shawcroft 3fdf29e773
More parens 2021-02-22 18:35:09 -08:00
Scott Shawcroft 863981a5b8
Parens 2021-02-22 18:31:45 -08:00
Scott Shawcroft 0aafeac209
Board specific flash sizes for RP2040
Stop-gap solution for #4041. Comment is there to provide info
needed in the future. (We currently run the generic "safe" settings.)
2021-02-22 17:19:18 -08:00
Dan Halbert 8470f0fdb7 SAMD21: one endpoint pair for MSC now instead of two 2021-02-21 12:37:59 -05:00
Dan Halbert cf3217e6d4
Merge pull request #4232 from TG-Techie/fix_tg_watch
fix TG-Watch ble issue
2021-02-20 18:10:52 -05:00
Jonah Yolles-Murphy a9a2145238 fix TG-Watch ble issue 2021-02-20 15:46:33 -05:00
ZodiusInfuser 52f2fd6d53
Removed trailing white space 2021-02-20 17:25:26 +00:00
ZodiusInfuser 417173b752
Removed trailing white space 2021-02-20 17:24:26 +00:00
ZodiusInfuser 9a4b8c5ed9
Removed trailing white space 2021-02-20 17:23:23 +00:00
ZodiusInfuser dea498a51f
Added new line 2021-02-20 17:20:28 +00:00
ZodiusInfuser 9fbeb0baea
Added new line 2021-02-20 17:20:06 +00:00