打印

#79:expected a type specifier

[复制链接]
674|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
TE, pi, LED, IO, gp
大家好,我是刚学stm32的小白,在弄流水灯程序的时候完全照搬例程写的程序,但是在编译后出现了如下问题,不知道大神们怎么解决?多谢了
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\KEIL\ARM\ARMCC\Bin'
Build target 'Target 1'
compiling bsp_led.c...
..\..\User\led\bsp_led.h(32): error:  #79: expected a type specifier
                                  GPIO_ResetBits(LED1_GPIO_PORT,LED1_GPIO_PIN)
..\..\User\led\bsp_led.h(32): error:  #79: expected a type specifier
                                  GPIO_ResetBits(LED1_GPIO_PORT,LED1_GPIO_PIN)
..\..\User\led\bsp_led.h(32): warning:  #260-D: explicit type is missing ("int" assumed)
                                  GPIO_ResetBits(LED1_GPIO_PORT,LED1_GPIO_PIN)
..\..\User\led\bsp_led.h(32): error:  #147: declaration is incompatible with "void GPIO_ResetBits(GPIO_TypeDef *, uint16_t)"  (declared at line 358 of "..\..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_gpio.h")
                                  GPIO_ResetBits(LED1_GPIO_PORT,LED1_GPIO_PIN)
..\..\User\led\bsp_led.h(32): error:  #141-D: unnamed prototyped parameters not allowed when body is present
                                  GPIO_ResetBits(LED1_GPIO_PORT,LED1_GPIO_PIN)
..\..\User\led\bsp_led.h(37): error:  #130: expected a "{"
                                  GPIO_ResetBits(LED2_GPIO_PORT,LED2_GPIO_PIN)
..\..\User\led\bsp_led.c(4): warning:  #12-D: parsing restarts here after previous syntax error
  {
..\..\User\led\bsp_led.c: 2 warnings, 5 errors
compiling main.c...
..\..\User\led\bsp_led.h(32): error:  #79: expected a type specifier
                                  GPIO_ResetBits(LED1_GPIO_PORT,LED1_GPIO_PIN)
..\..\User\led\bsp_led.h(32): error:  #79: expected a type specifier
                                  GPIO_ResetBits(LED1_GPIO_PORT,LED1_GPIO_PIN)
..\..\User\led\bsp_led.h(32): warning:  #260-D: explicit type is missing ("int" assumed)
                                  GPIO_ResetBits(LED1_GPIO_PORT,LED1_GPIO_PIN)
..\..\User\led\bsp_led.h(32): error:  #147: declaration is incompatible with "void GPIO_ResetBits(GPIO_TypeDef *, uint16_t)"  (declared at line 358 of "..\..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_gpio.h")
                                  GPIO_ResetBits(LED1_GPIO_PORT,LED1_GPIO_PIN)
..\..\User\led\bsp_led.h(32): error:  #141-D: unnamed prototyped parameters not allowed when body is present
                                  GPIO_ResetBits(LED1_GPIO_PORT,LED1_GPIO_PIN)
..\..\User\led\bsp_led.h(37): error:  #130: expected a "{"
                                  GPIO_ResetBits(LED2_GPIO_PORT,LED2_GPIO_PIN)
..\..\User\main.c(8): warning:  #12-D: parsing restarts here after previous syntax error
  {
..\..\User\main.c(11): warning:  #223-D: function "LED_GPIO_Config" declared implicitly
          LED_GPIO_Config();
..\..\User\main.c(16): warning:  #223-D: function "Delay" declared implicitly
                  SOFT_DELAY;     
..\..\User\main.c(54): warning:  #159-D: declaration is incompatible with previous "Delay"  (declared at line 16)
  void Delay(__IO uint32_t nCount)     //简单的延时函数
..\..\User\main.c: 5 warnings, 5 errors
".\Objects\Template.axf" - 10 Error(s), 7 Warning(s).
Target not created.
Build Time Elapsed:  00:00:01

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

377

主题

377

帖子

0

粉丝