Commit Graph

309 Commits

Author SHA1 Message Date
Dan Halbert ea15a9118a ringbuf cleanup 2022-09-21 10:03:05 -04:00
Dan Halbert 8a568d18b5
Merge pull request #6757 from latkinso42/adcdma
analogbufio
2022-09-16 08:32:24 -04:00
Dan Halbert 82694b7265 remove extraneous copyrights 2022-09-15 20:31:08 -04:00
Dan Halbert 60f43b1703 allow preserving pin state during deep sleep 2022-09-15 17:35:14 -04:00
latkinso42 c1f57c6ceb Pushing for resolution 2022-09-07 18:53:35 -04:00
latkinso42 25078a24a3 Attempt to fix Build-Docs and Pre-Commit 2022-09-06 18:58:57 -04:00
latkinso42 5498b3ac91 fix to analogbufio BufferedIn.h 2022-09-05 14:22:08 -04:00
latkinso42 a1856ea3e9 Renaming module from adcbuffer to analogbufio 2022-09-05 12:11:49 -04:00
latkinso42 478b40ecf9 Merge branch 'adcdma' of https://github.com/latkinso42/circuitpython into adcdma
Syncing with remote
2022-09-04 16:07:37 -04:00
Lee Atkinson 3cd8259a78
Merge branch 'adafruit:main' into adcdma 2022-09-04 15:59:20 -04:00
latkinso42 d7a1db5b87 Changes per review 2022-09-04 15:57:59 -04:00
Jeff Epler a3e17189a4
rp2pio: fix occasional bug when not using OUT pins
a NULL first pin object is used to indicate that there are zero
of some kind of pin associated with the StateMachine. However,
mask_and_rotate wasn't checking for zero. It actually read data from
near address 0x0 and (in my case) got a nonzero mask, which then
caused a program with GPIO11 and GPIO12 as input with pull-up and no
out pins to erroneously encounter the error "pull masks conflict with
direction masks"
2022-09-03 20:39:42 -05:00
Lee Atkinson 04af01a672 Pin Validation fixed/readmultiple return fixed 2022-08-27 14:47:12 -04:00
Lee Atkinson 6fd08483e2 Tidying code for PR/ Minor Issues 2022-08-24 17:41:51 -04:00
Lee Atkinson e23b621d69 Fixing 8 bit and 12 bit conversion 2022-08-22 18:55:55 -04:00
Lee Atkinson f5655dd48c Fixing Build errors/ DMA Xfer Rate 2022-08-21 11:44:40 -04:00
Lee Atkinson 68671399d1 More formating 2022-08-19 10:51:13 -04:00
Lee Atkinson d3c3c9eac4 Tidy a few things 2022-08-18 19:10:16 -04:00
Lee Atkinson f91af513b7 Introduced odule adcbuffer / removed analogio/AnalogFastIn 2022-08-18 16:23:17 -04:00
Lee Atkinson 34b8fbaf14
Merge branch 'adafruit:main' into adcdma 2022-08-18 09:08:10 -04:00
Lee Atkinson 4542c801b0 Tidying up loose endson draft PR 2022-08-14 13:03:33 -04:00
gamblor21 7584363f66 Forgot an include 2022-08-13 17:41:45 -05:00
gamblor21 1ae2a2154e Initial i2ctaret commit 2022-08-13 17:00:43 -05:00
Lee Atkinson 8cd12b2478 Copyright Change 2022-08-12 16:01:58 -04:00
Lee Atkinson 81c7ba899d Copyright Update/Acknowledgements 2022-08-12 13:57:45 -04:00
Lee Atkinson c3c1e307c4 Sample Rate Enhancements 2022-08-11 17:50:30 -04:00
Lee Atkinson 9e0c580d3d AnalogFastIn 2022-08-10 09:42:24 -04:00
Lee Atkinson f69939c49c First Commit for AnalogFastIn 2022-08-06 16:22:50 -04:00
Scott Shawcroft d9f6e99942
Fix RP2040 UART
It couldn't receive more than 32 bytes in while checking in_waiting
because in_waiting didn't turn interrupts back on correctly.

Fixes #6579
2022-07-11 13:36:44 -07:00
Nick Lopez dce9396fe3 issue adafruit#6538 loose bounds checking on WAIT PIO instruction 2022-07-02 14:32:20 -07:00
Scott Shawcroft 9c20eb58e9
Merge pull request #6450 from mwisslead/rp2040_pulsein_common_hal_construct
Rp2040 pulsein improvements
2022-06-08 08:15:29 -07: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
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
Dan Halbert f63b26c534 address jepler's comments and further squeezes 2022-05-20 10:10:55 -04:00
Dan Halbert a01dec1df9 message consolidation and more use of validators 2022-05-19 15:38:37 -04: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
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
Jeff Epler a9d929627a
minor comment update 2022-05-05 14:40:49 -05: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 4eeaf41edc test and adjust NeoPixel timings on multiple products 2022-04-25 23:12:24 -04: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
Jeff Epler ebc426d9e6
Remove debug prints, improve docs 2022-04-19 16:39:04 -05:00