Function esp_idf_svc::hal::sys::xTaskCreatePinnedToCoreWithCaps
source · pub unsafe extern "C" fn xTaskCreatePinnedToCoreWithCaps(
pvTaskCode: Option<unsafe extern "C" fn(_: *mut c_void)>,
pcName: *const i8,
usStackDepth: u32,
pvParameters: *mut c_void,
uxPriority: u32,
pvCreatedTask: *mut *mut tskTaskControlBlock,
xCoreID: i32,
uxMemoryCaps: u32,
) -> i32
Expand description
@brief Creates a pinned task where its stack has specific memory capabilities
This function is similar to xTaskCreatePinnedToCore(), except that it allows the memory allocated for the task’s stack to have specific capabilities (e.g., MALLOC_CAP_SPIRAM).
However, the specified capabilities will NOT apply to the task’s TCB as a TCB must always be in internal RAM.
@param pvTaskCode Pointer to the task entry function @param pcName A descriptive name for the task @param usStackDepth The size of the task stack specified as the number of bytes @param pvParameters Pointer that will be used as the parameter for the task being created. @param uxPriority The priority at which the task should run. @param pvCreatedTask Used to pass back a handle by which the created task can be referenced. @param xCoreID Core to which the task is pinned to, or tskNO_AFFINITY if unpinned. @param uxMemoryCaps Memory capabilities of the task stack’s memory (see esp_heap_caps.h) @return pdPASS if the task was successfully created and added to a ready list, otherwise an error code defined in the file projdefs.h