|
|
@@ -1,17 +1,22 @@
|
|
|
-#include "luat_base.h"
|
|
|
-#include "luat_rtos.h"
|
|
|
-#include "common.h"
|
|
|
|
|
|
-#if (defined(CONFIG_IDF_CMAKE))
|
|
|
+#ifdef LUAT_FREERTOS_FULL_INCLUDE
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
#include "freertos/task.h"
|
|
|
#include "freertos/queue.h"
|
|
|
+#include "freertos/semphr.h"
|
|
|
+#include "freertos/timers.h"
|
|
|
#else
|
|
|
#include "FreeRTOS.h"
|
|
|
#include "task.h"
|
|
|
#include "queue.h"
|
|
|
+#include "semphr.h"
|
|
|
+#include "timers.h"
|
|
|
#endif
|
|
|
|
|
|
+
|
|
|
+#include "luat_base.h"
|
|
|
+#include "luat_rtos.h"
|
|
|
+
|
|
|
typedef struct
|
|
|
{
|
|
|
uint32_t ID;
|
|
|
@@ -134,7 +139,7 @@ int luat_rtos_event_send(luat_rtos_task_handle task_handle, uint32_t id, uint32_
|
|
|
|
|
|
int luat_rtos_event_recv(luat_rtos_task_handle task_handle, uint32_t wait_event_id, luat_event_t *out_event, luat_rtos_event_wait_callback_t *callback_fun, uint32_t timeout){
|
|
|
if (!task_handle) return -1;
|
|
|
- return get_event_from_task(task_handle, wait_event_id, (void *)out_event, callback_fun, timeout);
|
|
|
+ return get_event_from_task(task_handle, wait_event_id, (void *)out_event, (CBFuncEx_t)callback_fun, timeout);
|
|
|
}
|
|
|
|
|
|
int luat_send_event_to_task(void *task_handle, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3)
|
|
|
@@ -146,7 +151,7 @@ int luat_send_event_to_task(void *task_handle, uint32_t id, uint32_t param1, uin
|
|
|
int luat_wait_event_from_task(void *task_handle, uint32_t wait_event_id, luat_event_t *out_event, void *call_back, uint32_t ms)
|
|
|
{
|
|
|
if (!task_handle) return -1;
|
|
|
- return get_event_from_task(task_handle, wait_event_id, (void *)out_event, call_back, ms);
|
|
|
+ return get_event_from_task(task_handle, wait_event_id, (void *)out_event, (CBFuncEx_t)call_back, ms);
|
|
|
}
|
|
|
|
|
|
/* ------------------------------------------------ critical begin----------------------------------------------- */
|