mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 15:47:48 +08:00
Added definitions for asynchronous read and write IO commands.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2008-09-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* libi2c/libi2c.h: Added definitions for asynchronous read and write IO
|
||||
commands.
|
||||
|
||||
2008-09-26 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
PR 1316/cpukit
|
||||
|
||||
@@ -414,6 +414,7 @@ rtems_libi2c_ioctl (rtems_device_minor_number minor,
|
||||
*/
|
||||
|
||||
#define RTEMS_LIBI2C_IOCTL_GET_DRV_T 4
|
||||
|
||||
/*
|
||||
* retval = rtems_libi2c_ioctl(rtems_device_minor_number minor,
|
||||
* RTEMS_LIBI2C_IOCTL_GET_DRV_T,
|
||||
@@ -424,6 +425,15 @@ rtems_libi2c_ioctl (rtems_device_minor_number minor,
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief IO control command for asynchronous read and write.
|
||||
*
|
||||
* @see rtems_libi2c_read_write_done_t and rtems_libi2c_read_write_async_t.
|
||||
*
|
||||
* @warning This is work in progress!
|
||||
*/
|
||||
#define RTEMS_LIBI2C_IOCTL_READ_WRITE_ASYNC 5
|
||||
|
||||
/*
|
||||
* argument data structures for IOCTLs defined above
|
||||
*/
|
||||
@@ -448,6 +458,32 @@ typedef struct {
|
||||
rtems_libi2c_read_write_t rd_wr;
|
||||
} rtems_libi2c_tfm_read_write_t;
|
||||
|
||||
/**
|
||||
* @brief Notification function type for asynchronous read and write.
|
||||
*
|
||||
* @see RTEMS_LIBI2C_IOCTL_READ_WRITE_ASYNC and
|
||||
* rtems_libi2c_read_write_async_t.
|
||||
*
|
||||
* @warning This is work in progress!
|
||||
*/
|
||||
typedef void (*rtems_libi2c_read_write_done_t) \
|
||||
( int /* return value */, int /* nbytes */, void * /* arg */);
|
||||
|
||||
/**
|
||||
* @brief IO command data for asynchronous read and write.
|
||||
*
|
||||
* @see RTEMS_LIBI2C_IOCTL_READ_WRITE_ASYNC and
|
||||
* rtems_libi2c_read_write_done_t.
|
||||
*
|
||||
* @warning This is work in progress!
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned char *rd_buf;
|
||||
const unsigned char *wr_buf;
|
||||
int byte_cnt;
|
||||
rtems_libi2c_read_write_done_t done;
|
||||
void *arg;
|
||||
} rtems_libi2c_read_write_async_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user