rust-embedded/gpio-cdev

How would one configure a PWM using this crate?

acburigo opened this issue · 4 comments

Is there an easy way to configure a PWM using this crate? If not, does anyone know a good crate for doing so?

No, this crate does not expose the Linux PWM interface, if that's what you're looking for.

Is this a limitation of this crate or a limitation of "GPIO Character Device"? I've seen some crates using "sysfs" for configuring PWM pins (for example, rppal and sysfs-pwm). Should I start using sysfs for doing that?

The GPIO chardev system is separate from the PWM interface, so it's a matter of which crate is targeting which Linux API. The sysfs-pwm sounds like what you may be looking for, but it appears to have a single release from five years ago, so I suspect it could use some testing and probably an update.

I'm going to close this, I am the original author of this crate and sysfs-pwm which has moved ownership to the wg, but it does definitely need a fresh review and a release.

See rust-embedded/rust-sysfs-pwm#12