You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
925 B
45 lines
925 B
#include "i2c.hpp"
|
|
|
|
|
|
I2C::I2C():i2cPimpl(new i2cImpl()){}
|
|
|
|
I2C::~I2C(){}
|
|
|
|
uint8_t I2C::readByte(const uint8_t& address, const uint8_t& reg)
|
|
{
|
|
return i2cPimpl->readByte(address,reg);
|
|
}
|
|
#if 0
|
|
uint16_t I2C::readWord(const uint8_t& address, const uint8_t& reg)
|
|
{
|
|
return i2cPimpl->readWord(address,reg);
|
|
}
|
|
|
|
uint8_t I2C::writeByte(const uint8_t& address, const uint8_t& data)
|
|
{
|
|
return i2cPimpl->writeByte(address,data);
|
|
}
|
|
|
|
uint8_t I2C::writeWord(const uint8_t& address, const uint8_t& reg, const uint8_t& data)
|
|
{
|
|
return i2cPimpl->writeWord(address,reg,data);
|
|
}
|
|
|
|
void I2C::writeBuffer(const uint8_t& address, const uint8_t* buffer, uint8_t len)
|
|
{
|
|
return i2cPimpl->writeBuffer(address,buffer,len);
|
|
}
|
|
|
|
void I2C::readBuffer(const uint8_t& address, const uint8_t* buffer, uint8_t len)
|
|
{
|
|
return i2cPimpl->readBuffer(address,buffer,len);
|
|
}
|
|
|
|
void I2C::throwError(I2C::errors errNo)
|
|
{
|
|
i2cPimpl->throwError(errNo);
|
|
}
|
|
|
|
#endif
|
|
|