Function esp_idf_sys::esp_ipc_call

source ·
pub unsafe extern "C" fn esp_ipc_call(
    cpu_id: u32,
    func: esp_ipc_func_t,
    arg: *mut c_void,
) -> esp_err_t
Expand description

@brief Execute a callback on a given CPU

Execute a given callback on a particular CPU. The callback must be of type “esp_ipc_func_t” and will be invoked in the context of the target CPU’s IPC task.

  • This function will block the target CPU’s IPC task has begun execution of the callback
  • If another IPC call is ongoing, this function will block until the ongoing IPC call completes
  • The stack size of the IPC task can be configured via the CONFIG_ESP_IPC_TASK_STACK_SIZE option

@note In single-core mode, returns ESP_ERR_INVALID_ARG for cpu_id 1.

@param[in] cpu_id CPU where the given function should be executed (0 or 1) @param[in] func Pointer to a function of type void func(void* arg) to be executed @param[in] arg Arbitrary argument of type void* to be passed into the function

@return - ESP_ERR_INVALID_ARG if cpu_id is invalid - ESP_ERR_INVALID_STATE if the FreeRTOS scheduler is not running - ESP_OK otherwise