XPoint 0.1.0
Hardware-agnostic crosspoint matrix routing library
Loading...
Searching...
No Matches
WireI2C Class Reference

I2CInterface implementation that delegates to the Arduino Wire library. More...

#include <WireI2C.h>

Inheritance diagram for WireI2C:
I2CInterface

Public Member Functions

 WireI2C ()
 
void begin () override
 Initialize the I2C bus by calling Wire.begin().
 
void writeRegister (uint8_t addr, uint8_t reg, uint8_t val) override
 Write val to register reg on device at 7-bit address addr.
 
- Public Member Functions inherited from I2CInterface
virtual ~I2CInterface ()
 

Detailed Description

I2CInterface implementation that delegates to the Arduino Wire library.

Create one instance per I2C bus and pass a pointer to MCP23017Driver.

WireI2C bus;
MCP23017Driver gpio(&bus, 0x20, myMapper);
XPointDriver implementation for the MCP23017 16-bit I2C GPIO expander.
Definition MCP23017Driver.h:40
I2CInterface implementation that delegates to the Arduino Wire library.
Definition WireI2C.h:37

Constructor & Destructor Documentation

◆ WireI2C()

WireI2C::WireI2C ( )
inline

Member Function Documentation

◆ begin()

void WireI2C::begin ( )
overridevirtual

Initialize the I2C bus by calling Wire.begin().

No-op on host builds.

Reimplemented from I2CInterface.

◆ writeRegister()

void WireI2C::writeRegister ( uint8_t  addr,
uint8_t  reg,
uint8_t  val 
)
overridevirtual

Write val to register reg on device at 7-bit address addr.

Sequence: beginTransmissionwrite(reg)write(val)endTransmission. No-op on host builds.

Parameters
[in]addr7-bit I2C device address.
[in]regRegister index.
[in]valByte to write.

Implements I2CInterface.


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