pub trait TimerModule<D: Driver>: SeesawDevice<Driver = D> {
// Provided method
fn analog_write(
&mut self,
pin: u8,
value: u8,
) -> Result<(), SeesawError<D::Error>> { ... }
}Expand description
The PWM module provides up to 4 8-bit PWM outputs. The module base register address for the PWM module is 0x08. PWM outputs are available on pins PA04, PA05, PA06, and PA07.
Provided Methods§
Sourcefn analog_write(
&mut self,
pin: u8,
value: u8,
) -> Result<(), SeesawError<D::Error>>
fn analog_write( &mut self, pin: u8, value: u8, ) -> Result<(), SeesawError<D::Error>>
Write a PWM value to a PWM-enabled pin
On the SAMD09 breakout, the pin corresponds to the number on the silkscreen. On the default seesaw firmware on the SAMD09 breakout, pins 5, 6, and 7 are PWM enabled.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.