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.
Dependencies: mbed
Diff: TPL0102.h
- Revision:
- 0:54d71ce98029
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/TPL0102.h Wed Jan 23 06:56:03 2019 +0000
@@ -0,0 +1,27 @@
+#ifndef TPL0102_H
+#define TPL0102_H
+
+#include "mbed.h"
+
+#define TPL0102_Potentiometer_Address 0x50
+#define TPL0102_ACR 0x10 // 0x40 reset
+
+class TPL0102 {
+
+public:
+
+ TPL0102(PinName SDA, PinName SCL);
+
+ int SlaveSelect(char address, char settings);
+ int AccessControlRegister(char settings);
+// void DeviceFunctionalMode(char settings);
+
+private:
+
+ I2C i2c_;
+
+ int oneByteWrite(char address, char data);
+
+};
+
+#endif
\ No newline at end of file