drv_i2c.h 569 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-03-24 LaiYiKeTang the first version
  9. */
  10. #ifndef __DRVI2C_H__
  11. #define __DRVI2C_H__
  12. #include <rthw.h>
  13. #include <rtthread.h>
  14. #include <rtdevice.h>
  15. #include "board.h"
  16. struct rt1021_i2c_bus
  17. {
  18. struct rt_i2c_bus_device parent;
  19. LPI2C_Type *I2C;
  20. struct rt_i2c_msg *msg;
  21. rt_uint32_t msg_cnt;
  22. volatile rt_uint32_t msg_ptr;
  23. volatile rt_uint32_t dptr;
  24. char *device_name;
  25. };
  26. #endif