pub struct Event<'d>(/* private fields */);
Expand description
Represents an event that a peripheral can publish.
An event can be set to publish on a PPI channel when the event happens.
Implementations§
Source§impl<'d> Event<'d>
impl<'d> Event<'d>
Sourcepub unsafe fn new_unchecked(ptr: NonNull<u32>) -> Self
pub unsafe fn new_unchecked(ptr: NonNull<u32>) -> Self
Create a new Event
from an event register pointer
§Safety
ptr
must be a pointer to a valid EVENTS_*
register from an nRF peripheral.
Sourcepub fn is_triggered(&self) -> bool
pub fn is_triggered(&self) -> bool
Describes whether this Event is currently in a triggered state.
Sourcepub fn publish_reg(&self) -> *mut u32
pub fn publish_reg(&self) -> *mut u32
Address of publish register for this event.
Trait Implementations§
impl<'d> Copy for Event<'d>
impl<'d> Eq for Event<'d>
impl Send for Event<'_>
§Safety
NonNull is not send, but this event is only allowed to point at registers and those exist in any context on the same core.
impl<'d> StructuralPartialEq for Event<'d>
Auto Trait Implementations§
impl<'d> Freeze for Event<'d>
impl<'d> RefUnwindSafe for Event<'d>
impl<'d> !Sync for Event<'d>
impl<'d> Unpin for Event<'d>
impl<'d> UnwindSafe for Event<'d>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more