Simple I2C test program. open/close/read/write supported.

Dependencies:   mbed vt100

Revision:
2:218e22a54982
Parent:
1:e105ceaee6ac
--- a/dumb_i2c.h	Tue Apr 05 02:11:20 2016 +0000
+++ b/dumb_i2c.h	Tue Apr 05 06:53:27 2016 +0000
@@ -21,14 +21,14 @@
   void frequency(uint32_t f) ;
   uint32_t frequency(void) ;
   uint8_t address(void) ;
-  void read(int addr, uint8_t *data, int len) ;
-  void write(int addr, uint8_t *data, int len) ;
+  int read(int addr, uint8_t *data, int len) ;
+  int write(int addr, uint8_t *data, int len) ;
 private:
   I2C m_i2c;
   int m_addr;
   uint32_t freq ;
-  void readRegs(int addr, uint8_t * data, int len);
-  void writeRegs(uint8_t * data, int len);
+  int readRegs(int addr, uint8_t * data, int len);
+  int writeRegs(uint8_t * data, int len);
 };
 
 #endif /* _DUMB_I2C_H_ */
\ No newline at end of file