diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2008-09-30 10:00:50 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2008-09-30 10:00:50 +0000 |
commit | 11962263589bef8a420cb3b62052429f6678da73 (patch) | |
tree | 91a3e00d21f5b22a36c2858783cfc52a71da2b24 | |
parent | 2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-11962263589bef8a420cb3b62052429f6678da73.tar.bz2 |
Added definitions for asynchronous read and write IO commands.
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libi2c/libi2c.h | 36 |
2 files changed, 41 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index dc11dd912b..9d3a230d61 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -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 diff --git a/cpukit/libi2c/libi2c.h b/cpukit/libi2c/libi2c.h index 8e52ec3e3e..503706346d 100644 --- a/cpukit/libi2c/libi2c.h +++ b/cpukit/libi2c/libi2c.h @@ -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 } |