How to set multiple GPIO pins? #2233
Unanswered
alethiophile
asked this question in
Q&A
Replies: 2 comments 4 replies
-
You are right - there is no such API and creating such an API in a sane (= safe) way might be challenging. Out of curiosity: what is the use-case where you need the edges in absolute sync? Options which come to my mind
|
Beta Was this translation helpful? Give feedback.
4 replies
-
I had a similar need some time ago and eventually implemented two options:
I can search that code and send what I have if it will help, don't know if it still compiles today as many changes were made, but it will provide some direction. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently working with a circuit that has multiple GPIO ports wired up in parallel to a peripheral. I need to set all of them at once using a single write instruction. The C driver I'm using as a reference does this using assignment to the
GPIO.out_w1ts
field.What's the best way to do this in Rust? Just grabbing all the pins from the Io struct and setting them manually seems unlikely to work, since it'll presumably issue multiple writes.
Beta Was this translation helpful? Give feedback.
All reactions