当前位置: 首页 > 工具软件 > unused > 使用案例 >

STM32开发笔记95: 处理UNUSED宏

宋昕
2023-12-01

单片机型号:STM32F091RCT6


使用C语音在PlatformIO中进行STM32Cube的工程设计,一切正常,希望使用C++语音进行程序开发,顾将main.c文件改为main.cpp文件,再次编译报如下警告:

In file included from C:\users\snmplink\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal_rcc.h:45:0,
                 from C:\users\snmplink\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal_conf.h:185,
                 from C:\users\snmplink\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal.h:46,
                 from include/main.h:31,
                 from src\5_LogicLayer\main.cpp:22:
src\5_LogicLayer\main.cpp: In function 'void MX_GPIO_Init()':
C:\users\snmplink\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal_rcc.h:664:48: warning: conversion to void will no
 类似资料: