Warning:assignment makes pointer from integer without a cast

2020-02-08 09:06发布

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;
}
0条回答

一周热门 更多>