APDS-9130 library

Prox.h

Committer:
sleighton
Date:
2016-01-30
Revision:
1:159407640167
Parent:
0:10fe9a5a884f

File content as of revision 1:159407640167:

#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, uint16_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);
    
    uint16_t readProx();
    
};