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.
16 lines
306 B
16 lines
306 B
#ifndef __I2C_H_ |
|
#define __I2C_H_ |
|
|
|
#include <reg51.h> |
|
|
|
sbit SCL=P2^1; |
|
sbit SDA=P2^0; |
|
|
|
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); |
|
|
|
#endif
|
|
|