/*
 * Created on: Jul 27, 2024
 */

#ifndef USER_SRC_I2C_H_
#define USER_SRC_I2C_H_



#include <stdint.h>



void i2c_init();

int8_t i2c_read_addr1b(uint8_t addr, uint8_t reg, uint8_t *data, uint8_t len);
int8_t i2c_write_addr1b(uint8_t addr, uint8_t reg, const uint8_t *data, uint8_t len);

uint8_t i2c_read_reg_8b(uint8_t addr, uint8_t reg);
void i2c_write_reg_8b(uint8_t addr, uint8_t reg, const uint8_t dat);

uint8_t i2c_addr_scan(uint8_t addr);



#endif /* USER_SRC_I2C_H_ */
