标题: error:#109:expression must have (pointer-to-) function type STM32 keil编译错误 [打印本页]

作者: 51fuxiaobai    时间: 2018-10-12 22:38
标题: error:#109:expression must have (pointer-to-) function type STM32 keil编译错误
STM32 keil编译产生错误,求帮助
# include "sys.h"
#define PA1 GPIOA->BSRR
#define PA0 GPIOA->BRR
int main(void)
{
  u32 *PAO3 = (u32 *)(0x42000000 + (0x4001080c - 0x40000000)*32 + 3*4)   
//GPIO_1.c(38): error:  #109: expression must have (pointer-to-) function type   
}
上一句为代码,下一句是keil编译后生成的错误,烦请各路大神给看下错误出在哪里,谢谢!

错误内容:
error:  #109: expression must have (pointer-to-) function type

报错图片.png (49.21 KB, 下载次数: 50)

报错图片

报错图片

作者: hbnpmw    时间: 2018-10-13 09:58
u32 *PAO3 = (u32 *)(0x42000000 + (0x4001080c - 0x40000000)*32 + 3*4)     这句话后边是需要加上分号的,标识本句结束
作者: 51fuxiaobai    时间: 2018-10-15 21:33
老犯低级错误,看到了,谢谢!




欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1