Commit Graph

705 Commits

Author SHA1 Message Date
Dan Halbert a61c4c1af9
Merge pull request #6411 from fabaff/weact-studio-pico
Add support for WeAct Studio Pico
2022-06-05 19:17:56 -04:00
Fabian Affolter 7a073317f7 Update PID (0x102E) 2022-06-06 01:03:02 +02:00
foamyguy 260994d16e Merge branch 'main' into display_brightness_pwm 2022-06-04 11:32:15 -05:00
foamyguy cbff9dd8e3 add new argument for all boards with built-in display 2022-06-04 11:08:20 -05:00
Scott Shawcroft 9d10a3da66
Conditionalize LTO 2022-05-27 12:59:54 -07:00
Paint Your Dragon c3f58193ca
Correctly scale analog reading per issue #4794 2022-05-24 08:46:39 -07:00
arturo182 0f1973b037
Merge pull request #6418 from solderparty/stamp_round_board
Add a Round Carrier board file to the RP2040 Stamp build
2022-05-23 19:42:56 +02:00
Michael Wisslead 2b0518233b rp2040 PulseIn improvements 2022-05-23 00:45:06 +00:00
Michael Wisslead 893fc66d16 Use common_hal_rp2pio_statemachine_construct for PulseIn 2022-05-23 00:45:06 +00:00
arturo182 d2d3b27822 Add a Round Carrier board file to the RP2040 Stamp build 2022-05-22 15:52:25 +02:00
Dan Halbert e852b28bb2 update pico-sdk to 1.3.1 2022-05-20 17:52:35 -04:00
Dan Halbert f63b26c534 address jepler's comments and further squeezes 2022-05-20 10:10:55 -04:00
Fabian Affolter f1f9ba2371 Add support for WeAct Studio Pico 2022-05-19 23:51:25 +02:00
Dan Halbert a01dec1df9 message consolidation and more use of validators 2022-05-19 15:38:37 -04:00
Alec Delaney 289fdc1241 Added link to library and guide for rp2pio 2022-05-13 11:15:26 -04:00
Scott Shawcroft 9743aea7aa
Merge pull request #6334 from BigTuna94/add-rp2.65-f
Add new Keyboard - RP2.65-F
2022-05-10 16:52:39 -07:00
Dan Halbert bb46898572
Merge pull request #6361 from mwisslead/rp2040_pulsein_buffer_fix
Fix buffer issue for rp2040 PulseIn
2022-05-08 12:37:17 -04:00
Jeff Epler 5f4f66774c
Merge pull request #6360 from jepler/statemachine-improvements
Statemachine improvements
2022-05-07 09:35:57 -05:00
Jeff Epler 561ed3739a
fix the docstrings 2022-05-07 07:49:16 -05:00
Dan Halbert 34427bd6ba
Update StateMachine.c 2022-05-06 22:36:24 -04:00
Michael Wisslead b7882edd01 Fix buffer issue for rp2040 PulseIn 2022-05-07 00:57:10 +00:00
Jeff Epler b482a732c6
StateMachine: add swap flag
Always use DMA if swap flag is enabled.

Improve docs a bit
2022-05-06 15:22:43 -05:00
Jeff Epler 23c0fc8354
add ability to get, clear txstall flag
This can be used to make sure a PIO has actually finished all data
it was schedule to receive via a 'once' background_write
2022-05-06 15:22:43 -05:00
Jeff Epler f776749ca3
Key off len, not buf, to decide if anything to DMA 2022-05-06 15:22:43 -05:00
Jeff Epler 1a9034ff7c
rp2pio: Allow background_write(None) to terminate after complete loop 2022-05-06 15:22:42 -05:00
Dan Halbert 5edc59f070
Merge pull request #6337 from jepler/property-storage
Optimize flash storage of properties
2022-05-06 09:55:18 -04:00
Guy Dupont 02ec1cebf6
Fix pin mapping for thing plus 2040
GPIO 26 was mapped to GPIO 28
2022-05-05 21:11:32 -04:00
Jeff Epler a9d929627a
minor comment update 2022-05-05 14:40:49 -05:00
Dan Halbert b71ea29a8b
Merge pull request #6330 from KurtE/rp2040_uart_rs485
[RP2040] Allow any GPIO pin for RS485 direction pin
2022-05-04 13:32:36 -04:00
Jeff Epler 7d7986b041
Add NEOPIXEL pin
Closes: #6307
2022-05-03 12:21:15 -05:00
Jeff Epler 510890b207
Enable squeezing property storage in flash
.. and enable it on atmel-samd and raspberrypi. On trinket_m0 this saves
96 net bytes of flash. There are 216 bytes actually saved by reducing
the flash storage size of the property descriptors, but added code in
several paths takes back over half of the 'raw savings'.

By organizing the "get-only" and "get-set" (but no delete) properties
each in a different section, we can represent then more efficiently.

Testing performed: that a get-only property can still be gotten but
can't be set or deleted; that a get-set property can sill be gotten or
set but can't be deleted.  Tested on pygamer.

Because this requires linker file support, I only enabled it on two of
the ports.
2022-05-03 08:48:53 -05:00
Jeff Epler 78cf0a90af
Make MP_PROPERTY_GETTER / _GETSET fully declare the property
This will enable setting data attributes, namely, the section of the
symbol.
2022-05-03 08:48:53 -05:00
Jeff Epler 31da335cac
Introduce, use MP_PROPERTY_GETTER, _GETSET
Later, these can be changed in cunning ways to save flash storage.
2022-05-03 08:48:52 -05:00
Zach Richard a23ede8bc4
update USB VID/PID codes to match pidcodes request 2022-05-02 19:49:30 -04:00
KurtE 1fad381513 [RP2040] Allow any GPIO pin for RS485 direction pin
As I mentioned in issue #6310 while investigating that the Teensy port
did not support RS485_dir pin on normal GPIO pins, I found that it
was not implemented either as well on some other ports.

So was curious to implement it for RP2040 using same approach as I did
for the MIMXRT in the Pull Request #6328

That is I setup the specified pin as a normal GPIO pin in output mode
and then when you do a write operation it sets the GPIO pin logically
high, and when the write completes I set it logically low.

Note: knowing when I can set it low can be tricky, as you need to make
sure the full output has completed otherwise the data will be corrupted.

I am using:         uart_tx_wait_blocking(self->uart);
Which looks like it is supposed to wait until the busy status is no
longer set, which the Reference manual mentioned, but this is leaving
the line logically set longer than I would like.

however I have tried running it with my hacked up version of the
Python Robotis DynamixelSDK and was able to talk to some AX servos.

I did have to change the library slightly for the RP2040, as the
library was erroring out when you did something like uart.read(5)
and it timed out without receiving anything.  The RP2040 returned
None whereas I think the Teensy returned an empty set, which is what
it looks like the PySerial original code expects.

Not sure if anyone is interested in this, but thought i would
put it out as PR and see.
2022-04-30 14:31:08 -07: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 3a8fb4e956
Merge pull request #5852 from jepler/floppy
Add floppyio
2022-04-26 11:40:19 -04:00
Dan Halbert c8e8171cec
Merge pull request #6300 from jepler/pio-continuous
rp2040: add a background write with looping to StateMachines
2022-04-26 10:09:02 -04:00
ZodiusInfuser 910662e833 Finalised motor 2040 pins 2022-04-26 12:56:31 +01:00
ZodiusInfuser 1ccf767112
Merge branch 'adafruit:main' into motor 2022-04-26 10:23:14 +01:00
Dan Halbert 4eeaf41edc test and adjust NeoPixel timings on multiple products 2022-04-25 23:12:24 -04:00
Jeff Epler 1a89a2d366
fix doc build 2022-04-23 13:25:59 -05:00
Jeff Epler 989fb828d4
Revamp background writing
Now a 'once' and a 'loop' buffer can be specified.

'once' is useful for things like writing a neopixel strip in the background,
if you can guarantee the buffer contents are stable until the write is complete.

'loop' is useful for periodic things, like pwm & servos.

both together are useful for some special cases of pwm/servo, where a
transitional waveform needs to be played for one repetition and then
a new waveform needs to be played after that.

The API is renamed to reflect that it's a more generic 'background'
operation.
2022-04-23 13:09:36 -05:00
ViktorWiz e8541e866c fix end of file issue 2022-04-22 15:02:50 +09:00
ViktorWiz 28296f98f8 update pid 2022-04-22 14:59:28 +09:00
ViktorWiz f91be019f6
Merge branch 'adafruit:main' into w5100s-evb-pico 2022-04-22 14:52:04 +09:00
Jeff Epler 457aba79f4
fix doc build 2022-04-20 08:09:38 -05:00
Jeff Epler 144eb5dfd4
fix lost DMA IRQ 2022-04-19 16:42:27 -05:00
Jeff Epler ebc426d9e6
Remove debug prints, improve docs 2022-04-19 16:39:04 -05:00
Jeff Epler b128f180ca
switch to single single dma channel, fix some bugs 2022-04-19 16:33:51 -05:00
Jeff Epler 33d6d55675
the basics work
the sequence has to be a minimum length, 8 entries, but this problem
is not detected. I don't THINK this is an insurmountable problem.
2022-04-19 15:14:50 -05:00
Jeff Epler 33f5598acc
Stub 'continuous write' functionality 2022-04-19 11:35:43 -05:00
Neradoc 17bba7b17d remove Adafruit_CircuitPython_BusDevice from frozen modules, it's built in now 2022-04-19 06:49:11 +02:00
Xu Hao 9c1b44a030 Modify USB VID and PID of the Pico:ed 2022-04-14 17:42:04 +08:00
ViktorWiz b30d2e0889 update w5100s-evb-pico mpconfigboard.h 2022-04-14 14:35:23 +09:00
ZodiusInfuser 8cce2e6406 Updated motor pin names 2022-04-12 15:20:28 +01:00
Xu Hao 71a7ec6f76 Add ELECFREAKS Pico:ed board. 2022-04-12 16:10:02 +08:00
BigTuna94 01cff3c4f8 add MIDI to frozen libs 2022-04-10 14:10:07 -04:00
Jeff Epler f7be4345d9
Merge remote-tracking branch 'origin/main' into floppy 2022-04-07 08:37:46 -05:00
ZodiusInfuser 769b182da4 Added definition for upcoming Pimoroni motor board 2022-04-07 07:24:55 +01:00
Dan Halbert 1a329cfd11
Merge pull request #6029 from jepler/pio-wrap
raspberry: StateMachine: Add support for wrap=, wrap_target=
2022-04-06 11:55:02 -04:00
ViktorWiz 76efdfd9a6 initial commit for w5100s-evb-pico 2022-04-06 14:52:28 +09:00
Jeff Epler fe98248a3d
Merge remote-tracking branch 'origin/7.2.x' into merge-7.2.x 2022-04-05 08:45:13 -05:00
Dan Halbert 4cccc1a036 handle clearing both RXIC and RTIC interrupts 2022-04-04 23:55:08 -04:00
Dan Halbert f059f7180c
Merge pull request #6208 from ZodiusInfuser/badger
Improvement to Badger 2040 operation on battery
2022-03-30 13:35:47 -04:00
ZodiusInfuser 336abdfbc7 Switch variable to extern 2022-03-30 17:44:36 +01:00
BigTuna94 dd933c7d06 add NeoPixel lib to firmware 2022-03-30 09:17:26 -04:00
ZodiusInfuser f07cfdd80c Linting fixes 2022-03-28 18:34:39 +01:00
ZodiusInfuser c2fb44b36c Set enable pin to high during boot 2022-03-28 15:56:02 +01:00
ZodiusInfuser b44a2a0c8e Updated pin name to match schematic 2022-03-28 14:07:08 +01:00
ZodiusInfuser 8e98be2704 Added additional constants 2022-03-24 18:32:39 +00:00
ZodiusInfuser 9c81ea86e9 Added board definition for upcoming Pimoroni servo driver. 2022-03-24 16:07:04 +00:00
Scott Shawcroft dcc3ec171e
Merge remote-tracking branch 'adafruit/7.2.x' into merge_7.2.2 2022-03-15 13:56:11 -07:00
Scott Shawcroft fd17ba6d91
Merge pull request #6143 from ZodiusInfuser/badger
Added built-in display bringup for Badger2040
2022-03-15 13:28:00 -07:00
BigTuna94 c919e9c2cc fix duplicate reference names for DSN export 2022-03-14 21:02:14 -04:00
ZodiusInfuser af2862ead9
Removed trailing whitespace 2022-03-14 22:28:28 +00:00
ZodiusInfuser a778469082 Inverted the display pixels to match the expected CPY behaviour 2022-03-14 11:12:03 +00:00
Dan Halbert f13d218749
Merge pull request #6125 from tannewt/usb_host
Start of USB host API
2022-03-11 21:41:28 -05:00
ZodiusInfuser eab5f00548 Added built-in display bringup for Badger2040 2022-03-11 20:10:42 +00:00
Dan Halbert e4cd9690f1 rework auto-reload delay logic 2022-03-11 14:03:04 -05:00
Dan Halbert 1c8f671f0a
Merge pull request #6118 from pewpew-game/parallel-reset-optional
paralleldisplay: reset and read pins should be optional
2022-03-08 09:34:25 -05:00
Scott Shawcroft 83593a1558
Start of USB host API
This allows you to list and explore connected USB devices. It
only stubs out the methods to communicate to endpoints. That will
come in a follow up once TinyUSB has it. (It's in progress.)

Related to #5986
2022-03-07 18:07:25 -08:00
Michael Himing 236ebba0ca melopero_shake_rp2040: Add missing BOARD_DICT_STANDARD_ITEMS 2022-03-08 08:58:32 +11:00
Radomir Dopieralski b69a06b2ed Also fix the read pin in the atmel and rp2040 ports 2022-03-06 11:33:07 +01:00
ZodiusInfuser d66cf1d8ef Name fix 2022-02-21 11:26:43 +00:00
ZodiusInfuser d0bbaddcb3 Board definitions for upcoming EInk board 2022-02-21 11:23:55 +00:00
Jeff Epler 729fcf749e
Fix doc markup 2022-02-15 16:03:52 -06:00
Jeff Epler a58bf235d8
raspberry: StateMachine: Add support for wrap=, wrap_target= 2022-02-13 16:38:53 -06:00
Scott Shawcroft 22928fec55
Explain read and write size to/from PIO FIFOs 2022-02-10 10:55:04 -08:00
Dan Halbert da035fe958
Merge pull request #5990 from sgauche/stm_spi_3wire
Add support for half-duplex SPI to CPy
2022-02-09 13:11:37 -05:00
Scott Gauche a8d8651873 Canonical C style for half_duplex = true/false 2022-02-08 23:13:22 -05:00
Scott Gauche 309f4fb2b9 add half_duplex false param to spi construct function call in some board files 2022-02-08 22:59:26 -05:00
Scott Gauche 89ad767b8f add half_duplex to spi constructs in other ports but raise not implemented errors 2022-02-08 22:25:23 -05:00
root ce191327e8 RP2040 PDMIn frequency based on sample rate 2022-02-08 10:10:02 -06:00
Dan Halbert 1c17dc9348 ports/raspberrypi/common-hal/busio/SPI.c 2022-02-07 17:07:47 -05:00
Dan Halbert 566f8bed99
Merge pull request #5984 from DavePutz/issue_5967
Correcting order of sideset parameters in function call
2022-02-05 21:58:30 -05:00
root 8c10148b21 Correcting order of sideset parameters in function call 2022-02-05 16:15:12 -06:00
Jeff Epler 07e710b0a0
Merge remote-tracking branch 'origin/main' into floppy 2022-02-04 09:01:36 -06:00
Jeff Epler 6a7742ba88
Merge remote-tracking branch 'origin/main' into floppy 2022-02-04 09:00:32 -06:00
Jeff Epler 749bb99863
bump pico-sdk to 1.3.0 2022-02-02 17:15:33 -06:00