Lines Matching refs:setup

370     struct tm *setup, now;  in alarm_setup()  local
372 setup = &alarm->wktime; in alarm_setup()
373 *setup = *wktime; in alarm_setup()
383 if ((setup->tm_sec > 59) || (setup->tm_sec < 0)) in alarm_setup()
384 setup->tm_sec = now.tm_sec; in alarm_setup()
385 if ((setup->tm_min > 59) || (setup->tm_min < 0)) in alarm_setup()
386 setup->tm_min = now.tm_min; in alarm_setup()
387 if ((setup->tm_hour > 23) || (setup->tm_hour < 0)) in alarm_setup()
388 setup->tm_hour = now.tm_hour; in alarm_setup()
445 if (setup->tm_year == RT_ALARM_TM_NOW) in alarm_setup()
446 setup->tm_year = now.tm_year; in alarm_setup()
447 if (setup->tm_mon == RT_ALARM_TM_NOW) in alarm_setup()
448 setup->tm_mon = now.tm_mon; in alarm_setup()
449 if (setup->tm_mday == RT_ALARM_TM_NOW) in alarm_setup()
450 setup->tm_mday = now.tm_mday; in alarm_setup()
452 if (!is_valid_date(setup)) in alarm_setup()
459 if ((setup->tm_wday < 0) || (setup->tm_wday > 6)) in alarm_setup()
460 setup->tm_wday = now.tm_wday; in alarm_setup()
466 if ((setup->tm_mday < 1) || (setup->tm_mday > 31)) in alarm_setup()
467 setup->tm_mday = now.tm_mday; in alarm_setup()
473 if ((setup->tm_mon < 0) || (setup->tm_mon > 11)) in alarm_setup()
474 setup->tm_mon = now.tm_mon; in alarm_setup()
476 if (setup->tm_mon == 1) in alarm_setup()
481 if ((setup->tm_mday < 1) || (setup->tm_mday > 29)) in alarm_setup()
482 setup->tm_mday = now.tm_mday; in alarm_setup()
484 else if (((setup->tm_mon <= 6) && (setup->tm_mon % 2 == 0)) || \ in alarm_setup()
485 ((setup->tm_mon > 6) && (setup->tm_mon % 2 == 1))) in alarm_setup()
490 if ((setup->tm_mday < 1) || (setup->tm_mday > 31)) in alarm_setup()
491 setup->tm_mday = now.tm_mday; in alarm_setup()
496 if ((setup->tm_mday < 1) || (setup->tm_mday > 30)) in alarm_setup()
497 setup->tm_mday = now.tm_mday; in alarm_setup()
507 if ((setup->tm_hour == 23) && (setup->tm_min == 59) && (setup->tm_sec == 59)) in alarm_setup()
513 setup->tm_sec = 60 - RT_ALARM_DELAY; in alarm_setup()
552 struct rt_alarm_setup *setup; in rt_alarm_control() local
555 setup = arg; in rt_alarm_control()
557 alarm->flag = setup->flag & 0xFF00; in rt_alarm_control()
558 alarm->wktime = setup->wktime; in rt_alarm_control()
711 rt_alarm_t rt_alarm_create(rt_alarm_callback_t callback, struct rt_alarm_setup *setup) in rt_alarm_create() argument
715 if (setup == RT_NULL) in rt_alarm_create()
724 alarm->wktime = setup->wktime; in rt_alarm_create()
725 alarm->flag = setup->flag & 0xFF00; in rt_alarm_create()