luohui2320@gmail.com 55460652d3 ADD I2C driver framework and I2C gpio driver
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2128 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-05-22 17:32:32 +00:00

28 lines
523 B
C

#ifndef __I2C_DEV_H__
#define __I2C_DEV_H__
#include <rtthread.h>
#ifdef __cplusplus
extern "C" {
#endif
#define RT_I2C_DEV_CTRL_10BIT 0x20
#define RT_I2C_DEV_CTRL_ADDR 0x21
#define RT_I2C_DEV_CTRL_TIMEOUT 0x22
#define RT_I2C_DEV_CTRL_RW 0x23
struct rt_i2c_priv_data {
struct rt_i2c_msg *msgs;
rt_size_t number;
};
rt_err_t rt_i2c_bus_device_init(struct rt_i2c_bus* bus, const char* name);
rt_err_t rt_i2c_bus_device_exit(struct rt_i2c_bus* bus);
#ifdef __cplusplus
}
#endif
#endif