XPoint 0.1.0
Hardware-agnostic crosspoint matrix routing library
Loading...
Searching...
No Matches
I2CInterface Class Referenceabstract

Abstract I2C bus interface. More...

#include <I2CInterface.h>

Inheritance diagram for I2CInterface:
WireI2C

Public Member Functions

virtual ~I2CInterface ()
 
virtual void begin ()
 Initialize the I2C bus.
 
virtual void writeRegister (uint8_t addr, uint8_t reg, uint8_t val)=0
 Write one byte to a device register.
 

Detailed Description

Abstract I2C bus interface.

Decouples MCP23017Driver from any specific I2C implementation so the same driver code compiles and tests on both Arduino targets and host machines.

Constructor & Destructor Documentation

◆ ~I2CInterface()

virtual I2CInterface::~I2CInterface ( )
inlinevirtual

Member Function Documentation

◆ begin()

virtual void I2CInterface::begin ( )
inlinevirtual

Initialize the I2C bus.

Default no-op: safe for mock objects or buses started elsewhere. WireI2C overrides this to call Wire.begin().

Reimplemented in WireI2C.

◆ writeRegister()

virtual void I2CInterface::writeRegister ( uint8_t  addr,
uint8_t  reg,
uint8_t  val 
)
pure virtual

Write one byte to a device register.

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

Implemented in WireI2C.


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