PreviousNext
startDelay
Help > OS functions > Timing > startDelay

Function

 

Preset and start the Delay timer.

Purpose

 

Initialization of time measurement or delay generation. Non-blocking alternative to waitDelay.

Syntax

 

void startDelay(uns8 ticks)

Parameters

 

ticks: number of ticks (10 ms system intervals) to be measured (1-255)

Return value

 

  –

Output values

 

  –

Preconditions

 

This function can be combined with waitMS.

Remarks

 

The Delay timer measures the specified time on the OS background. Expiration can be checked by the isDelay function.

Side effects

 

     This function does not work properly if the waitDelay function is active.

     Functionality is affected by bondRequestAdvanced, RFRXpacket, and RFTXpacket.

     Internal ticks are based on the internal RC oscillator if RF IC is sleeping. Thus, the delay can vary with temperature, etc. in this case. See MCU datasheet.

See also

 

isDelay, startLongDelay, waitDelay

Example

 

See  isDelay