学前班
最后登录1970-1-1
在线时间 小时
注册时间2018-5-3
|
大家好,我是刚学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 |
|