c(24): error C267: 'ADC0832': requires ANSI-style prototype 错误在第24行
#include "reg52.h"
#include "lcd1602.h"
#include "delay.h"
#include "adc0832.h"
unsigned int MPX4115_GetPressure(unsigned char Ad)
{
unsigned int Pressure = 0; //方便计算 这是扩大十倍的压力值
if(14<Ad<243) //当压力值介于15kpa到115kpa之间时,遵循线性变换
{
int Vary = Ad;
Pressure = (((10.0/23.0)*Vary)+9.3)*10; //扩大十倍 方便计算
}
return Pressure;
}
void Lcd1602_String(int row,int col,char*str)
{
unsigned int Pressure = 0; //方便计算 这是扩大十倍的压力值
Lcd1602_Init( ); //LCD1602液晶初始化
Lcd1602_String(0,0," MPX4115 Test ");
while(1)
{
Pressure = MPX4115_GetPressure(ADC0832(0,0)); //获取压力
Lcd1602_String(0,1,"Pressure:");
Lcd1602_Write_Data(Pressure/1000 + 0x30); //显示千位
Lcd1602_Write_Data(Pressure%1000/100 + 0x30); //显示百位
Lcd1602_Write_Data(Pressure%1000%100/10 + 0x30); //显示十位
Lcd1602_Write_Data('.' );
Lcd1602_Write_Data(Pressure%1000%100%10 + 0x30); //显示个位
}
}
寻求度娘帮助吧,比如https://zhidao.baidu.com/question/754306235842895852.html
看看哪个能解决问题