Browse Source

add:移除luat_network_air101.c

Dozingfiretruck 3 years ago
parent
commit
d37644cc0c
3 changed files with 35 additions and 62 deletions
  1. 0 21
      app/port/luat_ccommon_air101.c
  2. 0 41
      app/port/luat_network_air101.c
  3. 35 0
      app/port/luat_rtos_air101.c

+ 0 - 21
app/port/luat_ccommon_air101.c

@@ -5,27 +5,6 @@
 #include "task.h"
 
 
-void luat_task_suspend_all(void) {
-    vTaskSuspendAll();
-}
-
-void luat_task_resume_all(void) {
-    xTaskResumeAll();
-}
-
 uint64_t GetSysTickMS() {
     return xTaskGetTickCount();
 }
-
-
-void OS_Free(void* ptr) {
-    luat_heap_free(ptr);
-}
-
-void* OS_Zalloc(size_t len) {
-    void* ptr = luat_heap_malloc(len);
-	if (ptr) {
-		memset(ptr, 0, len);
-	}
-	return ptr;
-}

+ 0 - 41
app/port/luat_network_air101.c

@@ -1,41 +0,0 @@
-#include "luat_base.h"
-#include "luat_rtos.h"
-#include "c_common.h"
-#include "luat_malloc.h"
-
-#include "FreeRTOS.h"
-#include "semphr.h"
-#include "task.h"
-
-void DBG_Printf(const char* format, ...) {
-    
-}
-
-void DBG_HexPrintf(void *Data, unsigned int len) {
-
-}
-
-LUAT_RET luat_send_event_to_task(void *task_handle, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3) {
-    return LUAT_ERR_OK;
-}
-
-LUAT_RET luat_wait_event_from_task(void *task_handle, uint32_t wait_event_id, void *out_event, void *call_back, uint32_t ms) {
-    return LUAT_ERR_OK;
-}
-
-void luat_stop_rtos_timer(void *timer) {
-
-}
-
-
-void luat_release_rtos_timer(void *timer) {
-
-}
-
-void *luat_create_rtos_timer(void *cb, void *param, void *task_handle) {
-
-}
-
-int luat_start_rtos_timer(void *timer, uint32_t ms, uint8_t is_repeat) {
-    return 0;
-}

+ 35 - 0
app/port/luat_rtos_air101.c

@@ -22,9 +22,13 @@
 
 #include "luat_base.h"
 #include "luat_rtos.h"
+#include "c_common.h"
 #include "luat_malloc.h"
 
 #include "wm_osal.h"
+#include "FreeRTOS.h"
+#include "semphr.h"
+#include "task.h"
 
 #define LUAT_LOG_TAG "luat.rtos"
 #include "luat_log.h"
@@ -42,6 +46,14 @@ LUAT_RET luat_thread_delete(luat_thread_t* thread) {
 	return LUAT_ERR_FAIL;
 }
 
+LUAT_RET luat_send_event_to_task(void *task_handle, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3) {
+    return LUAT_ERR_OK;
+}
+
+LUAT_RET luat_wait_event_from_task(void *task_handle, uint32_t wait_event_id, void *out_event, void *call_back, uint32_t ms) {
+    return LUAT_ERR_OK;
+}
+
 LUAT_RET luat_queue_create(luat_rtos_queue_t* queue, size_t msgcount, size_t msgsize) {
 	queue->userdata = (tls_os_queue_t *)luat_heap_malloc(sizeof(tls_os_queue_t));
 	return tls_os_queue_create((tls_os_queue_t **)&(queue->userdata), msgcount);
@@ -84,3 +96,26 @@ int luat_sem_take(luat_sem_t* semaphore,uint32_t timeout){
 int luat_sem_release(luat_sem_t* semaphore){
     return tls_os_sem_release((tls_os_sem_t *)(semaphore->userdata));
 }
+
+void *luat_create_rtos_timer(void *cb, void *param, void *task_handle){
+
+}
+
+int luat_start_rtos_timer(void *timer, uint32_t ms, uint8_t is_repeat){
+	return 0;
+}
+
+void luat_stop_rtos_timer(void *timer){
+
+}
+void luat_release_rtos_timer(void *timer){
+
+}
+
+void luat_task_suspend_all(void){
+	vTaskSuspendAll();
+}
+
+void luat_task_resume_all(void){
+	xTaskResumeAll();
+}