jkristell / infrared

Infrared remote control library for embedded Rust
Apache License 2.0
56 stars 10 forks source link

Unable to use Sender with avr-hal: the trait `_embedded_hal_PwmPin` is not implemented for `avr_hal_generic::port::Pin<PwmOutput<Timer2Pwm>, PD3>` #112

Open highghlow opened 5 months ago

highghlow commented 5 months ago

(I'm using arduino_hal with an Arduino UNO)

I use this code

let timer2 = Timer2Pwm::new(dp.TC2, Prescaler::Prescale64);
let mut sender_pin = pins.d3.into_output().into_pwm(&timer2);
let ir_sender = Sender::new(sender_pin);

to initialize the sender, but get an error:

the trait `_embedded_hal_PwmPin` is not implemented for `avr_hal_generic::port::Pin<PwmOutput<Timer2Pwm>, PD3>`

I was unable to implement the trait myself. Is it possible to use Sender with avr-hal?