uTimerLib
https://github.com/Naguissa/uTimerLib
Public Member Functions | List of all members
uTimerLib Class Reference

Arduino tiny and cross-device compatible timer library. More...

Public Member Functions

 uTimerLib ()
 Constructor.
 
void setInterval_us (void(*)(), unsigned long int)
 Attaches a callback function to be executed each us microseconds. More...
 
void setInterval_s (void(*)(), unsigned long int)
 Attaches a callback function to be executed each s seconds. More...
 
void setTimeout_us (void(*)(), unsigned long int)
 Attaches a callback function to be executed once when us microseconds have passed. More...
 
void setTimeout_s (void(*)(), unsigned long int)
 Attaches a callback function to be executed once when s seconds have passed. More...
 
void clearTimer ()
 Loads last bit of time needed to precisely count until desired time (non complete loop) More...
 
void _interrupt ()
 Internal intermediate function to control timer interrupts. More...
 

Detailed Description

Arduino tiny and cross-device compatible timer library.

Timers used by each microcontroller:

You have public TimerLib variable with following methods:

Member Function Documentation

◆ _interrupt()

void uTimerLib::_interrupt ( )

Internal intermediate function to control timer interrupts.

As timers doesn't give us enougth flexibility for large timings, this function implements oferflow control to offer user desired timings.

◆ clearTimer()

void uTimerLib::clearTimer ( )

Loads last bit of time needed to precisely count until desired time (non complete loop)

Note: This is device-dependant

◆ setInterval_s()

void uTimerLib::setInterval_s ( void(*)()  cb,
unsigned long int  s 
)

Attaches a callback function to be executed each s seconds.

Parameters
cbCallback function to be called
sInterval in seconds

◆ setInterval_us()

void uTimerLib::setInterval_us ( void(*)()  cb,
unsigned long int  us 
)

Attaches a callback function to be executed each us microseconds.

Parameters
cbCallback function to be called
usInterval in microseconds

◆ setTimeout_s()

void uTimerLib::setTimeout_s ( void(*)()  cb,
unsigned long int  s 
)

Attaches a callback function to be executed once when s seconds have passed.

Parameters
cbCallback function to be called
sTimeout in seconds

◆ setTimeout_us()

void uTimerLib::setTimeout_us ( void(*)()  cb,
unsigned long int  us 
)

Attaches a callback function to be executed once when us microseconds have passed.

Parameters
cbCallback function to be called
usTimeout in microseconds

The documentation for this class was generated from the following files: