diff --git a/src/task.rs b/src/task.rs index 4d8989b..3b534aa 100644 --- a/src/task.rs +++ b/src/task.rs @@ -256,6 +256,12 @@ impl Task { freertos_rs_get_stack_high_water_mark(self.task_handle) as u32 } } + + pub fn delete(&mut self) { + unsafe { + freertos_rs_delete_task(self.task_handle as *const _); + } + } } /// Helper methods to be performed on the task that is currently executing.