XPoint 0.1.0
Hardware-agnostic crosspoint matrix routing library
Loading...
Searching...
No Matches
WireI2C.h
Go to the documentation of this file.
1// SPDX-License-Identifier: AGPL-3.0-only
2// Copyright (c) 2026 Douglas Quigg (dstroy0) <dquigg123@gmail.com>
3// https://github.com/dstroy0/XPoint
4
17#ifndef WIRE_I2C_H
18#define WIRE_I2C_H
19
20#include "I2CInterface.h"
21
22#if defined(ARDUINO)
23#include <Wire.h>
24#endif
25
36class WireI2C : public I2CInterface
37{
38 public:
40 {
41 }
42
48 void begin() override;
49
60 void writeRegister(uint8_t addr, uint8_t reg, uint8_t val) override;
61};
62
63#endif // WIRE_I2C_H
Minimal abstract I2C interface consumed by MCP23017Driver.
Abstract I2C bus interface.
Definition I2CInterface.h:28
I2CInterface implementation that delegates to the Arduino Wire library.
Definition WireI2C.h:37
void writeRegister(uint8_t addr, uint8_t reg, uint8_t val) override
Write val to register reg on device at 7-bit address addr.
Definition WireI2C.cpp:14
WireI2C()
Definition WireI2C.h:39
void begin() override
Initialize the I2C bus by calling Wire.begin().
Definition WireI2C.cpp:9