/* Copyright 2022, Savanni D'Gerinel This file is part of Savanni's AVR library. This AVR library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This AVR library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this AVR library. If not, see . */ #ifndef __I2C_H__ #define __I2C_H__ #include typedef enum { i2c_ok, i2c_arbitration_lost, i2c_timeout, i2c_nak, } i2c_error_e; typedef struct { dio_t sda; dio_t scl; } i2c_bus_t; /* typedef struct { dio_t sda; dio_t scl; uint8_t addr; } i2c_client_t; */ void i2c_init(i2c_bus_t *); // void i2c_host_write(i2c_host_t *, uint8_t, uint8_t, size_t, i2c_error_e); #endif