Fix mstimer elapsed time (#58)

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2020-03-17 17:27:25 -05:00
committed by GitHub
parent 1b9c1ad3b3
commit f18612f1ec
9 changed files with 29 additions and 10 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ void lse_init(
while (1) {
if (LSE_Delay < LSE_FAIL_FLAG) {
mstimer_set(&Delay_Timer, 0);
while (mstimer_remaining(&Delay_Timer) < 500) {
while (mstimer_elapsed(&Delay_Timer) < 500) {
/* do nothing */
}
/* check whether LSE is ready, with 4 seconds timeout */
+2 -2
View File
@@ -72,7 +72,7 @@ void rs485_silence_reset(
bool rs485_silence_elapsed(
uint32_t interval)
{
return (mstimer_remaining(&Silence_Timer) > interval);
return (mstimer_elapsed(&Silence_Timer) > interval);
}
/*************************************************************************
@@ -101,7 +101,7 @@ static uint16_t rs485_turnaround_time(
bool rs485_turnaround_elapsed(
void)
{
return (mstimer_remaining(&Silence_Timer) > rs485_turnaround_time());
return (mstimer_elapsed(&Silence_Timer) > rs485_turnaround_time());
}