Răsfoiți Sursa

change: msgbus,还原luat\freertos\luat_msgbus_freertos.c的修改

Wendal Chen 6 luni în urmă
părinte
comite
d89682ca20
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      luat/freertos/luat_msgbus_freertos.c

+ 4 - 0
luat/freertos/luat_msgbus_freertos.c

@@ -20,6 +20,7 @@ void luat_msgbus_init(void) {
 uint32_t luat_msgbus_put(rtos_msg_t* msg, size_t timeout) {
     if (xQueue == NULL)
         return 1;
+    #if 0
     if (luat_rtos_get_ipsr())
 	{
         BaseType_t pxHigherPriorityTaskWoken;
@@ -32,6 +33,9 @@ uint32_t luat_msgbus_put(rtos_msg_t* msg, size_t timeout) {
     {
         return xQueueSend(xQueue, msg, NULL) == pdTRUE ? 0 : 1;
     }
+    #else
+    return xQueueSendFromISR(xQueue, msg, NULL) == pdTRUE ? 0 : 1;
+    #endif
 }
 uint32_t luat_msgbus_get(rtos_msg_t* msg, size_t timeout) {
     if (xQueue == NULL)