pub struct Task(/* private fields */);Expand description
Represents a FreeRTOS task.
Implementations§
Source§impl Task
impl Task
Sourcepub const DEFAULT_PRIORITY: u32 = 8u32
pub const DEFAULT_PRIORITY: u32 = 8u32
The default priority for new tasks.
Sourcepub const DEFAULT_STACK_DEPTH: u16 = 8_192u16
pub const DEFAULT_STACK_DEPTH: u16 = 8_192u16
The default stack depth for new tasks.
Sourcepub fn find_by_name(name: &str) -> Result<Self, Error>
pub fn find_by_name(name: &str) -> Result<Self, Error>
Finds a task by its name.
Sourcepub fn spawn<F>(f: F) -> Result<Self, Error>
pub fn spawn<F>(f: F) -> Result<Self, Error>
Spawns a new task with no name and the default priority and stack depth.
Sourcepub fn spawn_ext<F>(
name: &str,
priority: u32,
stack_depth: u16,
f: F,
) -> Result<Self, Error>
pub fn spawn_ext<F>( name: &str, priority: u32, stack_depth: u16, f: F, ) -> Result<Self, Error>
Spawns a new task with the specified name, priority and stack depth.
Trait Implementations§
Source§impl Ord for Task
impl Ord for Task
Source§impl PartialOrd for Task
impl PartialOrd for Task
impl Eq for Task
impl Send for Task
impl StructuralPartialEq for Task
impl Sync for Task
Auto Trait Implementations§
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