kaptan-actuator: improve config abstractions
Signed-off-by: Onur Özkan <work@onurozkan.dev>
This commit is contained in:
1 parent
117e1abe97
commit
07a8038857
7 files changed
+136
-146
No files matched your search
@@ -1,9 +1,6 @@
|
||||
use core::sync::atomic::{AtomicU16, Ordering};
|
||||
|
||||
use kaptan_actuator::{
|
||||
PwmConfig,
|
||||
pwm::{ArmSequence, FrameValue, PulseWidth},
|
||||
};
|
||||
use kaptan_actuator::pwm::{ArmSequence, Config, FrameValue, PulseWidth};
|
||||
use stm32f7::stm32f722;
|
||||
|
||||
const APB1_TIMER_CLOCK_HZ: u32 = 108_000_000;
|
||||
@@ -28,7 +25,7 @@ pub(super) struct Tim3Pwm {
|
||||
}
|
||||
|
||||
impl Tim3Pwm {
|
||||
pub(super) fn new(rcc: &stm32f722::RCC, timer: stm32f722::TIM3, config: PwmConfig) -> Self {
|
||||
pub(super) fn new(rcc: &stm32f722::RCC, timer: stm32f722::TIM3, config: Config) -> Self {
|
||||
let period_us = match config.frame_rate().period_microseconds() {
|
||||
Some(period) => period,
|
||||
None => unreachable!(),
|
||||
|
||||
Reference in new issue
Block a user