Appiko
Functions
Timer Private Functions

Functions

void S2LPTimerComputeWakeupTimerValues (uint32_t *plWakeUpUsec, uint8_t cCounter, uint8_t cPrescaler, uint8_t cMulti)
 Computes the wake up timer. More...
 
void S2LPTimerComputeWakeupTimerRegValues (uint32_t lDesiredUsec, uint8_t *pcCounter, uint8_t *pcPrescaler, uint8_t *pcMulti)
 Computes the values of the wakeup timer counter and prescaler from the user time expressed in millisecond. The prescaler and the counter values are computed maintaining the prescaler value as small as possible in order to obtain the best resolution, and in the meantime minimizing the error. More...
 
void S2LPTimerComputeRxTimerRegValues (uint32_t lDesiredUsec, uint8_t *pcCounter, uint8_t *pcPrescaler)
 Computes the values of the rx_timeout timer counter and prescaler from the user time expressed in millisecond. The prescaler and the counter values are computed maintaining the prescaler value as small as possible in order to obtain the best resolution, and in the meantime minimizing the error. More...
 
void S2LPTimerComputeRxTimerValues (uint32_t *pulDesiredUsec, uint8_t cCounter, uint8_t cPrescaler)
 Computes the values of the rx_timeout given the timer counter and prescaler. More...
 

Detailed Description

Function Documentation

◆ S2LPTimerComputeRxTimerRegValues()

void S2LPTimerComputeRxTimerRegValues ( uint32_t  lDesiredUsec,
uint8_t *  pcCounter,
uint8_t *  pcPrescaler 
)
Parameters
lDesiredUsecdesired rx_timeout in microsecs. This parameter must be a float. Since the counter and prescaler are 8 bit registers the maximum reachable value is maxTime = fTclk x 255 x 255.
pcCounterpointer to the variable in which the value for the rx_timeout counter has to be stored. This parameter must be a uint8_t*.
pcPrescalerpointer to the variable in which the value for the rx_timeout prescaler has to be stored. This parameter must be an uint8_t*.
Return values
None

Definition at line 206 of file S2LP_Timer.c.

References DIG_DOMAIN_XTAL_THRESH, and S2LPRadioGetXtalFrequency().

Referenced by S2LPTimerSetRxTimerUs().

◆ S2LPTimerComputeRxTimerValues()

void S2LPTimerComputeRxTimerValues ( uint32_t *  pulDesiredUsec,
uint8_t  cCounter,
uint8_t  cPrescaler 
)
Parameters
pulDesiredUsecpointer to rx_timeout in microsecs. Since the counter and prescaler are 8 bit registers the maximum reachable value is maxTime = fTclk x 255 x 255.
cCountercounter for the rx_timeout. This parameter must be a uint8_t.
cPrescalerprescaler for the rx_timeout. This parameter must be an uint8_t.
Return values
None

Definition at line 259 of file S2LP_Timer.c.

References DIG_DOMAIN_XTAL_THRESH, and S2LPRadioGetXtalFrequency().

◆ S2LPTimerComputeWakeupTimerRegValues()

void S2LPTimerComputeWakeupTimerRegValues ( uint32_t  lDesiredUsec,
uint8_t *  pcCounter,
uint8_t *  pcPrescaler,
uint8_t *  pcMulti 
)
Parameters
lDesiredUsecdesired wakeup timeout in microseconds. Since the counter and prescaler are 8 bit registers the maximum reachable value is maxTime = fTclk x 256 x 256.
pcCounterpointer to the variable in which the value for the wakeup timer counter has to be stored. This parameter must be a uint8_t*.
pcPrescalerpointer to the variable in which the value for the wakeup timer prescaler has to be stored. This parameter must be an uint8_t*.
Return values
None

Definition at line 146 of file S2LP_Timer.c.

Referenced by S2LPTimerSetWakeUpTimerReloadUs(), and S2LPTimerSetWakeUpTimerUs().

◆ S2LPTimerComputeWakeupTimerValues()

void S2LPTimerComputeWakeupTimerValues ( uint32_t *  plWakeUpUsec,
uint8_t  cCounter,
uint8_t  cPrescaler,
uint8_t  cMulti 
)
Parameters
plWakeUpUsecpointer to the variable where the wakeup timer (in microseconds) should be stored.
cCounterCounter
cPrescalerPrescaler.
cMultiMultiplier.
Return values
None.

Definition at line 128 of file S2LP_Timer.c.