i2c_dev.h 555 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __I2C_DEV_H__
  2. #define __I2C_DEV_H__
  3. #include <rtthread.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #define RT_I2C_DEV_CTRL_10BIT 0x20
  8. #define RT_I2C_DEV_CTRL_ADDR 0x21
  9. #define RT_I2C_DEV_CTRL_TIMEOUT 0x22
  10. #define RT_I2C_DEV_CTRL_RW 0x23
  11. struct rt_i2c_priv_data
  12. {
  13. struct rt_i2c_msg *msgs;
  14. rt_size_t number;
  15. };
  16. rt_err_t rt_i2c_bus_device_device_init(struct rt_i2c_bus_device* bus,
  17. const char* name);
  18. #ifdef __cplusplus
  19. }
  20. #endif
  21. #endif