mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
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:
parent
bd9b921713
commit
d8ed9be1d4
@ -1274,9 +1274,6 @@ typedef struct xSTATIC_TIMER
|
||||
UBaseType_t uxDummy7;
|
||||
#endif
|
||||
uint8_t ucDummy8;
|
||||
|
||||
portMUX_TYPE xDummy9;
|
||||
|
||||
} StaticTimer_t;
|
||||
|
||||
/*
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user