? io/pipe ? io/pty Index: io/common/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/io/common/current/ChangeLog,v retrieving revision 1.25 diff -u -r1.25 ChangeLog --- io/common/current/ChangeLog 13 Sep 2005 13:36:13 -0000 1.25 +++ io/common/current/ChangeLog 2 Dec 2005 19:48:51 -0000 @@ -1,3 +1,9 @@ +2005-12-02 Andrew Lunn + + * src/iosys.c: + * include/devtab.h: Add comments that bread/bwrite takes there + parameters in blocks, not bytes. + 2005-09-11 Uwe Kindler * include/config_keys.h Configuration keys for CAN driver added. Index: io/common/current/include/devtab.h =================================================================== RCS file: /cvs/ecos/ecos/packages/io/common/current/include/devtab.h,v retrieving revision 1.9 diff -u -r1.9 devtab.h --- io/common/current/include/devtab.h 23 May 2002 23:05:58 -0000 1.9 +++ io/common/current/include/devtab.h 2 Dec 2005 19:48:52 -0000 @@ -69,13 +69,13 @@ void *buf, cyg_uint32 *len); Cyg_ErrNo (*bwrite)(cyg_io_handle_t handle, - const void *buf, - cyg_uint32 *len, - cyg_uint32 pos); + const void *buf, + cyg_uint32 *len, // in blocks + cyg_uint32 pos); // in blocks Cyg_ErrNo (*bread)(cyg_io_handle_t handle, - void *buf, - cyg_uint32 *len, - cyg_uint32 pos); + void *buf, + cyg_uint32 *len, // in blocks + cyg_uint32 pos); // in blocks cyg_bool (*select)(cyg_io_handle_t handle, cyg_uint32 which, CYG_ADDRWORD info); @@ -130,6 +130,8 @@ _set_config, \ }; +// Note: _bwrite and _bread pass len and pos in terms of blocks, not +// bytes. #define BLOCK_DEVIO_TABLE(_l,_bwrite,_bread,_select,_get_config,_set_config) \ cyg_devio_table_t _l = { \ cyg_devio_cwrite, \ Index: io/common/current/src/iosys.c =================================================================== RCS file: /cvs/ecos/ecos/packages/io/common/current/src/iosys.c,v retrieving revision 1.8 diff -u -r1.8 iosys.c --- io/common/current/src/iosys.c 16 Apr 2004 03:33:40 -0000 1.8 +++ io/common/current/src/iosys.c 2 Dec 2005 19:48:52 -0000 @@ -198,6 +198,10 @@ return t->handlers->read(handle, buf, len); } +// +// 'write' blocks to a device. The len and the position are in terms +// of blocks, not bytes like the cyg_io_write. +// Cyg_ErrNo cyg_io_bwrite(cyg_io_handle_t handle, const void *buf, cyg_uint32 *len, cyg_uint32 pos) { @@ -215,9 +219,9 @@ } // -// 'read' data from a device. +// 'read' blocks from a device. The len and the position are in terms of +// blocks, not bytes like the cyg_io_read. // - Cyg_ErrNo cyg_io_bread(cyg_io_handle_t handle, void *buf, cyg_uint32 *len, cyg_uint32 pos) { Index: io/disk/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/io/disk/current/ChangeLog,v retrieving revision 1.2 diff -u -r1.2 ChangeLog --- io/disk/current/ChangeLog 1 Jul 2004 13:03:20 -0000 1.2 +++ io/disk/current/ChangeLog 2 Dec 2005 19:48:52 -0000 @@ -1,3 +1,8 @@ +2005-12-02 Andrew Lunn + + * src/disk.c: Add comments that bread/bwrite take the position and + len in terms of blocks, not bytes. + 2004-07-01 Savin Zlobec * src/disk.c: Index: io/disk/current/src/disk.c =================================================================== RCS file: /cvs/ecos/ecos/packages/io/disk/current/src/disk.c,v retrieving revision 1.2 diff -u -r1.2 disk.c --- io/disk/current/src/disk.c 1 Jul 2004 13:03:20 -0000 1.2 +++ io/disk/current/src/disk.c 2 Dec 2005 19:48:53 -0000 @@ -370,8 +370,8 @@ static Cyg_ErrNo disk_bread(cyg_io_handle_t handle, void *buf, - cyg_uint32 *len, - cyg_uint32 pos) + cyg_uint32 *len, // In blocks + cyg_uint32 pos) // In blocks { cyg_devtab_entry_t *t = (cyg_devtab_entry_t *) handle; disk_channel *chan = (disk_channel *) t->priv; @@ -428,8 +428,8 @@ static Cyg_ErrNo disk_bwrite(cyg_io_handle_t handle, const void *buf, - cyg_uint32 *len, - cyg_uint32 pos) + cyg_uint32 *len, // In blocks + cyg_uint32 pos) // In blocks { cyg_devtab_entry_t *t = (cyg_devtab_entry_t *) handle; disk_channel *chan = (disk_channel *) t->priv;