freertos/timer: fix the static timer creation

Removes the not used spinlock field inside timer object which was causing assertion fail
This commit is contained in:
Felipe Neves 2020-04-23 16:34:13 -03:00 committed by bot
parent bd9b921713
commit d8ed9be1d4
2 changed files with 17 additions and 3 deletions

View File

@ -1274,9 +1274,6 @@ typedef struct xSTATIC_TIMER
UBaseType_t uxDummy7;
#endif
uint8_t ucDummy8;
portMUX_TYPE xDummy9;
} StaticTimer_t;
/*

View File

@ -68,3 +68,20 @@ TEST_CASE("Recurring FreeRTOS timers", "[freertos]")
TEST_ASSERT( xTimerDelete(recurring, 1) );
}
#ifdef CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION
TEST_CASE("Static timer creation", "[freertos]")
{
StaticTimer_t static_timer;
TimerHandle_t created_timer;
volatile int count = 0;
created_timer = xTimerCreateStatic("oneshot", 100 / portTICK_PERIOD_MS,
pdTRUE,
(void *)&count,
timer_callback,
&static_timer);
TEST_ASSERT_NOT_NULL(created_timer);
}
#endif