gjyrjyykkudt

Dependencies:   mbed MCP23017

Revision:
0:db8d4af513c0
Child:
1:5b0303768126
diff -r 000000000000 -r db8d4af513c0 MCP/MCP.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MCP/MCP.cpp	Mon Jan 20 08:46:24 2020 +0000
@@ -0,0 +1,14 @@
+#include "MCP.h"
+#include "mbed.h"
+
+MCP::MCP(PinName sda, PinName scl, uint8_t device_address)
+    :i2c(sda, scl)
+{
+    _write_opcode = device_address & 0xFE; // low order bit = 0 for write
+    _read_opcode  = device_address | 0x01; // low order bit = 1 for read;
+}
+
+void MCP::PinMode(uint8_t pin, uint8_t mode)
+{
+    //_pull_data
+}
\ No newline at end of file