switch(option) { case YEAR_IN_RTC:return(RTC_YEARS);break; case MONTH_IN_RTC:return(RTC_MONTHS);break; case DAY_IN_RTC:return(RTC_DAYS);break; case HOUR_IN_RTC:return(RTC_HOURS);break; case MINUTE_IN_RTC:return(RTC_MINUTES);break; case SECOND_IN_RTC:return(RTC_SECONDS);break; } }
void Write_RTC(unsigned char option,unsigned char j) { switch(option) { case YEAR_IN_RTC:RTC_YEARS=j;break; case MONTH_IN_RTC:RTC_MONTHS=j;break; case DAY_IN_RTC:RTC_DAYS=j;break; case HOUR_IN_RTC:RTC_HOURS=j;break; case MINUTE_IN_RTC:RTC_MINUTES=j;break; case SECOND_IN_RTC:RTC_SECONDS=j;break; case SECOND_ALARM_IN_RTC:RTC_SECONDS_ALARM=j;break; case MINUTE_ALARM_IN_RTC:RTC_MINUTES_ALARM=j;break; case HOUR_ALARM_IN_RTC:RTC_HOURS_ALARM=j;break;
} }
bit Second_Interrupt(void) { if( (DSC&0x20)==0x20 )return(1); return(0); }
文章评论(0条评论)
登录后参与讨论