i2c_utils.h 472 B

12345678910111213141516171819
  1. #ifndef _I2C_UTILS_H_
  2. #define _I2C_UTILS_H_
  3. #include "luat_base.h"
  4. #include <stdlib.h>
  5. #define I2C_TOOLS_BUFFER_SIZE 64
  6. uint8_t strtonum(const char* str);
  7. void i2c_help(void);
  8. uint8_t i2c_init(const uint8_t i2c_id);
  9. uint8_t i2c_probe(char addr);
  10. uint8_t i2c_write(char addr, uint8_t* data, int len);
  11. uint8_t i2c_read(uint8_t addr, uint8_t reg, uint8_t* buffer, uint8_t len);
  12. void i2c_scan(void);
  13. void i2c_tools(const char * data,size_t len);
  14. #endif /*_I2C_UTILS_H_*/