APDS-9130 library

Prox.h

Committer:
sleighton
Date:
2016-01-04
Revision:
0:10fe9a5a884f
Child:
1:159407640167

File content as of revision 0:10fe9a5a884f:

#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();
    
};