#pragma once #ifndef _I2C_H_ #define _I2C_H_ /* Includes */ #include "main.h" /* Exported typedefs */ /** @brief I2C return Status */ typedef enum t_i2c_status { I2C_Ret_OK = 0, I2C_Ret_NACK, I2C_Ret_Bsy, I2C_Ret_Tout, I2C_Ret_Err } i2c_status_t; /* Exported function prototypes */ i2c_status_t user_i2c_read(uint8_t id, uint8_t reg_addr, uint8_t *data, uint16_t len); i2c_status_t user_i2c_write(uint8_t id, uint8_t reg_addr, uint8_t *data, uint16_t len); #endif /* _I2C_H_ */