1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#ifndef I2C_H #define I2C_H #include <stdint.h> class I2C { public: void enable(); void write_reg(uint8_t addr, uint8_t reg, uint8_t data); void read_reg(uint8_t addr, uint8_t reg, uint8_t len, uint8_t* buf); }; #endif