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 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.
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.
pub fn get_id(&self) -> Result<FreeRtosBaseType, FreeRtosError>
pub fn set_id(&mut self, value: FreeRtosUBaseType)
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)