trikRuntime
trikControl::I2cDeviceInterface Class Referenceabstract

Class for work with i2c. More...

#include <i2cDeviceInterface.h>

Inheritance diagram for trikControl::I2cDeviceInterface:
Collaboration diagram for trikControl::I2cDeviceInterface:

Public Member Functions

virtual void send (int reg, int value)=0
 Sends data to current device, if it is connected. More...
 
virtual int read (int reg)=0
 Reads data by given I2C command number and returns the result. More...
 
- Public Member Functions inherited from trikControl::DeviceInterface
 DeviceInterface ()=default
 
virtual ~DeviceInterface ()=default
 
virtual Status status () const =0
 Returns current status of the device. More...
 

Additional Inherited Members

- Public Types inherited from trikControl::DeviceInterface
enum  Status {
  Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting,
  Status::ready, Status::stopping
}
 Device status. More...
 
- Static Public Member Functions inherited from trikControl::DeviceInterface
static Status combine (const DeviceInterface &underlying, const DeviceInterface::Status &dependent)
 Helper method to return status of a device relying on other device to work. More...
 

Detailed Description

Class for work with i2c.

Member Function Documentation

virtual int trikControl::I2cDeviceInterface::read ( int  reg)
pure virtual

Reads data by given I2C command number and returns the result.

virtual void trikControl::I2cDeviceInterface::send ( int  reg,
int  value 
)
pure virtual

Sends data to current device, if it is connected.


The documentation for this class was generated from the following file: