今天在进行模块移植的时候,Keil突然出现一个警告:#870-D: invalid multibyte character sequence,指向的语句是
1 ADS1248_Temp[0] = ADS1248_ResToTemp(ADS1248_MeasureData[0]); 2 Temperature1 = ADS1248_Temp[0]; 3 printf(" The Temperature of Channel is :%f ",Temperature1); 4 5 ADS1248_Temp[1] = ADS1248_ResToTemp(ADS1248_MeasureData[1]); 6 Temperature2 = ADS1248_Temp[1]; 7 printf(" The Temperature of Channel is :%f ",Temperature2); 8 9 ADS1248_Temp[2] = ADS1248_ResToTemp(ADS1248_MeasureData[2]); 10 Temperature3 = ADS1248_Temp[2]; 11 printf(" The Temperature of Channelis :%f ",Temperature3); 12 13 ADS1248_Temp[3] = ADS1248_ResToTemp(ADS1248_MeasureData[3]); 14 Temperature4 = ADS1248_Temp[3]; 15 printf(" The Temperature of Channel is :%f ",Temperature4);
中的printf(" The Temperature of Channel is :%f ",Temperature4);这个语句,试过很多方法都没有把警告解除,后来突然想到可能是代码模块放的位置不对引起的,这个函数放在mian()的后面了,在main函数的前面声明了函数。想到的办法就是把函数移动到mian()函数的前面,再次进行编辑,警告通过了,后来再次把函数模块放到mian()后面编译,也通过了,不知道是什么原因,记录一下,后面再测试一下,看是否是位置不对引起的
链接:https://pan.baidu.com/s/1ajvDcC8FsPk7c24Jf73ItQ 密码:bo4l