Merge pull request #3 from agile6v/master

added INIT_SCHEDULE_ENTRY macro for simplifying code.
pull/5/head
YuQing 2015-09-05 22:21:35 +08:00
commit fbe55f1889
1 changed files with 8 additions and 0 deletions

View File

@ -46,6 +46,14 @@ typedef struct
bool *pcontinue_flag; bool *pcontinue_flag;
} ScheduleContext; } 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 #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif