我用keil编译老是有问题warning C318: can't open file 'i2c.h'和error C129: miss‘;’before ’code‘
#include<reg51.h>#include<i2c.h>#definepower_down0x00#definepower_on0x01#definereset0...
#include <reg51.h>
#include<i2c.h>
#define power_down 0x00
#define power_on 0x01
#define reset 0x07
#define h_resolution_mod 0x10
#define m_resolution_mod 0x13
#define l_resolution_mod 0x16
#define onetime_h 0x20
#define onetime_m 0x23
#define onetime_l 0x26
#define write_1710 0x46
#define read_1710 0x47
sbit LCD_RS = P3^4 ;
sbit LCD_RW = P3^5 ;
sbit LCD_EN = P3^3 ;
uchar code cdis1[ ] = {" NFU "} ;
uchar code cdis2[ ] = {" illum: Lux "} ;
uchar code cdis3[ ] = {" BH1710 ERR0R "} ;
uchar code cdis4[ ] = {" PLEASE CHECK "} ;
unsigned char data display[5] = {0x00,0x00,0x00,0x00,0x00} ;
unsigned int bh;
unsigned char code mytab[8] = {0x0C,0x12,0x12,0x0C,0x00,0x00,0x00,0x00} ;
#define delayNOP() ; {_nop_() ;_nop_() ;_nop_() ;_nop_() ;} ;
麻烦各位大神!!!分别是第二行和第17行 展开
#include<i2c.h>
#define power_down 0x00
#define power_on 0x01
#define reset 0x07
#define h_resolution_mod 0x10
#define m_resolution_mod 0x13
#define l_resolution_mod 0x16
#define onetime_h 0x20
#define onetime_m 0x23
#define onetime_l 0x26
#define write_1710 0x46
#define read_1710 0x47
sbit LCD_RS = P3^4 ;
sbit LCD_RW = P3^5 ;
sbit LCD_EN = P3^3 ;
uchar code cdis1[ ] = {" NFU "} ;
uchar code cdis2[ ] = {" illum: Lux "} ;
uchar code cdis3[ ] = {" BH1710 ERR0R "} ;
uchar code cdis4[ ] = {" PLEASE CHECK "} ;
unsigned char data display[5] = {0x00,0x00,0x00,0x00,0x00} ;
unsigned int bh;
unsigned char code mytab[8] = {0x0C,0x12,0x12,0x0C,0x00,0x00,0x00,0x00} ;
#define delayNOP() ; {_nop_() ;_nop_() ;_nop_() ;_nop_() ;} ;
麻烦各位大神!!!分别是第二行和第17行 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询