kopia lustrzana https://github.com/espressif/esp-idf
ipc: initialise automatically, if called from the app
rodzic
2efd6859ed
commit
4ff262ecff
|
@ -351,7 +351,6 @@ void start_cpu0_default(void)
|
||||||
esp_cache_err_int_init();
|
esp_cache_err_int_init();
|
||||||
esp_crosscore_int_init();
|
esp_crosscore_int_init();
|
||||||
#ifndef CONFIG_FREERTOS_UNICORE
|
#ifndef CONFIG_FREERTOS_UNICORE
|
||||||
esp_ipc_init();
|
|
||||||
esp_dport_access_int_init();
|
esp_dport_access_int_init();
|
||||||
#endif
|
#endif
|
||||||
spi_flash_init();
|
spi_flash_init();
|
||||||
|
|
|
@ -33,21 +33,6 @@ typedef void (*esp_ipc_func_t)(void* arg);
|
||||||
* These APIs can only be used when FreeRTOS scheduler is running.
|
* These APIs can only be used when FreeRTOS scheduler is running.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize inter-processor call module. This function is called automatically
|
|
||||||
* on CPU start and should not be called from the application.
|
|
||||||
*
|
|
||||||
* This function start two tasks, one on each CPU. These tasks are started
|
|
||||||
* with high priority. These tasks are normally inactive, waiting until one of
|
|
||||||
* the esp_ipc_call_* functions to be used. One of these tasks will be
|
|
||||||
* woken up to execute the callback provided to esp_ipc_call_nonblocking or
|
|
||||||
* esp_ipc_call_blocking.
|
|
||||||
*/
|
|
||||||
/** @cond */
|
|
||||||
void esp_ipc_init();
|
|
||||||
/** @endcond */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Execute a function on the given CPU
|
* @brief Execute a function on the given CPU
|
||||||
*
|
*
|
||||||
|
|
|
@ -72,7 +72,19 @@ static void IRAM_ATTR ipc_task(void* arg)
|
||||||
vTaskDelete(NULL);
|
vTaskDelete(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void esp_ipc_init()
|
/*
|
||||||
|
* Initialize inter-processor call module. This function is called automatically
|
||||||
|
* on CPU start and should not be called from the application.
|
||||||
|
*
|
||||||
|
* This function start two tasks, one on each CPU. These tasks are started
|
||||||
|
* with high priority. These tasks are normally inactive, waiting until one of
|
||||||
|
* the esp_ipc_call_* functions to be used. One of these tasks will be
|
||||||
|
* woken up to execute the callback provided to esp_ipc_call_nonblocking or
|
||||||
|
* esp_ipc_call_blocking.
|
||||||
|
*/
|
||||||
|
static void esp_ipc_init() __attribute__((constructor));
|
||||||
|
|
||||||
|
static void esp_ipc_init()
|
||||||
{
|
{
|
||||||
s_ipc_mutex = xSemaphoreCreateMutex();
|
s_ipc_mutex = xSemaphoreCreateMutex();
|
||||||
s_ipc_ack = xSemaphoreCreateBinary();
|
s_ipc_ack = xSemaphoreCreateBinary();
|
||||||
|
|
Ładowanie…
Reference in New Issue