RTEMS
5.1
|
Inter-Integrated Circuit (I2C) Driver API. More...
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
#include <rtems.h>
#include <rtems/seterr.h>
#include <rtems/thread.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
Go to the source code of this file.
Data Structures | |
struct | i2c_bus |
I2C bus control. More... | |
struct | i2c_dev |
I2C slave device control. More... | |
Macros | |
#define | I2C_BUS_CLOCK_DEFAULT 100000 |
Default I2C bus clock in Hz. | |
#define | I2C_DEV_IO_CONTROL 0x900 |
Base number for device IO control commands. | |
I2C IO Control Commands | |
#define | I2C_BUS_OBTAIN 0x800 |
Obtains the bus. More... | |
#define | I2C_BUS_RELEASE 0x801 |
Releases the bus. More... | |
#define | I2C_BUS_GET_CONTROL 0x802 |
Gets the bus control. More... | |
#define | I2C_BUS_SET_CLOCK 0x803 |
Sets the bus clock in Hz. More... | |
Typedefs | |
typedef struct i2c_msg | i2c_msg |
typedef struct i2c_bus | i2c_bus |
typedef struct i2c_dev | i2c_dev |
typedef struct i2c_rdwr_ioctl_data | i2c_rdwr_ioctl_data |
Functions | |
int | i2c_bus_init (i2c_bus *bus) |
Initializes a bus control. More... | |
i2c_bus * | i2c_bus_alloc_and_init (size_t size) |
Allocates a bus control from the heap and initializes it. More... | |
void | i2c_bus_destroy (i2c_bus *bus) |
Destroys a bus control. More... | |
void | i2c_bus_destroy_and_free (i2c_bus *bus) |
Destroys a bus control and frees its memory. More... | |
int | i2c_bus_register (i2c_bus *bus, const char *bus_path) |
Registers a bus control. More... | |
void | i2c_bus_obtain (i2c_bus *bus) |
Obtains the bus. More... | |
void | i2c_bus_release (i2c_bus *bus) |
Releases the bus. More... | |
int | i2c_bus_transfer (i2c_bus *bus, i2c_msg *msgs, uint32_t msg_count) |
Transfers I2C messages. More... | |
int | i2c_dev_init (i2c_dev *dev, const char *bus_path, uint16_t address) |
Initializes a device control. More... | |
i2c_dev * | i2c_dev_alloc_and_init (size_t size, const char *bus_path, uint16_t address) |
Allocates a device control from the heap and initializes it. More... | |
void | i2c_dev_destroy (i2c_dev *dev) |
Destroys a device control. More... | |
void | i2c_dev_destroy_and_free (i2c_dev *dev) |
Destroys a device control and frees its memory. More... | |
int | i2c_dev_register (i2c_dev *dev, const char *dev_path) |
Registers a device control. More... | |
Inter-Integrated Circuit (I2C) Driver API.