Fixed Pointer Updates
This commit is contained in:
parent
2aa2b843ce
commit
e90f47aba3
@ -137,9 +137,9 @@ impl Task {
|
||||
Self(ptr)
|
||||
}
|
||||
|
||||
// Triggers this task.
|
||||
/// Triggers this task.
|
||||
pub unsafe fn trigger(&mut self) {
|
||||
self.0.write(|w| unsafe { w.bits(1) });
|
||||
*self.0.as_ptr() = 1;
|
||||
}
|
||||
|
||||
pub(crate) fn from_reg<T>(reg: &T) -> Self {
|
||||
@ -178,14 +178,14 @@ impl Event {
|
||||
Self(unsafe { NonNull::new_unchecked(reg as *const _ as *mut _) })
|
||||
}
|
||||
|
||||
// Describes whether this Event is currently in a triggered state.
|
||||
/// Describes whether this Event is currently in a triggered state.
|
||||
pub unsafe fn is_triggered(&self) -> bool {
|
||||
self.0.read().bits() == 1
|
||||
*self.0.as_ptr() == 1
|
||||
}
|
||||
|
||||
// Clear the current register's triggered state, reverting it to 0.
|
||||
/// Clear the current register's triggered state, reverting it to 0.
|
||||
pub unsafe fn clear(&mut self) {
|
||||
self.0.write(|w| unsafe { w.bits(0) });
|
||||
*self.0.as_ptr() = 0;
|
||||
}
|
||||
|
||||
/// Address of publish register for this event.
|
||||
|
Loading…
Reference in New Issue
Block a user