koutoftimer
koutoftimer
I've got errors about type mismatch by preparing this pull request, that is why I've changed it to `i32` and my primary focus was on correct interupting infinite loop, but...
@MarkDDR you are absolutely right for general case: from [`assume_init`](https://doc.rust-lang.org/std/mem/union.MaybeUninit.html#method.assume_init) > Extracts the value from the `MaybeUninit` container. This is a great way to ensure that the data will get...
[PwmPin][pwmpin] is subset of [Pwm][pwm]. All timers from avr-hal have to implement `Pwm` if avr-hal intends to implement embeded_hal. Because of `PwmPin` is subset of `Pwm`, it should delegate it's...
@Rahix while changes in the "next" is not complete I'd like to argue about needs of `unsafe` for `PinOps` https://github.com/Rahix/avr-hal/blob/8da215ad143211eb418a42d6699564e1dad34d63/avr-hal-generic/src/port.rs#L36-L50 `PinOps` implemented for `Dynamic` and `$Pin`. `Dynamic` has private constructor...
> ### 13.2.3 Switching Between Input and Output > > When switching between tri-state ({DDxn, PORTxn} = 0b00) and output high ({DDxn, PORTxn} = 0b11), an intermediate state with either...
@Urhengulas take a look at https://github.com/Rahix/avr-hal/pull/136 I've solved exactly your problem for SG 90 servo. What I have found out is that SG 90 is pretty inaccurate and you need...
@Rahix Code I was using ```rust #![feature(llvm_asm)] #![no_std] #![no_main] #![feature(abi_avr_interrupt)] use arduino_uno::{ delay_ms, prelude::*, }; use panic_halt as _; const MAX_CYCLES: u16 = 40_000; // 50 Hz // SG 90...
@Rahix [this is][wgm] my try (bad) to expose WGM modes that are, at least, statically verified to match specified timer. Intended usage ```rust let mut timer1 = Timer1Pwm::new(pd.TC1, Prescaler::Prescale8); type...
I do like [`Pwm`][pwm] from `embedded_hal`. According to which, you are setting up period with time variable/frequency which is one type, and duty with `0..65535` when duty type is u16....
@J-K-Tech no: my goal was to take a look at state of progress for couple of open source games. I was not into digging problems (I still invested some time...