i2c2_device Class Reference
#include <i2c2_device.hpp>
Inheritance diagram for i2c2_device:

Protected Member Functions | |
i2c2_device (uint8_t addr) | |
Constructor of this base class that takes addr as a parameter. More... | |
uint8_t | readReg (unsigned char reg) |
void | writeReg (unsigned char reg, unsigned char data) |
Writes a register of this device. More... | |
bool | checkDeviceResponse () |
uint16_t | get16BitRegister (unsigned char reg) |
Detailed Description
I2C Device Base Class This class can be inherited by an I2C Device to be able to read and write registers more easily as this class will puts an abstraction layer on I2C and provides simple functionality to read and write registers over I2C Bus.
Constructor & Destructor Documentation
|
inlineprotected |
Constructor of this base class that takes addr as a parameter.
Member Function Documentation
|
inlineprotected |
- Returns
- true if the device responds to its address
|
inlineprotected |
Reads 16-bit register from reg and reg+1 granted that reg has MSB
|
inlineprotected |
- Returns
- the register content of this device
|
inlineprotected |
Writes a register of this device.
The documentation for this class was generated from the following file:
- /var/www/html/SJSU-DEV-Linux/firmware/default/lib/L4_IO/i2c2_device.hpp