WE310F5  39.00.000
m2mb_os_tmr.h File Reference

OS timer prototypes. More...

Go to the source code of this file.

Data Structures

struct  M2MB_OS_TMR_EVENT_INFO
 Timer event information structure. More...
 
struct  M2MB_OS_TMR_CB_INFO
 Timer callback information structure. More...
 
struct  M2MB_OS_TMR_NOTIFY_INFO
 Timer notify information structure. More...
 
#define M2MB_OS_TMR_INVALID   0
 
#define M2MB_OS_TMR_INVALID_ATTR   0
 
#define M2MB_OS_TMR_ONESHOT   0x01
 
#define M2MB_OS_TMR_PERIODIC_TMR   0x02
 
#define M2MB_OS_TMR_NO_AUTO_START   0x04
 
#define M2MB_OS_TMR_AUTO_START   0x08
 
#define M2MB_OS_TMR_OBJ_SIZE_BYTES   128
 
enum  M2MB_OS_TIME_UNIT_T {
  M2MB_OS_TIME_TICK,
  M2MB_OS_TIME_MSEC,
  M2MB_OS_TIME_NONE = 0x7FFFFFF
}
 Timer unit enumeration. More...
 
enum  M2MB_OS_TMR_SEL_CMD_E {
  M2MB_OS_TMR_SEL_CMD_CREATE_ATTR,
  M2MB_OS_TMR_SEL_CMD_DEL_ATTR,
  M2MB_OS_TMR_SEL_CMD_NAME,
  M2MB_OS_TMR_SEL_CMD_USRNAME,
  M2MB_OS_TMR_SEL_CMD_CB_FUNC,
  M2MB_OS_TMR_SEL_CMD_ARG_CB,
  M2MB_OS_TMR_SEL_CMD_TICKS_PERIOD,
  M2MB_OS_TMR_SEL_CMD_TICKS2ELAPSE,
  M2MB_OS_TMR_SEL_CMD_PERIODIC,
  M2MB_OS_TMR_SEL_CMD_DURATION,
  M2MB_OS_TMR_SEL_CMD_RELOAD,
  M2MB_OS_TMR_SEL_CMD_AUTOSTART,
  M2MB_OS_TMR_SEL_CMD_STATE,
  M2MB_OS_TMR_SEL_CMD_OPTION,
  M2MB_OS_TMR_SEL_CMD_EVENT_HANDLE,
  M2MB_OS_TMR_SEL_CMD_EVENT_MASK,
  M2MB_OS_TMR_SEL_CMD_END
}
 Timer attribute enumeration. More...
 
typedef UINT32 M2MB_OS_TIME_T
 OS Time type declaration. More...
 
typedef HANDLE M2MB_OS_TMR_HANDLE
 OS timer handle declaration. More...
 
typedef HANDLE M2MB_OS_TMR_ATTR_HANDLE
 OS timer attribute handle declaration. More...
 
typedef struct M2MB_OS_TMR_EVENT_INFO M2MB_OS_TMR_EVENT_INFO_T
 Timer event information structure. More...
 
typedef VOID(* M2MB_OS_TMR_CB_T) (VOID *)
 OS timer callback declaration. More...
 
typedef void(* USR_TMR_CB) (M2MB_OS_TMR_HANDLE handle, void *arg)
 
typedef struct M2MB_OS_TMR_CB_INFO M2MB_OS_TMR_CB_INFO_T
 Timer callback information structure. More...
 
typedef struct M2MB_OS_TMR_NOTIFY_INFO M2MB_OS_TMR_NOTIFY_INFO_T
 Timer notify information structure. More...
 
M2MB_OS_RESULT_E m2mb_os_tmr_init (M2MB_OS_TMR_HANDLE *pTmrHandle, M2MB_OS_TMR_ATTR_HANDLE *pTmrAttr)
 Application timer Creation. More...
 
M2MB_OS_RESULT_E m2mb_os_tmr_deinit (M2MB_OS_TMR_HANDLE tmrHandle)
 Timer deinit => deletion. More...
 
M2MB_OS_RESULT_E m2mb_os_tmr_start (M2MB_OS_TMR_HANDLE tmrHandle)
 Start application timer. More...
 
M2MB_OS_RESULT_E m2mb_os_tmr_change (M2MB_OS_TMR_HANDLE tmrHandle, UINT32 initial_ticks, UINT32 reschedule_ticks)
 Change application timer. More...
 
M2MB_OS_RESULT_E m2mb_os_tmr_stop (M2MB_OS_TMR_HANDLE tmrHandle)
 Stop an application timer. More...
 
M2MB_OS_RESULT_E m2mb_os_tmr_setAttrItem (M2MB_OS_TMR_ATTR_HANDLE *pTmrAttrHandle, UINT8 nCmds,...)
 Set specific attribute for timer creation. More...
 
M2MB_OS_RESULT_E m2mb_os_tmr_getItem (M2MB_OS_TMR_HANDLE tmrHandle, M2MB_OS_TMR_SEL_CMD_E selCmd, MEM_W *pOut, VOID *pIn)
 Get specific properties of the timer. More...
 
M2MB_OS_RESULT_E m2mb_os_tmr_setItem (M2MB_OS_TMR_HANDLE tmrHandle, M2MB_OS_TMR_SEL_CMD_E selCmd, VOID *pIn)
 Set specific properties of the timer. More...
 
M2MB_OS_TIME_T m2mb_os_tmr_convert_time_to_ticks (M2MB_OS_TIME_T time, M2MB_OS_TIME_UNIT_T unit_of_time)
 Convertion time to ticks. More...
 
M2MB_OS_TIME_T m2mb_os_tmr_convert_ticks_to_time (M2MB_OS_TIME_T ticks, M2MB_OS_TIME_UNIT_T time_unit)
 Convertion ticks to time. More...
 
M2MB_OS_TIME_T m2mb_os_tmr_get_ticks (VOID)
 Gets the current timer ticks. More...
 

Detailed Description

OS timer prototypes.

we866e4/epl/inc/rtos/m2mb_os_tmr.h

Basic functions for OS timer are provided

Note
Dependencies:
"#include m2mb_types.h"
"#include m2mb_os_types.h"
Author
Sandeep Itha
Date
03/03/2017

Definition in file m2mb_os_tmr.h.