added INIT_SCHEDULE_ENTRY macro

pull/3/head
agile6v 2014-12-10 12:47:38 +08:00
parent 0a87130ee0
commit a7b22f41f6
1 changed files with 8 additions and 0 deletions

View File

@ -46,6 +46,14 @@ typedef struct
bool *pcontinue_flag;
} ScheduleContext;
#define INIT_SCHEDULE_ENTRY(schedule_entry, a, b, c, d, e, f)\
(schedule_entry).id = a;\
(schedule_entry).time_base.hour = b;\
(schedule_entry).time_base.minute = c;\
(schedule_entry).interval = d;\
(schedule_entry).task_func = e;\
(schedule_entry).func_args = f
#ifdef __cplusplus
extern "C" {
#endif