drv_i2c.h 748 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * File : drv_i2c.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2009, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2018-03-24 LaiYiKeTang the first version
  13. */
  14. #ifndef __DRVI2C_H__
  15. #define __DRVI2C_H__
  16. #include <rthw.h>
  17. #include <rtthread.h>
  18. #include <rtdevice.h>
  19. #include "board.h"
  20. struct rt1052_i2c_bus
  21. {
  22. struct rt_i2c_bus_device parent;
  23. LPI2C_Type *I2C;
  24. struct rt_i2c_msg *msg;
  25. rt_uint32_t msg_cnt;
  26. volatile rt_uint32_t msg_ptr;
  27. volatile rt_uint32_t dptr;
  28. char *device_name;
  29. };
  30. #endif