diff options
| author | Liam Murphy <[email protected]> | 2021-07-28 21:39:31 +1000 |
|---|---|---|
| committer | Liam Murphy <[email protected]> | 2021-07-28 21:39:31 +1000 |
| commit | 4d9514cbcb97343c3a75bfa565d753c44c2a0e27 (patch) | |
| tree | c277793926b77ff6f87953f0330f6434891dc6c3 /embassy-extras/src/peripheral_shared.rs | |
| parent | 68c93256bcab8dfe0f65c694fa5fadb890fd3f00 (diff) | |
Don't allow disabling interrupts wrapped by `PeripheralMutex`
Diffstat (limited to 'embassy-extras/src/peripheral_shared.rs')
| -rw-r--r-- | embassy-extras/src/peripheral_shared.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/embassy-extras/src/peripheral_shared.rs b/embassy-extras/src/peripheral_shared.rs index ae9ae6935..788ac3f96 100644 --- a/embassy-extras/src/peripheral_shared.rs +++ b/embassy-extras/src/peripheral_shared.rs | |||
| @@ -79,22 +79,6 @@ impl<S: PeripheralStateUnchecked> Peripheral<S> { | |||
| 79 | &self.into_ref().get_ref().state | 79 | &self.into_ref().get_ref().state |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | /// Enables the wrapped interrupt. | ||
| 83 | pub fn enable(&self) { | ||
| 84 | // This is fine to do before initialization, because we haven't set the handler yet. | ||
| 85 | self.irq.enable() | ||
| 86 | } | ||
| 87 | |||
| 88 | /// Disables the wrapped interrupt. | ||
| 89 | pub fn disable(&self) { | ||
| 90 | self.irq.disable() | ||
| 91 | } | ||
| 92 | |||
| 93 | /// Returns whether the wrapped interrupt is enabled. | ||
| 94 | pub fn is_enabled(&self) -> bool { | ||
| 95 | self.irq.is_enabled() | ||
| 96 | } | ||
| 97 | |||
| 98 | /// Returns whether the wrapped interrupt is currently in a pending state. | 82 | /// Returns whether the wrapped interrupt is currently in a pending state. |
| 99 | pub fn is_pending(&self) -> bool { | 83 | pub fn is_pending(&self) -> bool { |
| 100 | self.irq.is_pending() | 84 | self.irq.is_pending() |
