Browse Source

portMAX_DELAY 改为小于 RT_TICK_MAX / 2 (#39)

Shicheng Chu 2 years ago
parent
commit
cd8ebd7d85
1 changed files with 1 additions and 1 deletions
  1. 1 1
      FreeRTOS/portable/rt-thread/portmacro.h

+ 1 - 1
FreeRTOS/portable/rt-thread/portmacro.h

@@ -57,7 +57,7 @@
     typedef rt_base_t        BaseType_t;
     typedef rt_ubase_t       UBaseType_t;
     typedef rt_tick_t        TickType_t;
-    #define portMAX_DELAY    ( TickType_t ) RT_TICK_MAX
+    #define portMAX_DELAY    ( TickType_t ) ((RT_TICK_MAX / 2) - 1) /* see rt_timer_init and rt_timer_start */
 
     struct rt_semaphore_wrapper
     {