The timer module allows the use of timers within the MHEG5/DSMCC component. These timers are set by other parts of the component and call a callback function when they are triggered. The timer component offers two timer functions: The first is HBBTV_TmrCreate which creates a new timer with a specified timeout, callback, and caller reference and returns a handle. Once the timer expires the callback is called, passing the caller reference and timer handle, with the trigger flag set to TRUE. The callback may be called before the HBBTV_TmrCreate function completes. The second is HBBTV_TmrDestroy which destroys a running or expired timer. If the timer has not triggered HBBTV_TmrDestroy calls the callback with the trigger flag set to FALSE, to allow any client resources associated with this timer to be freed. It is guaranteed that the callback will not be called for this timer once the HBBTV_TmrDestroy function returns. Note: The callback must be reentrant and can be called from either the clients task or a timer component task.
More...
#include <stdlib.h>
#include "dbgfuncs.h"
#include "techtype.h"
#include "hbbtv_sif_os.h"
#include "debug.h"
#include "timer.h"
#include "hbbtv.h"
|
#define | TMR_MAGIC_FLAG 0xc10c0000 |
|
#define | TMR_MAX_WAIT 60000 |
|
#define | TMR_ACCURACY 5 |
|
#define | SIZEOF_TIMER_EVENT_MSG 1 |
|
#define | MAX_NUM_TIMER_EVENT_MSG 100 |
|
|
E_HBBTV_ERR | HBBTV_TmrCreate (U32BIT millisecs, F_TMR_CALLBACK callback, void *caller_ref, TMR_HANDLE *p_timer_handle) |
|
E_HBBTV_ERR | HBBTV_TmrDestroy (TMR_HANDLE timerHandle) |
|
E_HBBTV_ERR | HBBTV_TmrInit (U32BIT task_priority) |
|
E_HBBTV_ERR | HBBTV_TmrExit (void) |
|
The timer module allows the use of timers within the MHEG5/DSMCC component. These timers are set by other parts of the component and call a callback function when they are triggered. The timer component offers two timer functions: The first is HBBTV_TmrCreate which creates a new timer with a specified timeout, callback, and caller reference and returns a handle. Once the timer expires the callback is called, passing the caller reference and timer handle, with the trigger flag set to TRUE. The callback may be called before the HBBTV_TmrCreate function completes. The second is HBBTV_TmrDestroy which destroys a running or expired timer. If the timer has not triggered HBBTV_TmrDestroy calls the callback with the trigger flag set to FALSE, to allow any client resources associated with this timer to be freed. It is guaranteed that the callback will not be called for this timer once the HBBTV_TmrDestroy function returns. Note: The callback must be reentrant and can be called from either the clients task or a timer component task.
- Date
- 01/01/2013
- Author
- Adam Sturtridge