好多都解决不了的
#include <reg52.h>
#include <stdio.h>
#include "lcd1602.h" 请教大神 出现这种情况怎么解 warning C318: can't open file 'lcd1602.h'
#include "delay.h"
#include "infrared.h"
#include "gsm_at.h"
#include "data_unit.h"
#include "uart.h"
#include "eeprom52.h"
sbit KEY_OPEN = P3^3; //????
sbit KEY_CLOSE = P3^5;
sbit LED_GREEN = P2^1;
sbit LED_RED = P2^2;
sbit BUZZER = P2^0;
#define BUZZER_ON (BUZZER = 0)
#define BUZZER_OFF (BUZZER = 1)
sbit SHAKE_PIN = P1^1
sbit HC_SR501 = P1^0
sbit RELAY_LOCK = P2^3
bit g_irFlag = 0
unsigned char g_irCode[4];
unsigned char refreshFlag = 0
unsigned char setFlag = 0; //??????
bit lockFlag = 1; //??????
bit monitorFlag = 0; //????
bit alarmFlag = 0; //????
unsigned char time500msCnt = 0;
unsigned char time500msCnt2 = 0;
bit oldPinState = 0;
bit nowPinState = 0;
char dis0[16]; //????????????
void CheckKey(void);
void CheckBluetooth(void);
void Timer1_Init(void);
void main(void)
{
IR_INPUT = 1; 还有这 error C202: 'IR_INPUT': undefined identifier
Timer1_Init();
IR_Init();
Uart_Init();
LCD_Init(); //?????
DelayMs(200); //???????
LCD_Clear(); //??
LCD_DispStr(0, 0, " Welcome! ");
DelayS(1);
LCD_DispStr(0, 0, " Waiting... ");
DelayS(5);
err_num = GSM_Init(); //GSM???
DelayMs(10);
if (gsm_init_flag) //?????
{
err_num = GSM_Text_Mode(); //GSM ??Text??
}
DelayMs(10);
if (gsm_config_flag)
{
err_num = GSM_Delete_Sms("1"); //????1
}
DelayMs(10);
if (!(gsm_init_flag || gsm_config_flag || gsm_delete_flag)) // AT????
{
BUZZER_ON;
LCD_DispStr(0, 0, " Init Err Num ");
LCD_WriteData((int)err_num+'0');
DelayS(1);
BUZZER_OFF;
}
else
{
LCD_DispStr(0, 0, " Init OK! ");
}
DelayS(3);
EEPROM52_Init(); //???????
LCD_DispStr(0, 0, " Status ");
while (1) //???
{
gsm_receive_process(); //gsm????
if (lockFlag == 1) //???
{
LED_RED = 0;
LED_GREEN = 1;
RELAY_LOCK = 1; //???
if (alarmFlag == 0)
{
if (HC_SR501 == 0 && SHAKE_PIN == 0) //?????
monitorFlag = 1;
if (monitorFlag == 1) //??????
{
if (time500msCnt >= 10 && time500msCnt <= 20) //????????5s~10s,????
{
if (HC_SR501 == 0 && SHAKE_PIN == 0) //??????????
{
alarmFlag = 1;
time500msCnt = 0;
BUZZER_ON;
LCD_DispStr(0, 1, " Warning! ");
GSM_Send_Sms(phone1, "Please pay attention to your car!");
DelayMs(10);
}
}
else if (time500msCnt > 20) //??10s????
{
monitorFlag = 0; //????
time500msCnt = 0;
}
}
else
{
time500msCnt = 0;
BUZZER_OFF;
}
}
else //????
{
if (time500msCnt >= 120) //??1????????
{
alarmFlag = 0;
}
}
}
else
{
LED_RED = 1;
LED_GREEN = 0;
alarmFlag = 0;
monitorFlag = 0;
RELAY_LOCK = 0; //???
BUZZER_OFF;
}
if (refreshFlag == 1)
{
refreshFlag = 0;
TR1 = 0;
if (lockFlag == 1)
{
if (alarmFlag == 0)
{
if (monitorFlag == 1)
{
time500msCnt++;
}
else
{
time500msCnt = 0;
LCD_DispStr(0, 1, " Lock ");
}
}
else
{
time500msCnt++;
}
}
else
{
LCD_DispStr(0, 1, " Open ");
if (time500msCnt2 > 0)
{
time500msCnt2--;
|