File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ enum Constants{
30
30
31
31
#if YOTTA_CFG_MINAR_TEST_CLOCK_OVERFLOW
32
32
// use only lower 16bits of timer for testing timer overflow
33
- Time_Mask = YOTTA_CFG_MINAR_TEST_CLOCK_OVERFLOW
33
+ Time_Mask = YOTTA_CFG_MINAR_TEST_CLOCK_OVERFLOW
34
34
#else
35
35
// 32 bits of time for mbed platforms
36
36
Time_Mask = 0xFFFFFFFFu
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ uint32_t getTimeOverflows(){
68
68
void sleepFromUntil (tick_t now, tick_t until){
69
69
70
70
#if YOTTA_CFG_MINAR_TEST_CLOCK_OVERFLOW
71
+ /* only lower bits of the timer is passed to this function
72
+ * in order to set the correct sleeping time in the underlying timer,
73
+ * the full time (with the top bits) have to be reconstructed here.*/
71
74
tick_t timer_top_bits = lp_ticker_read () & ~Time_Mask;
72
75
now += timer_top_bits;
73
76
until += timer_top_bits;
You can’t perform that action at this time.
0 commit comments