pull/11476/head
int_szyk 2019-09-02 10:05:22 +02:00 committed by adbridge
parent aeb15e9cce
commit c423602161
1 changed files with 19 additions and 20 deletions

View File

@ -301,8 +301,7 @@ void lp_ticker_set_interrupt(timestamp_t timestamp)
/* If this target timestamp is close to the roll over of the ticker counter
* and current tick is also close to the roll over, then we are in danger zone.*/
if(((0xFFFF - LP_TIMER_SAFE_GUARD < timestamp) || (timestamp < LP_TIMER_SAFE_GUARD)) && (0xFFFA < last_read_counter))
{
if (((0xFFFF - LP_TIMER_SAFE_GUARD < timestamp) || (timestamp < LP_TIMER_SAFE_GUARD)) && (0xFFFA < last_read_counter)) {
roll_over_flag = true;
/* Change the lp_delayed_counter buffer in that way so the value of (0xFFFF - LP_TIMER_SAFE_GUARD) is equal to 0.
* By doing this it is easy to check if the value of timestamp get outdated by delaying its programming