Keil环境下LPC1768 GPIO2控制代码出现110条警告求助
LPC1768 GPIO控制代码编译出现大量警告求助
我在Keil环境中编写了一段控制LPC1768的GPIO2全部引脚亮灭的简单代码,但编译后出现110条警告。
代码实现
#include <LPC17xx.h> void delay_ms(unsigned int ms); void delay_ms(unsigned int ms) { unsigned int i,j; for(i=0;i<ms;i++) for(j=0;j<20000;j++); } /* start the main program */ int main() { SystemInit(); //Clock and PLL configuration LPC_PINCON->PINSEL4 = 0x000000; //Configure the PORT2 Pins as GPIO; LPC_GPIO2->FIODIR = 0xffffffff; //Configure the PORT2 pins as OUTPUT; while(1) { LPC_GPIO2->FIOSET = 0xffffffff; // Make all the Port pins as high delay_ms(100); LPC_GPIO2->FIOCLR = 0xffffffff; // Make all the Port pins as low delay_ms(100); } }
我已尝试重新安装Keil软件及对应芯片软件包,但问题未解决;此前遇到“use of old-style cast”警告,通过在Project->Options For Target->C/C++选项卡的Misc controls中添加-Wno-old-style-cast已解决,但仍存在大量警告,恳请协助排查解决。
内容的提问来源于stack exchange,提问作者Mahdi Ahmadimehr
相关产品推荐
相关产品推荐

