MCP4726 library

Dependents:   mbed_MCP4726

See http://developer.mbed.org/users/yasuyuki/notebook/MCP4726/

Revision:
0:f0980556dfc0
diff -r 000000000000 -r f0980556dfc0 MCP4726.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MCP4726.h	Wed Oct 15 14:42:50 2014 +0000
@@ -0,0 +1,36 @@
+//**********************
+// MCP4726.h for mbed
+//
+// (C)Copyright 2014 All rights reserved by Y.Onodera
+// http://einstlab.web.fc2.com
+//**********************
+
+#ifndef MCP4726_H_
+#define MCP4726_H_
+
+#define MCP4726_ADDR                0xC0
+
+#include "mbed.h"
+#include "typedef.h"
+
+
+class MCP4726{
+public:
+    MCP4726 (PinName sda, PinName scl);
+    MCP4726 (I2C& p_i2c);
+    void init();
+    void put(unsigned short a);
+
+protected:
+    
+    I2C _i2c;
+
+    WORD_VAL da;
+    char buf[3];
+
+};
+
+#endif /* MCP4726_H_ */
+
+
+