Просмотр исходного кода

Add FREERTOS_PRIORITY_TO_RTTHREAD in esp-idf portmacro.h

tangzz98 3 лет назад
Родитель
Сommit
99a157f1a6
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      FreeRTOS/portable/esp-idf/riscv/include/freertos/portmacro.h

+ 2 - 0
FreeRTOS/portable/esp-idf/riscv/include/freertos/portmacro.h

@@ -333,6 +333,8 @@ FORCE_INLINE_ATTR bool xPortCanYield(void)
     return (threshold <= 1);
     return (threshold <= 1);
 }
 }
 
 
+#define FREERTOS_PRIORITY_TO_RTTHREAD(priority)    ( configMAX_PRIORITIES - 1 - ( priority ) )
+#define RTTHREAD_PRIORITY_TO_FREERTOS(priority)    ( RT_THREAD_PRIORITY_MAX - 1 - ( priority ) )
 /* Use this macro to calculate the buffer size when allocating a queue statically
 /* Use this macro to calculate the buffer size when allocating a queue statically
  * To ensure the buffer can fit the desired number of messages
  * To ensure the buffer can fit the desired number of messages
  */
  */