Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: MCP/MCP.cpp
- Revision:
- 0:db8d4af513c0
- Child:
- 1:5b0303768126
--- /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