#include <easyC.hpp>
Inherited by LTR507.
 | 
|   | EasyC () | 
|   | Main constructor for easyC version.  
  | 
|   | 
| void  | begin () | 
|   | Initializes sensors on native or easyC on default address.  
  | 
|   | 
| void  | begin (uint8_t _address) | 
|   | Initializes sensors on supplied i2c address.  
  | 
|   | 
| virtual void  | initializeNative ()=0 | 
|   | 
| int  | sendAddress (char regAddr) | 
|   | Private function to send a single byte to sensor.  
  | 
|   | 
| int  | readData (char a[], int n) | 
|   | Private function to read n bytes over i2c.  
  | 
|   | 
| int  | readRegister (char regAddr, char a[], size_t n) | 
|   | Private function to send over i2c and then read n bytes.  
  | 
|   | 
| int  | sendData (const uint8_t *a, int n) | 
|   | Private function to write n bytes over i2c.  
  | 
|   | 
◆ EasyC()
Main constructor for easyC version. 
 
 
◆ begin() [1/2]
Initializes sensors on native or easyC on default address. 
 
 
◆ begin() [2/2]
  
  
      
        
          | void EasyC::begin  | 
          ( | 
          uint8_t |           _address | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Initializes sensors on supplied i2c address. 
- Parameters
 - 
  
    | uint8_t | _address Custom easyC sensor address  | 
  
   
 
 
◆ initializeNative()
  
  
      
        
          | virtual void EasyC::initializeNative  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
◆ readData()
  
  
      
        
          | int EasyC::readData  | 
          ( | 
          char |           a[],  | 
         
        
           | 
           | 
          int |           n ) | 
         
       
   | 
  
inline   | 
  
 
Private function to read n bytes over i2c. 
- Parameters
 - 
  
    | char | a[] Array to read data to  | 
    | int | n Number of bytes to read | 
  
   
- Returns
 - int Error code, always 0 
 
 
 
◆ readRegister()
  
  
      
        
          | int EasyC::readRegister  | 
          ( | 
          char |           regAddr,  | 
         
        
           | 
           | 
          char |           a[],  | 
         
        
           | 
           | 
          size_t |           n ) | 
         
       
   | 
  
inline   | 
  
 
Private function to send over i2c and then read n bytes. 
- Parameters
 - 
  
    | char | regAddr Address of register to access data from  | 
    | char | a Array to put data in  | 
    | size_t | n Size of data to read | 
  
   
- Returns
 - int 0 if read successfuly, error code from endTransmission if not 
 
 
 
◆ sendAddress()
  
  
      
        
          | int EasyC::sendAddress  | 
          ( | 
          char |           regAddr | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Private function to send a single byte to sensor. 
- Parameters
 - 
  
    | char | regAddr Address of register to access later | 
  
   
- Returns
 - int Standard endTransmission error codes 
 
 
 
◆ sendData()
  
  
      
        
          | int EasyC::sendData  | 
          ( | 
          const uint8_t * |           a,  | 
         
        
           | 
           | 
          int |           n ) | 
         
       
   | 
  
inline   | 
  
 
Private function to write n bytes over i2c. 
- Parameters
 - 
  
    | char | a[] Array to read data from  | 
    | int | n Number of bytes to read | 
  
   
- Returns
 - int Standard endTransmission error codes 
 
 
 
◆ address
◆ beginDone
      
        
          | bool EasyC::beginDone = 0 | 
        
      
 
 
◆ defaultAddress
      
        
          | const char EasyC::defaultAddress = 0x30 | 
        
      
 
 
◆ err
◆ native
The documentation for this class was generated from the following file: