diff options
| author | Cameron <[email protected]> | 2023-06-29 17:44:46 +0200 |
|---|---|---|
| committer | Cameron <[email protected]> | 2023-06-29 17:44:46 +0200 |
| commit | 3f19879f41e8c39c5c38e7905a180160b24807fc (patch) | |
| tree | 39801dfa890d3d6b94c7a72938484dc136c35514 | |
| parent | e90f47aba31be9d99935c758d87941c7106cbece (diff) | |
PR Fixes
| -rw-r--r-- | embassy-nrf/src/ppi/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/embassy-nrf/src/ppi/mod.rs b/embassy-nrf/src/ppi/mod.rs index 0789e2694..76757a248 100644 --- a/embassy-nrf/src/ppi/mod.rs +++ b/embassy-nrf/src/ppi/mod.rs | |||
| @@ -138,8 +138,8 @@ impl Task { | |||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | /// Triggers this task. | 140 | /// Triggers this task. |
| 141 | pub unsafe fn trigger(&mut self) { | 141 | pub fn trigger(&mut self) { |
| 142 | *self.0.as_ptr() = 1; | 142 | unsafe { self.0.as_ptr().write_volatile(1) }; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | pub(crate) fn from_reg<T>(reg: &T) -> Self { | 145 | pub(crate) fn from_reg<T>(reg: &T) -> Self { |
| @@ -179,13 +179,13 @@ impl Event { | |||
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | /// Describes whether this Event is currently in a triggered state. | 181 | /// Describes whether this Event is currently in a triggered state. |
| 182 | pub unsafe fn is_triggered(&self) -> bool { | 182 | pub fn is_triggered(&self) -> bool { |
| 183 | *self.0.as_ptr() == 1 | 183 | unsafe { self.0.as_ptr().read_volatile() == 1 } |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | /// Clear the current register's triggered state, reverting it to 0. | 186 | /// Clear the current register's triggered state, reverting it to 0. |
| 187 | pub unsafe fn clear(&mut self) { | 187 | pub fn clear(&mut self) { |
| 188 | *self.0.as_ptr() = 0; | 188 | unsafe { self.0.as_ptr().write_volatile(0) }; |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | /// Address of publish register for this event. | 191 | /// Address of publish register for this event. |
