Sakura IoT Platform b

Fork of SakuraIO by SAKURA Internet

Revision:
1:20e1dfe45dab
Parent:
0:8d34375d954c
Child:
2:6f8e51a42a7d
diff -r 8d34375d954c -r 20e1dfe45dab SakuraIO.h
--- a/SakuraIO.h	Sat Nov 19 03:20:17 2016 +0000
+++ b/SakuraIO.h	Sat Nov 19 12:32:11 2016 +0000
@@ -1,6 +1,7 @@
 #ifndef _SAKURAIO_H_
 #define _SAKURAIO_H_
 
+#include "mbed.h"
 #include <SakuraIO/commands.h>
 
 class SakuraIO
@@ -75,16 +76,19 @@
 class SakuraIO_I2C : public SakuraIO
 {
 protected:
-  I2C &i2c;
-  void begin();
-  void end();
-  void sendByte(uint8_t data);
-  uint8_t startReceive(uint8_t length);
-  uint8_t receiveByte(bool stop);
-  uint8_t receiveByte();
+  I2C i2c;
+  int _length;
+ 
+  virtual void begin();
+  virtual void end();
+  virtual void sendByte(uint8_t data);
+  virtual uint8_t startReceive(uint8_t length);
+  virtual uint8_t receiveByte(bool stop);
+  virtual uint8_t receiveByte();
   uint8_t mode;
 public:
-  SakuraIO_I2C(I2C &_i2c);
+  SakuraIO_I2C (I2C &_i2c);
+  SakuraIO_I2C (PinName sda, PinName scl);
 };
 
 #endif // _SAKURAIO_H_