48 #ifndef __S2LP1_TIMER_H 49 #define __S2LP1_TIMER_H 121 #define SET_INFINITE_RX_TIMEOUT() S2LPTimerSetRxTimerCounter(0)
void S2LPTimerGetWakeUpTimerReloadUs(uint32_t *plWakeUpReloadUsec, uint8_t *pcCounter, uint8_t *pcPrescaler, uint8_t *pcMulti)
Return the LDCR wake up reload timer, according to the formula: Twu=(PRESCALER +1)*(COUNTER+1)*Tck,...
void S2LPTimerSetRxTimer(uint8_t cCounter, uint8_t cPrescaler)
Set the RX timeout timer initialization registers with the values of COUNTER and PRESCALER according ...
void S2LPTimerSetWakeUpTimerReloadUs(uint32_t lDesiredUsec)
Set the LDCR wake up reload timer counter and prescaler from the desired value in ms,...
SFunctionalState
S2LP Functional state. Used to enable or disable a specific option.
void S2LPTimerSetWakeUpTimerCounter(uint8_t cCounter)
Set the LDCR wake up timer counter. Remember that this value is incresead by one in the Twu calculati...
void S2LPTimerSleepB(SFunctionalState en)
Enable the SLEEP_B mode. SLEEP_A and SLEEP_B are mutually exclusive.
void S2LpTimerFastRxTermTimer(SFunctionalState xNewState)
Enables the Fast RX termination timer.
void S2LPTimerSetWakeUpTimer(uint8_t cCounter, uint8_t cPrescaler)
Set the LDCR wake up timer initialization registers with the values of COUNTER and PRESCALER accordin...
void S2LPTimerLdcrMode(SFunctionalState xNewState)
Enables or Disables the LDCR mode.
This file contains all the registers address and masks.
void S2LPTimerSetWakeUpTimerPrescaler(uint8_t cPrescaler)
Set the LDCR wake up timer prescaler. Remember that this value is incresead by one in the Twu calcula...
void S2LPTimerSetWakeUpTimerReloadCounter(uint8_t cCounter)
Set the LDCR wake up timer reload counter. Remember that this value is incresead by one in the Twu ca...
uint16_t S2LPTimerGetRcoFrequency(void)
Computes and Return the RCO frequency. This frequency depends on the xtal frequency and the XTAL bit ...
void S2LPTimerGetRxTimerUs(uint32_t *plTimeoutUsec, uint8_t *pcCounter, uint8_t *pcPrescaler)
Return the RX timeout timer.
void S2LPTimerSetRxTimerCounter(uint8_t cCounter)
Set the RX timeout timer counter. If it is equal to 0 the timeout is infinite.
void S2LpSetTimerFastRxTermTimerUs(uint32_t fast_rx_us)
Set the Fast RX termination timer word starting from a us value. The timer counter is clocked at freq...
void S2LPTimerSetWakeUpTimerReload(uint8_t cCounter, uint8_t cPrescaler, uint8_t cMulti)
Set the LDCR wake up timer reloading registers with the values of COUNTER and PRESCALER according to ...
void S2LPTimerLdcrAutoReload(SFunctionalState xNewState)
Enables or Disables the LDCR timer reloading with the value stored in the LDCR_RELOAD registers.
void S2LPTimerCalibrationRco(SFunctionalState xCalibration)
Enables the RCO autocalibration when the device make the transition READY -> SLEEP.
RxTimeoutStopCondition
All the possible RX timeout stop conditions enumeration.
void S2LPTimerGetWakeUpTimerUs(uint32_t *plWakeUpUsec, uint8_t *pcCounter, uint8_t *pcPrescaler, uint8_t *pcMulti)
Return the LDCR wake up timer, according to the formula: Twu=(PRESCALER +1)*(COUNTER+1)*Tck,...
void S2LPTimerSetRxTimerStopCondition(RxTimeoutStopCondition xStopCondition)
Set the RX timeout stop conditions.
void S2LpSetTimerFastRxTermTimer(uint8_t fast_rx_word)
Set the Fast RX termination timer word. When the timer counter will reach this word,...
SFunctionalState S2LPTimerLdcrGetAutoReload(void)
Return the LDCR timer reload bit.
void S2LPTimerSetRxTimerPrescaler(uint8_t cPrescaler)
Set the RX timeout timer prescaler. If it is equal to 0 the timeout is infinite.
void S2LPTimerSetWakeUpTimerUs(uint32_t lDesiredUsec)
Set the LDCR wake up timer counter and prescaler from the desired value in ms, according to the formu...
Header file for S2-LP types.
void S2LPTimerSetWakeUpTimerReloadPrescaler(uint8_t cPrescaler)
Set the LDCR wake up timer reload prescaler. Remember that this value is incresead by one in the Twu ...
void S2LPTimerSetRxTimerUs(uint32_t lDesiredUsec)
Set the RX timeout timer counter and prescaler from the desired value in ms. it is possible to fix th...