Josfemova / eos-s3-rs

Bringing support for the EOS-S3 in Rust
Apache License 2.0
9 stars 1 forks source link

GPIO hal implementation discussion/reminder #3

Open Josfemova opened 2 years ago

Josfemova commented 2 years ago

Basic context:

M4 GPIO output control in the EOS-S3 is inherently unsafe as all 8 GPIO outputs are controlled from a single register (see here). For embedded-hal gpio implementation it might be better to wrap single gpios with a mutex in order to make them thread-safe. There's a long road before work on the hal starts but I'm opening this as a reminder

nimish commented 1 year ago

Eos s3 apparently supports bit banding so to toggle gpio pins atomically that'd be the safest way.

No documentation on it I can find :(