2018-09-06 05:52:41 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
#include "freertos/task.h"
|
|
|
|
#include "unity.h"
|
|
|
|
#include "esp_ipc.h"
|
2019-08-15 07:05:59 +00:00
|
|
|
#include "sdkconfig.h"
|
2018-09-06 05:52:41 +00:00
|
|
|
|
2019-08-15 07:05:59 +00:00
|
|
|
#if !CONFIG_FREERTOS_UNICORE
|
2018-09-06 05:52:41 +00:00
|
|
|
static void test_func_ipc_cb(void *arg)
|
|
|
|
{
|
|
|
|
vTaskDelay(50);
|
|
|
|
int *val = (int *)arg;
|
|
|
|
*val = 0xa5a5;
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_CASE("Test blocking IPC function call", "[ipc]")
|
|
|
|
{
|
|
|
|
int val = 0x5a5a;
|
|
|
|
esp_ipc_call_blocking(!xPortGetCoreID(), test_func_ipc_cb, &val);
|
|
|
|
TEST_ASSERT_EQUAL_HEX(val, 0xa5a5);
|
|
|
|
}
|
2019-08-15 07:05:59 +00:00
|
|
|
#endif /* !CONFIG_FREERTOS_UNICORE */
|