trikRuntime
trikHal::trik::TrikI2c Class Reference

Real implementation of I2C bus communicator. More...

#include <trikI2c.h>

Inheritance diagram for trikHal::trik::TrikI2c:
Collaboration diagram for trikHal::trik::TrikI2c:

Public Member Functions

 TrikI2c ()=default
 Constructor. More...
 
 ~TrikI2c () override
 
void send (const QByteArray &data) override
 Send data to a device. More...
 
int read (const QByteArray &data) override
 Reads data by given I2C command number and returns the result. More...
 
bool connect (const QString &devicePath, int deviceId) override
 Establish connection with MSP over I2C bus. More...
 
void disconnect () override
 Disconnect from MSP. More...
 
- Public Member Functions inherited from trikHal::MspI2cInterface
 MspI2cInterface ()=default
 
virtual ~MspI2cInterface ()=default
 

Detailed Description

Real implementation of I2C bus communicator.

Constructor & Destructor Documentation

trikHal::trik::TrikI2c::TrikI2c ( )
default

Constructor.

TrikI2c::~TrikI2c ( )
override

Member Function Documentation

bool TrikI2c::connect ( const QString &  devicePath,
int  deviceId 
)
overridevirtual

Establish connection with MSP over I2C bus.

Implements trikHal::MspI2cInterface.

void TrikI2c::disconnect ( )
overridevirtual

Disconnect from MSP.

Implements trikHal::MspI2cInterface.

int TrikI2c::read ( const QByteArray &  data)
overridevirtual

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

Implements trikHal::MspI2cInterface.

void TrikI2c::send ( const QByteArray &  data)
overridevirtual

Send data to a device.

Implements trikHal::MspI2cInterface.


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