XPoint 0.1.0
Hardware-agnostic crosspoint matrix routing library
Loading...
Searching...
No Matches
I2CInterface.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
16#ifndef I2C_INTERFACE_H
17#define I2C_INTERFACE_H
18
19#include <stdint.h>
20
28{
29 public:
30 virtual ~I2CInterface()
31 {
32 }
33
40 virtual void begin()
41 {
42 }
43
51 virtual void writeRegister(uint8_t addr, uint8_t reg, uint8_t val) = 0;
52};
53
54#endif // I2C_INTERFACE_H
Abstract I2C bus interface.
Definition I2CInterface.h:28
virtual void begin()
Initialize the I2C bus.
Definition I2CInterface.h:40
virtual void writeRegister(uint8_t addr, uint8_t reg, uint8_t val)=0
Write one byte to a device register.
virtual ~I2CInterface()
Definition I2CInterface.h:30