// ************************************************************************************************* // @fn set_eggtimer_to_defaults // @brief Clears eggtimer counter; DOES NOT set state to EGGTIMER_STOP! (This way, this // function can be called without stopping the alarm.) // @param none // @return none // ************************************************************************************************* void set_eggtimer_to_defaults(void) { // Reset eggtimer counts to default (aka last used) values sEggtimer.hours = sEggtimer.default_hours; sEggtimer.minutes = sEggtimer.default_minutes; sEggtimer.seconds = sEggtimer.default_seconds; if (eggtimer_visible()) { display.flag.line2_full_update = 1; // gibbons: this is hardcoded to line 2; change? } }
// ************************************************************************************************* // @fn stop_eggtimer_alarm // @brief Puts eggtimer in STOP mode, halts alarm mode and buzzing if active, updates eggtimer // symbol. Safe to call, even if eggtimer menu not active. // @param none // @return none // ************************************************************************************************* void stop_eggtimer_alarm(void) { sEggtimer.state = EGGTIMER_STOP; sEggtimer.duration = EGGTIMER_ALARM_DURATION; if (eggtimer_visible()) { display_symbol(LCD_ICON_RECORD, SEG_ON_BLINK_OFF); } else { display_symbol(LCD_ICON_RECORD, SEG_OFF_BLINK_OFF); } stop_buzzer(); // FIXME: needs to play friendly with other buzzer-using modules (e.g. alarm) }
// ************************************************************************************************* // @fn stop_eggtimer_alarm // @brief Puts eggtimer in STOP mode, halts alarm mode and buzzing if active, updates eggtimer // symbol. Safe to call, even if eggtimer menu not active. // @param none // @return none // ************************************************************************************************* void stop_eggtimer_alarm(void) { // We dont need the timer active anymore Timer0_A1_Unregister(eggtimer_tick); sEggtimer.state = EGGTIMER_STOP; sEggtimer.duration = EGGTIMER_ALARM_DURATION; if (eggtimer_visible()) { display_symbol(LCD_ICON_RECORD, SEG_ON_BLINK_OFF); } else { display_symbol(LCD_ICON_RECORD, SEG_OFF_BLINK_OFF); } stop_buzzer(); // FIXME: needs to play friendly with other buzzer-using modules (e.g. alarm) }