EasyGUI  Version v1.0
Software timers

Generic software timers. More...

Data Structures

struct  gui_timer_t
 Timer structure. More...
 

Macros

#define guii_timer_getparams(t)
 Get parameters from timer. More...
 

Typedefs

typedef gui_timer_tgui_timer_p
 Pointer to gui_timer_t.
 

Functions

gui_timer_tguii_timer_create (uint16_t period, void(*callback)(gui_timer_t *), void *const param)
 Create new software timer. More...
 
uint8_t guii_timer_remove (gui_timer_t **const t)
 Remove timer. More...
 
uint8_t guii_timer_start (gui_timer_t *const t)
 Start timer. More...
 
uint8_t guii_timer_startperiodic (gui_timer_t *const t)
 Start timer periodically. It will start again when callback is called. More...
 
uint8_t guii_timer_stop (gui_timer_t *const t)
 Stop timer. More...
 
uint8_t guii_timer_reset (gui_timer_t *const t)
 Reset timer to zero. More...
 
uint32_t guii_timer_getactivecount (void)
 Get number of currently active timers. More...
 
void guii_timer_process (void)
 Internal processing called by GUI library. More...
 

Detailed Description

Generic software timers.

Macro Definition Documentation

◆ guii_timer_getparams

#define guii_timer_getparams (   t)

Get parameters from timer.

Note
The function is private and can be called only when GUI protection against multiple access is activated
Parameters
[in]tTimer structure
Return values
Timerparameters

Function Documentation

◆ guii_timer_create()

gui_timer_t* guii_timer_create ( uint16_t  period,
void(*)(gui_timer_t *)  callback,
void *const  params 
)

Create new software timer.

Note
This function is private and may be called only when OS protection is active
Parameters
[in]periodTimer period in units of milliseconds
[in]callbackPointer to timer callback
[in]paramsPointer to user parameters used in callback
Returns
Timer handle on success, NULL otherwise

◆ guii_timer_getactivecount()

uint32_t guii_timer_getactivecount ( void  )

Get number of currently active timers.

Returns
Number of active timers

◆ guii_timer_process()

void guii_timer_process ( void  )

Internal processing called by GUI library.

Note
This function is private and may be called only when OS protection is active
Processes all timers in loop and calls callback function if needed

◆ guii_timer_remove()

uint8_t guii_timer_remove ( gui_timer_t **const  t)

Remove timer.

Note
This function is private and may be called only when OS protection is active
Parameters
[in]tPointer to pointer to gui_timer_t structure. After timer remove, pointer value where it points to will be changed
Returns
1 on success, 0 otherwise

◆ guii_timer_reset()

uint8_t guii_timer_reset ( gui_timer_t *const  t)

Reset timer to zero.

Note
This function is private and may be called only when OS protection is active
Parameters
[in]tPointer to gui_timer_t structure
Returns
1 on success, 0 otherwise

◆ guii_timer_start()

uint8_t guii_timer_start ( gui_timer_t *const  t)

Start timer.

Note
This function is private and may be called only when OS protection is active
Parameters
[in]tPointer to gui_timer_t structure
Returns
1 on success, 0 otherwise

◆ guii_timer_startperiodic()

uint8_t guii_timer_startperiodic ( gui_timer_t *const  t)

Start timer periodically. It will start again when callback is called.

Note
This function is private and may be called only when OS protection is active
Parameters
[in]tPointer to gui_timer_t structure
Returns
1 on success, 0 otherwise

◆ guii_timer_stop()

uint8_t guii_timer_stop ( gui_timer_t *const  t)

Stop timer.

Note
This function is private and may be called only when OS protection is active
Parameters
[in]tPointer to gui_timer_t structure
Returns
1 on success, 0 otherwise