kopia lustrzana https://github.com/espressif/esp-idf
freertos/timer: fix the static timer creation
Removes the not used spinlock field inside timer object which was causing assertion failpull/5913/merge
rodzic
bd9b921713
commit
d8ed9be1d4
|
@ -1274,9 +1274,6 @@ typedef struct xSTATIC_TIMER
|
||||||
UBaseType_t uxDummy7;
|
UBaseType_t uxDummy7;
|
||||||
#endif
|
#endif
|
||||||
uint8_t ucDummy8;
|
uint8_t ucDummy8;
|
||||||
|
|
||||||
portMUX_TYPE xDummy9;
|
|
||||||
|
|
||||||
} StaticTimer_t;
|
} StaticTimer_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -68,3 +68,20 @@ TEST_CASE("Recurring FreeRTOS timers", "[freertos]")
|
||||||
|
|
||||||
TEST_ASSERT( xTimerDelete(recurring, 1) );
|
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
|
Ładowanie…
Reference in New Issue