10 bool use_psram, BaseType_t core_id) {
32 if (this->
tcb_ ==
nullptr) {
36 if (this->
tcb_ ==
nullptr) {
42 this->tcb_.get(), core_id);
58 if (eTaskGetState(this->
handle_) != eSuspended) {
An STL allocator that uses SPI or internal RAM.
RAMUniquePtr< T > make_unique(Args &&...args)
Value initialize one T; empty on exhaustion.
RAMUniquePtr< T[]> make_unique_array_for_overwrite(size_t n)
n elements left uninitialized, as std::make_unique_for_overwrite does; empty on exhaustion,...
RAMUniquePtr< StackType_t[]> stack_buffer_
bool destroy()
Delete the task, keeping the TCB and stack buffer allocated for reuse by a subsequent create() call.
bool deallocate()
Delete the task (if created) and free the TCB and stack buffer.
RAMUniquePtr< StaticTask_t > tcb_
bool create(TaskFunction_t fn, const char *name, uint32_t stack_size, void *param, UBaseType_t priority, bool use_psram, BaseType_t core_id=tskNO_AFFINITY)
Allocate the TCB (always internal RAM) and the stack, then create the task.
spi_device_handle_t handle