Forgot set_count_direction and set_clock_division in 32 bit instance
This commit is contained in:
parent
d6654bf8b5
commit
e70143ef8f
1 changed files with 12 additions and 0 deletions
|
@ -49,6 +49,10 @@ pub(crate) mod sealed {
|
||||||
fn regs_gp32() -> crate::pac::timer::TimGp32;
|
fn regs_gp32() -> crate::pac::timer::TimGp32;
|
||||||
|
|
||||||
fn set_frequency(&mut self, frequency: Hertz);
|
fn set_frequency(&mut self, frequency: Hertz);
|
||||||
|
|
||||||
|
fn set_count_direction(&mut self, direction: vals::Dir);
|
||||||
|
|
||||||
|
fn set_clock_division(&mut self, ckd: vals::Ckd);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait AdvancedControlInstance: GeneralPurpose16bitInstance {
|
pub trait AdvancedControlInstance: GeneralPurpose16bitInstance {
|
||||||
|
@ -317,6 +321,14 @@ macro_rules! impl_32bit_timer {
|
||||||
crate::pac::$inst
|
crate::pac::$inst
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn set_count_direction(&mut self, direction: vals::Dir) {
|
||||||
|
Self::regs_gp32().cr1().modify(|r| r.set_dir(direction));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn set_clock_division(&mut self, ckd: vals::Ckd) {
|
||||||
|
Self::regs_gp32().cr1().modify(|r| r.set_ckd(ckd));
|
||||||
|
}
|
||||||
|
|
||||||
fn set_frequency(&mut self, frequency: Hertz) {
|
fn set_frequency(&mut self, frequency: Hertz) {
|
||||||
use core::convert::TryInto;
|
use core::convert::TryInto;
|
||||||
let f = frequency.0;
|
let f = frequency.0;
|
||||||
|
|
Loading…
Reference in a new issue