pub struct Task { /* private fields */ }Expand description
Handle for a FreeRTOS task
Implementations§
Source§impl Task
impl Task
Sourcepub fn new() -> TaskBuilder
pub fn new() -> TaskBuilder
Prepare a builder object for the new task.
Sourcepub unsafe fn from_raw_handle(handle: FreeRtosTaskHandle) -> Self
pub unsafe fn from_raw_handle(handle: FreeRtosTaskHandle) -> Self
§Safety
handle must be a valid FreeRTOS task handle.
pub fn raw_handle(&self) -> FreeRtosTaskHandle
pub fn is_null(&self) -> bool
pub fn suspend_all()
Sourcepub unsafe fn resume_all()
pub unsafe fn resume_all()
§Safety
For every call to this method there must be a matching previous call to
Task::suspend_all.
Sourcepub fn current() -> Result<Task, FreeRtosError>
pub fn current() -> Result<Task, FreeRtosError>
Try to find the task of the current execution context.
Sourcepub fn set_notification_value(&self, val: u32)
pub fn set_notification_value(&self, val: u32)
Forcibly set the notification value for this task.
Sourcepub fn notify(&self, notification: TaskNotification)
pub fn notify(&self, notification: TaskNotification)
Notify this task.
Sourcepub fn notify_from_isr(
&self,
context: &mut InterruptContext,
notification: TaskNotification,
) -> Result<(), FreeRtosError>
pub fn notify_from_isr( &self, context: &mut InterruptContext, notification: TaskNotification, ) -> Result<(), FreeRtosError>
Notify this task from an interrupt.
Sourcepub fn wait_for_notification<D: DurationTicks>(
&self,
clear_bits_enter: u32,
clear_bits_exit: u32,
wait_for: D,
) -> Result<u32, FreeRtosError>
pub fn wait_for_notification<D: DurationTicks>( &self, clear_bits_enter: u32, clear_bits_exit: u32, wait_for: D, ) -> Result<u32, FreeRtosError>
Wait for a notification to be posted.
Trait Implementations§
impl Send for Task
impl StructuralPartialEq for Task
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl !Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
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