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 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: &InterruptContext,
notification: TaskNotification,
) -> Result<(), FreeRtosError>
pub fn notify_from_isr( &self, context: &InterruptContext, notification: TaskNotification, ) -> Result<(), FreeRtosError>
Notify this task from an interrupt.
Sourcepub fn take_notification<D: DurationTicks>(
&self,
clear: bool,
wait_for: D,
) -> u32
pub fn take_notification<D: DurationTicks>( &self, clear: bool, wait_for: D, ) -> u32
Take the notification and either clear the notification value or decrement it by one.
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.
Sourcepub fn get_stack_high_water_mark(&self) -> u32
pub fn get_stack_high_water_mark(&self) -> u32
Get the minimum amount of stack that was ever left on this task.
Trait Implementations§
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