drv_sw_i2c.h 634 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2006-2024 RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2024-12-07 wumingzi first version
  9. */
  10. #ifndef __DRV_HW_I2C_H__
  11. #define __DRV_HW_I2C_H__
  12. #include <rtthread.h>
  13. #include <rtdevice.h>
  14. #include "sdkconfig.h"
  15. /* esp32c3 config class */
  16. struct esp32c3_soft_i2c_config
  17. {
  18. rt_uint8_t scl;
  19. rt_uint8_t sda;
  20. const char *bus_name;
  21. };
  22. /* esp32c3 i2c dirver class */
  23. struct esp32c3_i2c
  24. {
  25. struct rt_i2c_bit_ops ops;
  26. struct rt_i2c_bus_device i2c_bus;
  27. };
  28. int rt_hw_i2c_init(void);
  29. #endif /* __DRV_HW_I2C_H__ */