diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-04-03 13:32:34 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-03 13:32:34 +0000 |
| commit | fd5c7acafc810dea732f28b49847baba7b1c2aae (patch) | |
| tree | 61061eddf49e880241450942944773833ea37095 | |
| parent | e6e5685f7c75c3f5f5475e64101de90e6999b79c (diff) | |
| parent | 608eb9b1fde5c2d6c5e8f4f5732379de22c2e6c1 (diff) | |
Merge pull request #61 from kbleeke/noop-mutex-for-events
event queue mutexs can be noop because we are already !Sync in other …
| -rw-r--r-- | src/events.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/events.rs b/src/events.rs index b9c8cca6b..87f6c01a3 100644 --- a/src/events.rs +++ b/src/events.rs | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | use core::num; | 4 | use core::num; |
| 5 | 5 | ||
| 6 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 6 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; |
| 7 | use embassy_sync::pubsub::{PubSubChannel, Publisher, Subscriber}; | 7 | use embassy_sync::pubsub::{PubSubChannel, Publisher, Subscriber}; |
| 8 | 8 | ||
| 9 | #[derive(Debug, Clone, Copy, PartialEq, Eq, num_enum::FromPrimitive)] | 9 | #[derive(Debug, Clone, Copy, PartialEq, Eq, num_enum::FromPrimitive)] |
| @@ -284,9 +284,9 @@ pub enum Event { | |||
| 284 | LAST = 190, | 284 | LAST = 190, |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | pub type EventQueue = PubSubChannel<CriticalSectionRawMutex, EventStatus, 2, 1, 1>; | 287 | pub type EventQueue = PubSubChannel<NoopRawMutex, EventStatus, 2, 1, 1>; |
| 288 | pub type EventPublisher<'a> = Publisher<'a, CriticalSectionRawMutex, EventStatus, 2, 1, 1>; | 288 | pub type EventPublisher<'a> = Publisher<'a, NoopRawMutex, EventStatus, 2, 1, 1>; |
| 289 | pub type EventSubscriber<'a> = Subscriber<'a, CriticalSectionRawMutex, EventStatus, 2, 1, 1>; | 289 | pub type EventSubscriber<'a> = Subscriber<'a, NoopRawMutex, EventStatus, 2, 1, 1>; |
| 290 | 290 | ||
| 291 | #[derive(Clone, Copy)] | 291 | #[derive(Clone, Copy)] |
| 292 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 292 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
