Skip to content

Instantly share code, notes, and snippets.

View tarfu's full-sized avatar

Tobias Breitwieser tarfu

View GitHub Profile
@tarfu
tarfu / pico_pwm_hal.rs
Created April 2, 2024 14:31
Crude embassy-rp pwm HAL abstraction
use core::convert::Infallible;
use embassy_rp::pwm::{Channel, Config, Pwm};
use embedded_hal::pwm::{ErrorType, SetDutyCycle};
pub struct PwmChannelB<'d, T: Channel> {
pwm: Pwm<'d, T>,
config: Config,
max_is_logical_one: bool
}