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 * 2012-04-25 weety first version 9 */ 10 11 #ifndef __I2C_DEV_H__ 12 #define __I2C_DEV_H__ 13 14 #include <rtthread.h> 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 #define RT_I2C_DEV_CTRL_10BIT 0x20 21 #define RT_I2C_DEV_CTRL_ADDR 0x21 22 #define RT_I2C_DEV_CTRL_TIMEOUT 0x22 23 #define RT_I2C_DEV_CTRL_RW 0x23 24 25 struct rt_i2c_priv_data 26 { 27 struct rt_i2c_msg *msgs; 28 rt_size_t number; 29 }; 30 31 rt_err_t rt_i2c_bus_device_device_init(struct rt_i2c_bus_device *bus, 32 const char *name); 33 34 #ifdef __cplusplus 35 } 36 #endif 37 38 #endif 39