Help Using Embedded HAL

I'm looking for a little insight on how to use the pwm module from the Longan Nano HAL. Any links or help to understand what I'm looking at is appreciated. I just don't understand everything required to create a PWM instance.

let mut pwm_t0 = PwmTimer::new(TIMER0, &mut rcu....);  // need help here
pwm_t0.set_duty(0.5);
pwm_t0.set_period(1000.hz());
pwm_t0.enable();

You might find the nrf-hal's example of PWM usage useful: nrf-hal/main.rs at master · nrf-rs/nrf-hal · GitHub

I will check it out, thanks.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.