Skip to content

Commit e9a41ca

Browse files
author
Liyou Zhou
committed
Add comment, fix indentation
1 parent 66180ba commit e9a41ca

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

minar-platform/minar_platform_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ enum Constants{
3030

3131
#if YOTTA_CFG_MINAR_TEST_CLOCK_OVERFLOW
3232
// 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
3434
#else
3535
// 32 bits of time for mbed platforms
3636
Time_Mask = 0xFFFFFFFFu

source/mbed_platform.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ uint32_t getTimeOverflows(){
6868
void sleepFromUntil(tick_t now, tick_t until){
6969

7070
#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.*/
7174
tick_t timer_top_bits = lp_ticker_read() & ~Time_Mask;
7275
now += timer_top_bits;
7376
until += timer_top_bits;

0 commit comments

Comments
 (0)