主函数如下:
#include "sys.h"
#include "delay.h"
#include "led.h"
#include "key.h"
#include "usart.h"
#include "ds18b20.h"
#include"24cxx.h"
//#define SIZE 1
//void GPIO_CFG()
//{
// GPIO_InitTypeDef GPIO_InitType;
// GPIO_InitType.GPIO_Pin = GPIO_Pin_10;
// GPIO_InitType.GPIO_Speed = GPIO_Speed_10MHz;
// GPIO_InitType.GPIO_Mode = GPIO_Mode_IPU;
// GPIO_Init(GPIOA,&GPIO_InitType);
//}
int main(void)
{
// u8 key;
// u8 datatemp[SIZE]; //从24c02读取的数据
s16 temperature;
delay_init(); //延时初始化
NVIC_Configuration(); //设置NVIC中断分组2:2位抢占优先级,2位响应优先级
uart_init(9600); //串口初始化为9600
LED_Init(); //初始化与LED连接的硬件接口
KEY_Init();
// AT24CXX_Init(); //IIC初始化
while(DS18B20_Init()) //DS18B20初始化
{
LED0 = 0;
delay_ms(500);
LED0 = 1;
delay_ms(500);
}
// while(AT24CXX_Check())//检测不到24c02
// {
// LED1 = 1;
// delay_ms(500);
// LED1 = 0;
// delay_ms(500);
// }
while(1)
{
temperature=DS18B20_Get_Temp();
USART_SendData(USART1,temperature);//向串口1发送数据
while(USART_GetFlagStatus(USART1,USART_FLAG_TC)!=SET);//等待发送结束
delay_ms(1000);
// key=KEY_Scan(0);
// if(key==KEY_UP)//KEY_UP按下,写入24C02
// {
// AT24CXX_Write(0,(u8*)temperature,SIZE);
// printf("24c02写入成功\n");
// }
// if(key==KEY_DOWN)//KEY_DOWN按下,读取字符串并显示
// {
// AT24CXX_Read(0,datatemp,SIZE);
// printf("24c02读取成功\n");
// }
}
}
报错如下:
Build target 'Template'
compiling main.c...
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(23): error: #256: invalid redeclaration of type name "s32" (declared at line 487 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef signed long s32;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(27): error: #256: invalid redeclaration of type name "sc32" (declared at line 491 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef signed long const sc32; /* Read Only */
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(31): error: #256: invalid redeclaration of type name "vs32" (declared at line 495 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef volatile signed long vs32;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(35): error: #256: invalid redeclaration of type name "vsc32" (declared at line 499 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef volatile signed long const vsc32; /* Read Only */
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(39): error: #256: invalid redeclaration of type name "u32" (declared at line 503 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef unsigned long u32;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(43): error: #256: invalid redeclaration of type name "uc32" (declared at line 507 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef unsigned long const uc32; /* Read Only */
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(47): error: #256: invalid redeclaration of type name "vu32" (declared at line 511 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef volatile unsigned long vu32;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(51): error: #256: invalid redeclaration of type name "vuc32" (declared at line 515 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef volatile unsigned long const vuc32; /* Read Only */
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error: #101: "RESET" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error: #101: "SET" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error: #256: invalid redeclaration of type name "FlagStatus" (declared at line 519 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error: #256: invalid redeclaration of type name "ITStatus" (declared at line 519 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error: #101: "DISABLE" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error: #101: "ENABLE" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error: #256: invalid redeclaration of type name "FunctionalState" (declared at line 521 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error: #101: "ERROR" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error: #101: "SUCCESS" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error: #256: invalid redeclaration of type name "ErrorStatus" (declared at line 524 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(30): error: #55: too many arguments in macro invocation
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: void __ISB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(30): error: #79: expected a type specifier
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: void __ISB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(31): error: #55: too many arguments in macro invocation
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: void __DSB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(31): error: #79: expected a type specifier
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: void __DSB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(32): error: #55: too many arguments in macro invocation
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: void __DMB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(32): error: #79: expected a type specifier
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: void __DMB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(58): error: #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 564 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: } ADC_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(154): error: #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 663 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: } BKP_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(163): error: #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 675 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: } CAN_TxMailBox_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(171): error: #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 687 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: } CAN_FIFOMailBox_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(177): error: #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 697 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: } CAN_FilterRegister_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(203): error: #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 731 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: } CAN_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: main.c: 0 warnings, 30 errors
compiling stm32f10x_it.c...
compiling system_stm32f10x.c...
compiling ds18b20.c...
compiling key.c...
compiling led.c...
compiling myiic.c...
compiling 24cxx.c...
..\CORE\core_cm3.h(715): warning: #47-D: incompatible redefinition of macro "SCS_BASE" (declared at line 687 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h: #define SCS_BASE (0xE000E000) /*!< System Control Space Base Address */
..\CORE\core_cm3.h: ^
..\CORE\core_cm3.h(723): warning: #47-D: incompatible redefinition of macro "SCB" (declared at line 935 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h: #define SCB ((SCB_Type *) SCB_BASE) /*!< SCB configuration struct */
..\CORE\core_cm3.h: ^
..\CORE\core_cm3.h(724): warning: #47-D: incompatible redefinition of macro "SysTick" (declared at line 930 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h: #define SysTick ((SysTick_Type *) SysTick_BASE) /*!< SysTick configuration struct */
..\CORE\core_cm3.h: ^
..\CORE\core_cm3.h(725): warning: #47-D: incompatible redefinition of macro "NVIC" (declared at line 934 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h: #define NVIC ((NVIC_Type *) NVIC_BASE) /*!< NVIC configuration struct */
..\CORE\core_cm3.h: ^
..\USER\stm32f10x.h(487): error: #256: invalid redeclaration of type name "s32" (declared at line 23 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef int32_t s32;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(491): error: #256: invalid redeclaration of type name "sc32" (declared at line 27 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef const int32_t sc32; /*!< Read Only */
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(495): error: #256: invalid redeclaration of type name "vs32" (declared at line 31 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef __IO int32_t vs32;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(499): error: #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef __I int32_t vsc32; /*!< Read Only */
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(503): error: #256: invalid redeclaration of type name "u32" (declared at line 39 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef uint32_t u32;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(507): error: #256: invalid redeclaration of type name "uc32" (declared at line 43 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef const uint32_t uc32; /*!< Read Only */
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(511): error: #256: invalid redeclaration of type name "vu32" (declared at line 47 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef __IO uint32_t vu32;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(515): error: #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef __I uint32_t vuc32; /*!< Read Only */
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(519): error: #101: "RESET" has already been declared in the current scope
..\USER\stm32f10x.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(519): error: #101: "SET" has already been declared in the current scope
..\USER\stm32f10x.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(519): error: #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(519): error: #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(521): error: #101: "DISABLE" has already been declared in the current scope
..\USER\stm32f10x.h: typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(521): error: #101: "ENABLE" has already been declared in the current scope
..\USER\stm32f10x.h: typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(521): error: #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(524): error: #101: "ERROR" has already been declared in the current scope
..\USER\stm32f10x.h: typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(524): error: #101: "SUCCESS" has already been declared in the current scope
..\USER\stm32f10x.h: typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(524): error: #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h: typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(528): warning: #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 147 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_conf.h")
..\USER\stm32f10x.h: #define HSE_Value HSE_VALUE
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(564): error: #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } ADC_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(663): error: #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } BKP_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(675): error: #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } CAN_TxMailBox_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(687): error: #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } CAN_FIFOMailBox_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(697): error: #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } CAN_FilterRegister_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(731): error: #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } CAN_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(758): error: #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } CRC_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(782): error: #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } DAC_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(792): error: #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: }DBGMCU_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(804): error: #256: invalid redeclaration of type name "DMA_Channel_TypeDef" (declared at line 248 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } DMA_Channel_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(810): error: #256: invalid redeclaration of type name "DMA_TypeDef" (declared at line 254 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } DMA_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h(895): error: #256: invalid redeclaration of type name "EXTI_TypeDef" (declared at line 265 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h: } EXTI_TypeDef;
..\USER\stm32f10x.h: ^
..\USER\stm32f10x.h: 24cxx.c: 5 warnings, 30 errors
compiling misc.c...
compiling stm32f10x_gpio.c...
compiling stm32f10x_rcc.c...
compiling stm32f10x_usart.c...
compiling stm32f10x_i2c.c...
compiling stm32f10x_fsmc.c...
compiling stm32f10x_tim.c...
compiling core_cm3.c...
assembling startup_stm32f10x_hd.s...
compiling delay.c...
compiling sys.c...
compiling usart.c...
Target not created |