esp_idf_svc::sys

Function esp_openthread_task_switching_lock_acquire

Source
pub unsafe extern "C" fn esp_openthread_task_switching_lock_acquire(
    block_ticks: u32,
) -> bool
Expand description

@brief This function acquires the OpenThread API task switching lock.

@note In OpenThread API context, it waits for some actions to be done in other tasks (like lwip), after task switching, it needs to call OpenThread API again. Normally it’s not allowed, since the previous OpenThread API lock is not released yet. This task_switching lock allows the OpenThread API can be called in this case.

@note Please use esp_openthread_lock_acquire() for normal cases.

@param[in] block_ticks The maxinum number of RTOS ticks to wait for the lock.

@return - True on lock acquired - False on failing to acquire the lock with the timeout.