9 #ifndef _RTEMS_LIBI2C_H 10 #define _RTEMS_LIBI2C_H 78 extern int rtems_libi2c_initialize (
void);
86 rtems_device_major_number major,
87 rtems_device_minor_number minor,
92 rtems_device_major_number major,
93 rtems_device_minor_number minor,
98 rtems_device_major_number major,
99 rtems_device_minor_number minor,
104 rtems_device_major_number major,
105 rtems_device_minor_number minor,
110 rtems_device_major_number major,
111 rtems_device_minor_number minor,
116 rtems_device_major_number major,
117 rtems_device_minor_number minor,
140 #define RTEMS_LIBI2C_DRIVER_TABLE_ENTRY \ 142 initialization_entry: rtems_i2c_init, \ 143 open_entry: rtems_i2c_open, \ 144 close_entry: rtems_i2c_close, \ 145 read_entry: rtems_i2c_read, \ 146 write_entry: rtems_i2c_write, \ 147 control_entry: rtems_i2c_ioctl, \ 185 uint32_t addr,
int rw);
217 extern rtems_device_major_number rtems_libi2c_major;
219 #define RTEMS_LIBI2C_MAKE_MINOR(busno, i2caddr) \ 220 ((((busno)&((1<<3)-1))<<10) | ((i2caddr)&((1<<10)-1))) 317 unsigned bus,
unsigned i2caddr);
340 extern rtems_status_code rtems_libi2c_send_start (rtems_device_minor_number minor);
342 extern rtems_status_code rtems_libi2c_send_stop (rtems_device_minor_number minor);
345 rtems_libi2c_send_addr (rtems_device_minor_number minor,
int rw);
351 rtems_libi2c_read_bytes (rtems_device_minor_number minor,
352 unsigned char *bytes,
int nbytes);
355 rtems_libi2c_write_bytes (rtems_device_minor_number minor,
356 const unsigned char *bytes,
int nbytes);
360 rtems_libi2c_start_read_bytes (rtems_device_minor_number minor,
361 unsigned char *bytes,
366 rtems_libi2c_start_write_bytes (rtems_device_minor_number minor,
367 const unsigned char *bytes,
373 rtems_libi2c_ioctl (rtems_device_minor_number minor,
383 #define RTEMS_LIBI2C_IOCTL_READ_WRITE 1 396 #define RTEMS_LIBI2C_IOCTL_START_TFM_READ_WRITE 2 418 #define RTEMS_LIBI2C_IOCTL_SET_TFRMODE 3 432 #define RTEMS_LIBI2C_IOCTL_GET_DRV_T 4 451 #define RTEMS_LIBI2C_IOCTL_READ_WRITE_ASYNC 5 457 unsigned char *rd_buf;
458 const unsigned char *wr_buf;
465 uint8_t bits_per_char;
486 (
int ,
int ,
void * );
497 unsigned char *rd_buf;
498 const unsigned char *wr_buf;
IO command data for asynchronous read and write.
Definition: libi2c.h:496
void(* rtems_libi2c_read_write_done_t)(int, int, void *)
Notification function type for asynchronous read and write.
Definition: libi2c.h:486
rtems_status_code
Classic API Status.
Definition: status.h:43
Classic Input/Output Manager API.
unsigned size
Definition: tte.h:74