EasyGUI  v0.1
Platform independent GUI Library
Software timers

Generic software timers. More...

Data Structures

struct  GUI_TIMER_t
 Timer structure. More...
 

Macros

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

Typedefs

typedef GUI_TIMER_tGUI_TIMER_p
 Pointer to GUI_TIMER_t.
 

Functions

GUI_TIMER_tgui_timer_create__ (uint16_t period, void(*callback)(GUI_TIMER_t *), void *param)
 Create new software timer. More...
 
uint8_t gui_timer_remove__ (GUI_TIMER_t **t)
 Remove timer. More...
 
uint8_t gui_timer_start__ (GUI_TIMER_t *t)
 Start timer. More...
 
uint8_t gui_timer_startperiodic__ (GUI_TIMER_t *t)
 Start timer periodically. It will start again when callback is called. More...
 
uint8_t gui_timer_stop__ (GUI_TIMER_t *t)
 Stop timer. More...
 
uint8_t gui_timer_reset__ (GUI_TIMER_t *t)
 Reset timer to zero. More...
 
uint32_t gui_timer_getactivecount (void)
 Get number of currently active timers. More...
 
void gui_timer_process (void)
 Internal processing called by GUI library. More...
 

Detailed Description

Generic software timers.

Macro Definition Documentation

#define gui_timer_getparams__ (   t)

Get parameters from timer.

Note
Since this function is private, it can only be used by user inside GUI library
Parameters
[in]tTimer structure
Return values
Timerparameters

Function Documentation

GUI_TIMER_t* gui_timer_create__ ( uint16_t  period,
void(*)(GUI_TIMER_t *)  callback,
void *  params 
)

Create new software timer.

Note
Since this function is private, it can only be used by user inside GUI library
Parameters
[in]periodTimer period in units of milliseconds
[in]*callbackPointer to timer callback
[in]*paramsPointer to user parameters used in callback
Return values
>0: Timer created
0Timer creation failed
uint32_t gui_timer_getactivecount ( void  )

Get number of currently active timers.

Returns
Number of active timers
void gui_timer_process ( void  )

Internal processing called by GUI library.

Note
Since this function is private, it can only be used by user inside GUI library
Processes all timers in loop and calls callback function if needed
Return values
None
uint8_t gui_timer_remove__ ( GUI_TIMER_t **  t)

Remove timer.

Note
Since this function is private, it can only be used by user inside GUI library
Parameters
[in]**tPointer to pointer to GUI_TIMER_t structure. After timer remove, pointer value where it points to will be changed
Return values
1Timer was removed ok
0Timer was not removed
uint8_t gui_timer_reset__ ( GUI_TIMER_t t)

Reset timer to zero.

Note
Since this function is private, it can only be used by user inside GUI library
Parameters
[in]*tPointer to GUI_TIMER_t structure
Return values
1Timer was reseted ok
0Timer was not reseted
uint8_t gui_timer_start__ ( GUI_TIMER_t t)

Start timer.

Note
Since this function is private, it can only be used by user inside GUI library
Parameters
[in]*tPointer to GUI_TIMER_t structure
Return values
1Timer was started ok
0Timer was not started
uint8_t gui_timer_startperiodic__ ( GUI_TIMER_t t)

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

Note
Since this function is private, it can only be used by user inside GUI library
Parameters
[in]*tPointer to GUI_TIMER_t structure
Return values
1Timer was started ok
0Timer was not started
uint8_t gui_timer_stop__ ( GUI_TIMER_t t)

Stop timer.

Note
Since this function is private, it can only be used by user inside GUI library
Parameters
[in]*tPointer to GUI_TIMER_t structure
Return values
1Timer was stopped ok
0Timer was not stopped