pub struct Task<'d>(/* private fields */);
Expand description
Represents a task that a peripheral can do.
When a task is subscribed to a PPI channel, it will run when the channel is triggered by a published event.
Implementations§
Source§impl<'d> Task<'d>
impl<'d> Task<'d>
Sourcepub unsafe fn new_unchecked(ptr: NonNull<u32>) -> Self
pub unsafe fn new_unchecked(ptr: NonNull<u32>) -> Self
Create a new Task
from a task register pointer
§Safety
ptr
must be a pointer to a valid TASKS_*
register from an nRF peripheral.
Sourcepub fn subscribe_reg(&self) -> *mut u32
pub fn subscribe_reg(&self) -> *mut u32
Address of subscription register for this task.
Trait Implementations§
impl<'d> Copy for Task<'d>
impl<'d> Eq for Task<'d>
impl Send for Task<'_>
§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 Task<'d>
Auto Trait Implementations§
impl<'d> Freeze for Task<'d>
impl<'d> RefUnwindSafe for Task<'d>
impl<'d> !Sync for Task<'d>
impl<'d> Unpin for Task<'d>
impl<'d> UnwindSafe for Task<'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