00001 #ifndef __I2C_H__ 00002 #define __I2C_H__ 00003 00004 #include "global.h" 00005 00006 00007 #define TWI_CLK 1000000L 00008 00009 00010 00011 class I2c { 00012 00013 public: 00014 void sendStart(void); 00015 void sendStop(void); 00016 unsigned char readByte (void); 00017 unsigned char readByteWithoutAck (void); 00018 void writeByte (unsigned char _byte); 00019 I2c(void); 00020 }; 00021 00022 #endif 00023