Fix style and warnings using timer0
This commit is contained in:
parent
228cc36f38
commit
0bafaa0473
|
@ -161,6 +161,9 @@ static inline systime_t st_lld_get_counter(void) {
|
||||||
#if NRF51_ST_USE_RTC1 == TRUE
|
#if NRF51_ST_USE_RTC1 == TRUE
|
||||||
return (systime_t)NRF_RTC1->COUNTER;
|
return (systime_t)NRF_RTC1->COUNTER;
|
||||||
#endif
|
#endif
|
||||||
|
#if NRF51_ST_USE_TIMER0 == TRUE
|
||||||
|
return (systime_t)0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -183,6 +186,9 @@ static inline void st_lld_start_alarm(systime_t abstime) {
|
||||||
NRF_RTC1->EVENTS_COMPARE[0] = 0;
|
NRF_RTC1->EVENTS_COMPARE[0] = 0;
|
||||||
NRF_RTC1->EVTENSET = RTC_EVTENSET_COMPARE0_Msk;
|
NRF_RTC1->EVTENSET = RTC_EVTENSET_COMPARE0_Msk;
|
||||||
#endif
|
#endif
|
||||||
|
#if NRF51_ST_USE_TIMER0 == TRUE
|
||||||
|
(void)abstime;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -215,6 +221,9 @@ static inline void st_lld_set_alarm(systime_t abstime) {
|
||||||
#if NRF51_ST_USE_RTC1 == TRUE
|
#if NRF51_ST_USE_RTC1 == TRUE
|
||||||
NRF_RTC1->CC[0] = abstime;
|
NRF_RTC1->CC[0] = abstime;
|
||||||
#endif
|
#endif
|
||||||
|
#if NRF51_ST_USE_TIMER0 == TRUE
|
||||||
|
(void)abstime;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -231,6 +240,9 @@ static inline systime_t st_lld_get_alarm(void) {
|
||||||
#if NRF51_ST_USE_RTC1 == TRUE
|
#if NRF51_ST_USE_RTC1 == TRUE
|
||||||
return (systime_t)NRF_RTC1->CC[0];
|
return (systime_t)NRF_RTC1->CC[0];
|
||||||
#endif
|
#endif
|
||||||
|
#if NRF51_ST_USE_TIMER0 == TRUE
|
||||||
|
return (systime_t)0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -249,6 +261,9 @@ static inline bool st_lld_is_alarm_active(void) {
|
||||||
#if NRF51_ST_USE_RTC1 == TRUE
|
#if NRF51_ST_USE_RTC1 == TRUE
|
||||||
return NRF_RTC1->EVTEN & RTC_EVTEN_COMPARE0_Msk;
|
return NRF_RTC1->EVTEN & RTC_EVTEN_COMPARE0_Msk;
|
||||||
#endif
|
#endif
|
||||||
|
#if NRF51_ST_USE_TIMER0 == TRUE
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _ST_LLD_H_ */
|
#endif /* _ST_LLD_H_ */
|
||||||
|
|
Loading…
Reference in New Issue