PCF8591 library

Dependents:   mbed_DEMO

See https://developer.mbed.org/users/yasuyuki/notebook/PCF8591/

Revision:
0:e17d7079ee96
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PCF8591.h	Sat Oct 04 12:03:47 2014 +0000
@@ -0,0 +1,31 @@
+//**********************
+// PCF8591.h for mbed
+//
+// (C)Copyright 2014 All rights reserved by Y.Onodera
+// http://einstlab.web.fc2.com
+//**********************
+
+#ifndef PCF8591_H_
+#define PCF8591_H_
+
+#define PCF8591_ADDR    0x92
+
+#include "mbed.h"
+
+class PCF8591{
+public:
+    PCF8591 (PinName sda, PinName scl);
+    PCF8591 (I2C& p_i2c);
+
+    void put(unsigned char a, unsigned char b);
+    unsigned char get(unsigned char a);
+
+protected:
+    
+    I2C _i2c;
+    char buf[2];
+
+};
+
+
+#endif /* PCF8591_H_ */