mirror of
https://github.com/travisgoodspeed/goodwatch
synced 2024-11-21 23:58:31 +00:00
Merge pull request #111 from BitBangingBytes/master
Fixed Alarm Inconsistencies
This commit is contained in:
commit
652108d3f1
@ -162,14 +162,12 @@ int alarm_keypress(char ch){
|
||||
break;
|
||||
case 4:
|
||||
RTCAMIN = RTCAMIN-RTCAMIN%10+inputdigit;
|
||||
settingalarm = 0;
|
||||
break;
|
||||
default:
|
||||
/* Once we've exceeded the count, it's time to return to the
|
||||
normal mode and enable the alarm.
|
||||
*/
|
||||
settingalarm=0;
|
||||
toggle_alarm(1);
|
||||
break;
|
||||
default:
|
||||
// Return to normal mode if we end up here accidentally
|
||||
settingalarm=0;
|
||||
}
|
||||
} else {
|
||||
switch(ch){
|
||||
|
@ -65,7 +65,8 @@ void rtc_init(){
|
||||
RTCCTL01 = RTCTEVIE + RTCSSEL_2 + RTCTEV_0 + RTCMODE + RTCAIE;
|
||||
RTCPS0CTL = RT0PSDIV_2; // ACLK, /8, start timer
|
||||
RTCPS1CTL = RT1SSEL_2 + RT1PSDIV_3; // out from RT0PS, /16, start timer
|
||||
|
||||
RTCADAY = 0; // Initialize to 0 to clear alarm flags
|
||||
RTCADOW = 0; // on Day and Day of Week registers.
|
||||
#ifdef CALIBRATE_APP
|
||||
//Load the calibration routines.
|
||||
calibrate_enforce();
|
||||
|
Loading…
Reference in New Issue
Block a user