RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
dev_alarm.h 文件参考
#include <sys/time.h>
#include <rtdef.h>
+ dev_alarm.h 的引用(Include)关系图:

浏览该文件的源代码.

结构体

struct  rt_alarm
 
struct  rt_alarm_setup
 
struct  rt_alarm_container
 

宏定义

#define RT_ALARM_TM_NOW
 
#define RT_ALARM_ONESHOT   0x000 /* only alarm once */
 
#define RT_ALARM_DAILY   0x100 /* alarm everyday */
 
#define RT_ALARM_WEEKLY   0x200 /* alarm weekly at Monday or Friday etc. */
 
#define RT_ALARM_MONTHLY   0x400 /* alarm monthly at someday */
 
#define RT_ALARM_YAERLY   0x800 /* alarm yearly at a certain date */
 
#define RT_ALARM_HOUR   0x1000 /* alarm each hour at a certain min:second */
 
#define RT_ALARM_MINUTE   0x2000 /* alarm each minute at a certain second */
 
#define RT_ALARM_SECOND   0x4000 /* alarm each second */
 
#define RT_ALARM_STATE_INITED   0x02
 
#define RT_ALARM_STATE_START   0x01
 
#define RT_ALARM_STATE_STOP   0x00
 
#define RT_ALARM_CTRL_MODIFY   1 /* modify alarm time or alarm flag */
 

类型定义

typedef struct rt_alarmrt_alarm_t
 
typedef void(* rt_alarm_callback_t) (rt_alarm_t alarm, time_t timestamp)
 

函数

rt_alarm_t rt_alarm_create (rt_alarm_callback_t callback, struct rt_alarm_setup *setup)
 
rt_err_t rt_alarm_control (rt_alarm_t alarm, int cmd, void *arg)
 
void rt_alarm_update (rt_device_t dev, rt_uint32_t event)
 
rt_err_t rt_alarm_delete (rt_alarm_t alarm)
 
rt_err_t rt_alarm_start (rt_alarm_t alarm)
 
rt_err_t rt_alarm_stop (rt_alarm_t alarm)
 
int rt_alarm_system_init (void)
 

宏定义说明

◆ RT_ALARM_TM_NOW

#define RT_ALARM_TM_NOW
值:
-1 /* set the alarm tm_day,tm_mon,tm_sec,etc.
to now.we also call it "don't care" value */

在文件 dev_alarm.h19 行定义.

◆ RT_ALARM_ONESHOT

#define RT_ALARM_ONESHOT   0x000 /* only alarm once */

在文件 dev_alarm.h22 行定义.

◆ RT_ALARM_DAILY

#define RT_ALARM_DAILY   0x100 /* alarm everyday */

在文件 dev_alarm.h23 行定义.

◆ RT_ALARM_WEEKLY

#define RT_ALARM_WEEKLY   0x200 /* alarm weekly at Monday or Friday etc. */

在文件 dev_alarm.h24 行定义.

◆ RT_ALARM_MONTHLY

#define RT_ALARM_MONTHLY   0x400 /* alarm monthly at someday */

在文件 dev_alarm.h25 行定义.

◆ RT_ALARM_YAERLY

#define RT_ALARM_YAERLY   0x800 /* alarm yearly at a certain date */

在文件 dev_alarm.h26 行定义.

◆ RT_ALARM_HOUR

#define RT_ALARM_HOUR   0x1000 /* alarm each hour at a certain min:second */

在文件 dev_alarm.h27 行定义.

◆ RT_ALARM_MINUTE

#define RT_ALARM_MINUTE   0x2000 /* alarm each minute at a certain second */

在文件 dev_alarm.h28 行定义.

◆ RT_ALARM_SECOND

#define RT_ALARM_SECOND   0x4000 /* alarm each second */

在文件 dev_alarm.h29 行定义.

◆ RT_ALARM_STATE_INITED

#define RT_ALARM_STATE_INITED   0x02

在文件 dev_alarm.h31 行定义.

◆ RT_ALARM_STATE_START

#define RT_ALARM_STATE_START   0x01

在文件 dev_alarm.h32 行定义.

◆ RT_ALARM_STATE_STOP

#define RT_ALARM_STATE_STOP   0x00

在文件 dev_alarm.h33 行定义.

◆ RT_ALARM_CTRL_MODIFY

#define RT_ALARM_CTRL_MODIFY   1 /* modify alarm time or alarm flag */

在文件 dev_alarm.h36 行定义.

类型定义说明

◆ rt_alarm_t

typedef struct rt_alarm* rt_alarm_t

在文件 dev_alarm.h38 行定义.

◆ rt_alarm_callback_t

typedef void(* rt_alarm_callback_t) (rt_alarm_t alarm, time_t timestamp)

在文件 dev_alarm.h39 行定义.

函数说明

◆ rt_alarm_create()

rt_alarm_t rt_alarm_create ( rt_alarm_callback_t callback,
struct rt_alarm_setup * setup )

◆ rt_alarm_control()

rt_err_t rt_alarm_control ( rt_alarm_t alarm,
int cmd,
void * arg )

◆ rt_alarm_update()

void rt_alarm_update ( rt_device_t dev,
rt_uint32_t event )

◆ rt_alarm_delete()

rt_err_t rt_alarm_delete ( rt_alarm_t alarm)

◆ rt_alarm_start()

rt_err_t rt_alarm_start ( rt_alarm_t alarm)

◆ rt_alarm_stop()

rt_err_t rt_alarm_stop ( rt_alarm_t alarm)

◆ rt_alarm_system_init()

int rt_alarm_system_init ( void )