9 #ifndef _RTEMS_LIBI2C_H 10 #define _RTEMS_LIBI2C_H 76 extern int rtems_libi2c_initialize (
void);
84 rtems_device_major_number major,
85 rtems_device_minor_number minor,
90 rtems_device_major_number major,
91 rtems_device_minor_number minor,
96 rtems_device_major_number major,
97 rtems_device_minor_number minor,
102 rtems_device_major_number major,
103 rtems_device_minor_number minor,
108 rtems_device_major_number major,
109 rtems_device_minor_number minor,
114 rtems_device_major_number major,
115 rtems_device_minor_number minor,
138 #define RTEMS_LIBI2C_DRIVER_TABLE_ENTRY \ 140 initialization_entry: rtems_i2c_init, \ 141 open_entry: rtems_i2c_open, \ 142 close_entry: rtems_i2c_close, \ 143 read_entry: rtems_i2c_read, \ 144 write_entry: rtems_i2c_write, \ 145 control_entry: rtems_i2c_ioctl, \ 183 uint32_t addr,
int rw);
215 extern rtems_device_major_number rtems_libi2c_major;
217 #define RTEMS_LIBI2C_MAKE_MINOR(busno, i2caddr) \ 218 ((((busno)&((1<<3)-1))<<10) | ((i2caddr)&((1<<10)-1))) 315 unsigned bus,
unsigned i2caddr);
338 extern rtems_status_code rtems_libi2c_send_start (rtems_device_minor_number minor);
340 extern rtems_status_code rtems_libi2c_send_stop (rtems_device_minor_number minor);
343 rtems_libi2c_send_addr (rtems_device_minor_number minor,
int rw);
349 rtems_libi2c_read_bytes (rtems_device_minor_number minor,
350 unsigned char *bytes,
int nbytes);
353 rtems_libi2c_write_bytes (rtems_device_minor_number minor,
354 const unsigned char *bytes,
int nbytes);
358 rtems_libi2c_start_read_bytes (rtems_device_minor_number minor,
359 unsigned char *bytes,
364 rtems_libi2c_start_write_bytes (rtems_device_minor_number minor,
365 const unsigned char *bytes,
371 rtems_libi2c_ioctl (rtems_device_minor_number minor,
381 #define RTEMS_LIBI2C_IOCTL_READ_WRITE 1 394 #define RTEMS_LIBI2C_IOCTL_START_TFM_READ_WRITE 2 416 #define RTEMS_LIBI2C_IOCTL_SET_TFRMODE 3 430 #define RTEMS_LIBI2C_IOCTL_GET_DRV_T 4 449 #define RTEMS_LIBI2C_IOCTL_READ_WRITE_ASYNC 5 455 unsigned char *rd_buf;
456 const unsigned char *wr_buf;
463 uint8_t bits_per_char;
484 (
int ,
int ,
void * );
495 unsigned char *rd_buf;
496 const unsigned char *wr_buf;
IO command data for asynchronous read and write.
Definition: libi2c.h:494
void(* rtems_libi2c_read_write_done_t)(int, int, void *)
Notification function type for asynchronous read and write.
Definition: libi2c.h:484
rtems_status_code
Classic API Status.
Definition: status.h:43
Classic Input/Output Manager API.
unsigned size
Definition: tte.h:74