关于解决keil5编译程序过程中出现的警告main.c(20): warning: #1295-D: Deprecated declaration all_init - give arg types

本文详细介绍了嵌入式系统初始化过程,包括设置系统中断优先级分组、延时初始化、多个串口初始化及ADC初始化等关键步骤。通过具体代码示例,深入解析了嵌入式系统的启动配置流程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在这里插入图片描述

void all_init();

int main(void)
{ 
	
  all_init();

	while(1)
	{
		///

	}
}


void all_init()
{
	
	NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//设置系统中断优先级分组2
	delay_init(168);		//延时初始化 
  uart_init(115200);	//串口初始化波特率为115200
	uart2_init(115200);	//串口初始化波特率为115200  openmv
	uart3_init(115200);	//串口初始化波特率为115200  串口屏
//	uart6_init(115200);	//串口初始化波特率为115200  备用
//	Adc1_Init();
	Adc3_Init();
	BEEP_Init();
	
}

在void all_init();的申明的括号中添加void就可以解决。

*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' Rebuild target 'BUZZERWorking2' assembling startup_stm32f103xe.s... compiling main.c... ../Inc/main.h(57): warning: #1295-D: Deprecated declaration USER_UART_IRQHandler - give arg types void USER_UART_IRQHandler(); ../Src/main.c: 1 warning, 0 errors compiling gpio.c... ../Inc/main.h(57): warning: #1295-D: Deprecated declaration USER_UART_IRQHandler - give arg types void USER_UART_IRQHandler(); ../Src/gpio.c: 1 warning, 0 errors compiling stm32f1xx_hal_gpio_ex.c... compiling stm32f1xx_hal_tim.c... compiling stm32f1xx_hal_msp.c... ../Inc/main.h(57): warning: #1295-D: Deprecated declaration USER_UART_IRQHandler - give arg types void USER_UART_IRQHandler(); ../Src/stm32f1xx_hal_msp.c: 1 warning, 0 errors compiling stm32f1xx_it.c... ../Inc/main.h(57): warning: #1295-D: Deprecated declaration USER_UART_IRQHandler - give arg types void USER_UART_IRQHandler(); ../Src/stm32f1xx_it.c: 1 warning, 0 errors compiling stm32f1xx_hal_tim_ex.c... compiling stm32f1xx_hal.c... compiling stm32f1xx_hal_rcc_ex.c... compiling stm32f1xx_hal_rcc.c... compiling stm32f1xx_hal_cortex.c... compiling stm32f1xx_hal_dma.c... compiling stm32f1xx_hal_pwr.c... compiling stm32f1xx_hal_gpio.c... compiling stm32f1xx_hal_flash.c... compiling system_stm32f1xx.c... compiling stm32f1xx_hal_exti.c... compiling stm32f1xx_hal_flash_ex.c... linking... BUZZERWorking2\BUZZERWorking2.axf: Error: L6200E: Symbol MX_GPIO_Init multiply defined (by gpio.o and main.o). Not enough information to list image symbols. Not enough information to list load addresses in the image map. Finished: 2 information, 0 warning and 1 error messages. "BUZZERWorking2\BUZZERWorking2.axf" - 1 Error(s), 4 Warning(s). Target not created. Build Time Elapsed: 00:00:10
07-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值