circuitpython/ports/raspberrypi/common-hal
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
..
alarm Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
analogio Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
audiobusio Merge pull request #5852 from jepler/floppy 2022-04-26 11:40:19 -04:00
audiopwmio bump pico-sdk to 1.3.0 2022-02-02 17:15:33 -06:00
board Removed more includes 2021-02-26 22:35:38 -06:00
busio [RP2040] Allow any GPIO pin for RS485 direction pin 2022-04-30 14:31:08 -07:00
countio countio: add selectable rise and fall detection, pulls 2021-12-31 16:34:58 -05:00
digitalio Add a function to get low level register access 2022-01-13 15:29:03 -06:00
floppyio Add floppyio for rp2040 2022-01-17 16:34:47 -06:00
imagecapture Merge pull request #5852 from jepler/floppy 2022-04-26 11:40:19 -04:00
microcontroller Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
neopixel_write test and adjust NeoPixel timings on multiple products 2022-04-25 23:12:24 -04:00
nvm Only ignore warnings if in gcc >= 11 2021-12-22 18:21:18 -08:00
os Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
paralleldisplay Merge pull request #5852 from jepler/floppy 2022-04-26 11:40:19 -04:00
pulseio raspberry: StateMachine: Add support for wrap=, wrap_target= 2022-02-13 16:38:53 -06:00
pwmio fix mistaken use of PWM channel for slice 2021-12-05 21:16:46 -05:00
rgbmatrix clear out interrupt flags when disabling timer too 2021-12-27 16:42:41 -06:00
rotaryio Merge pull request #5852 from jepler/floppy 2022-04-26 11:40:19 -04:00
rp2pio Merge pull request #5852 from jepler/floppy 2022-04-26 11:40:19 -04:00
rtc Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
supervisor run code formatting script 2021-03-15 19:27:36 +05:30
watchdog run code formatting script 2021-03-15 19:27:36 +05:30