Correctly unset bits
This commit is contained in:
parent
e6d0dba5ca
commit
c0ef40d6e9
1 changed files with 2 additions and 2 deletions
|
@ -284,7 +284,7 @@ impl<'a, T: Instance> Cc<'a, T> {
|
||||||
pub fn unshort_compare_clear(&self) {
|
pub fn unshort_compare_clear(&self) {
|
||||||
T::regs()
|
T::regs()
|
||||||
.shorts
|
.shorts
|
||||||
.modify(|r, w| unsafe { w.bits(r.bits() & (0 << self.n)) })
|
.modify(|r, w| unsafe { w.bits(r.bits() & !(1 << self.n)) })
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Enable the shortcut between this CC register's COMPARE event and the timer's STOP task.
|
/// Enable the shortcut between this CC register's COMPARE event and the timer's STOP task.
|
||||||
|
@ -302,7 +302,7 @@ impl<'a, T: Instance> Cc<'a, T> {
|
||||||
pub fn unshort_compare_stop(&self) {
|
pub fn unshort_compare_stop(&self) {
|
||||||
T::regs()
|
T::regs()
|
||||||
.shorts
|
.shorts
|
||||||
.modify(|r, w| unsafe { w.bits(r.bits() & (0 << (8 + self.n))) })
|
.modify(|r, w| unsafe { w.bits(r.bits() & !(1 << (8 + self.n))) })
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wait until the timer's counter reaches the value stored in this register.
|
/// Wait until the timer's counter reaches the value stored in this register.
|
||||||
|
|
Loading…
Reference in a new issue