APDS-9130 library

Revision:
0:10fe9a5a884f
Child:
1:159407640167
diff -r 000000000000 -r 10fe9a5a884f Prox.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Prox.h	Mon Jan 04 12:28:26 2016 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+/** interface class for configuring, sending and recieving data using an APDS-9130 */
+class Prox
+{
+private:
+    PinName _sda;
+    PinName _scl;
+   
+public:
+  
+    Prox(PinName sda, PinName scl);
+      
+    void ReadWord(char addr, char reg, uint8_t *data);
+    void ReadByte(char addr, char reg, char *bytedata);
+    void WriteByte(uint8_t addr, uint8_t reg, char data);
+    void WriteByte(uint8_t addr, uint8_t reg);
+    
+    uint8_t readProx();
+    
+};
\ No newline at end of file