APDS-9130 library

Prox.h

Committer:
sleighton
Date:
2016-03-04
Revision:
2:9db88ca586db
Parent:
1:159407640167

File content as of revision 2:9db88ca586db:

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