GCC编译警告:[attachimg]39810
代码:
void rtc_ce(u32 ce){
u32 *p;
// first stage password, to enable access to CE
p=rtc_pwd_adr;
*p=rtc_password;
// second stage password, to modify CE
p=rtc_ce_adr;
*p=rtc_pwd_ce+ce;
return;
}
void rtc_config(u32 cal, u32 itv, u32 alarm)
{
u32 *p;
rtc_ce(0x1);
p=rtc_cal_adr;
*p=cal;
p=rtc_itv_adr;
*p=itv;
p=rtc_alarm_adr;
*p=alarm;
rtc_ce(0x0);
return;
}
一周热门 更多>