兼职项目 智能自行车
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
324 B

3 years ago
#ifndef __I2C_H_
#define __I2C_H_
#include <reg51.h>
sbit SCL=P1^1;
sbit SDA=P1^0;
3 years ago
void I2cStart();
void I2cStop();
unsigned char I2cSendByte(unsigned char dat);
unsigned char I2cReadByte();
void At24c02Write(unsigned char addr,unsigned char dat);
unsigned char At24c02Read(unsigned char addr);
void Delay10us();
3 years ago
#endif