RTEMS  5.1
Files | Data Structures | Macros | Typedefs | Functions | Variables
Legacy I2C Library

Legacy I2C library. More...

Files

file  libi2c.h
 Legacy I2C Library.
 

Data Structures

struct  rtems_libi2c_bus_t_
 
struct  rtems_libi2c_bus_ops_
 
struct  rtems_libi2c_drv_t_
 
struct  rtems_libi2c_read_write_t
 
struct  rtems_libi2c_tfr_mode_t
 
struct  rtems_libi2c_tfm_read_write_t
 
struct  rtems_libi2c_read_write_async_t
 IO command data for asynchronous read and write. More...
 

Macros

#define RTEMS_LIBI2C_DRIVER_TABLE_ENTRY
 
#define RTEMS_LIBI2C_MAKE_MINOR(busno, i2caddr)   ((((busno)&((1<<3)-1))<<10) | ((i2caddr)&((1<<10)-1)))
 
#define RTEMS_LIBI2C_IOCTL_READ_WRITE   1
 
#define RTEMS_LIBI2C_IOCTL_START_TFM_READ_WRITE   2
 
#define RTEMS_LIBI2C_IOCTL_SET_TFRMODE   3
 
#define RTEMS_LIBI2C_IOCTL_GET_DRV_T   4
 
#define RTEMS_LIBI2C_IOCTL_READ_WRITE_ASYNC   5
 IO control command for asynchronous read and write. More...
 

Typedefs

typedef struct rtems_libi2c_bus_t_ rtems_libi2c_bus_t
 
typedef struct rtems_libi2c_bus_ops_ rtems_libi2c_bus_ops_t
 
typedef struct rtems_libi2c_drv_t_ rtems_libi2c_drv_t
 
typedef void(* rtems_libi2c_read_write_done_t) (int, int, void *)
 Notification function type for asynchronous read and write. More...
 

Functions

int rtems_libi2c_initialize (void)
 
rtems_status_code rtems_i2c_init (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
 
rtems_status_code rtems_i2c_open (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
 
rtems_status_code rtems_i2c_close (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
 
rtems_status_code rtems_i2c_read (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
 
rtems_status_code rtems_i2c_write (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
 
rtems_status_code rtems_i2c_ioctl (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
 
int rtems_libi2c_register_bus (const char *name, rtems_libi2c_bus_t *bus)
 
int rtems_libi2c_register_drv (const char *name, rtems_libi2c_drv_t *drvtbl, unsigned bus, unsigned i2caddr)
 
rtems_status_code rtems_libi2c_send_start (rtems_device_minor_number minor)
 
rtems_status_code rtems_libi2c_send_stop (rtems_device_minor_number minor)
 
rtems_status_code rtems_libi2c_send_addr (rtems_device_minor_number minor, int rw)
 
int rtems_libi2c_read_bytes (rtems_device_minor_number minor, unsigned char *bytes, int nbytes)
 
int rtems_libi2c_write_bytes (rtems_device_minor_number minor, const unsigned char *bytes, int nbytes)
 
int rtems_libi2c_start_read_bytes (rtems_device_minor_number minor, unsigned char *bytes, int nbytes)
 
int rtems_libi2c_start_write_bytes (rtems_device_minor_number minor, const unsigned char *bytes, int nbytes)
 
int rtems_libi2c_ioctl (rtems_device_minor_number minor, int cmd,...)
 

Variables

const rtems_driver_address_table rtems_libi2c_io_ops
 
rtems_device_major_number rtems_libi2c_major
 

Detailed Description

Legacy I2C library.

Macro Definition Documentation

◆ RTEMS_LIBI2C_DRIVER_TABLE_ENTRY

#define RTEMS_LIBI2C_DRIVER_TABLE_ENTRY
Value:
{ \
initialization_entry: rtems_i2c_init, \
open_entry: rtems_i2c_open, \
close_entry: rtems_i2c_close, \
read_entry: rtems_i2c_read, \
write_entry: rtems_i2c_write, \
control_entry: rtems_i2c_ioctl, \
}

◆ RTEMS_LIBI2C_IOCTL_READ_WRITE_ASYNC

#define RTEMS_LIBI2C_IOCTL_READ_WRITE_ASYNC   5

IO control command for asynchronous read and write.

See also
rtems_libi2c_read_write_done_t and rtems_libi2c_read_write_async_t.
Warning
This is work in progress!

Typedef Documentation

◆ rtems_libi2c_read_write_done_t

typedef void(* rtems_libi2c_read_write_done_t) (int, int, void *)

Notification function type for asynchronous read and write.

See also
RTEMS_LIBI2C_IOCTL_READ_WRITE_ASYNC and rtems_libi2c_read_write_async_t.
Warning
This is work in progress!