Mercurial > ecos
comparison packages/io/common/current/include/devtab.h @ 2112:44d250ab3b3a
* src/iosys.c:
* include/devtab.h: Add comments that bread/bwrite takes there
parameters in blocks, not bytes.
| author | asl |
|---|---|
| date | Fri, 02 Dec 2005 20:03:52 +0000 |
| parents | d2c90368aeef |
| children | 74dbf4c3f2e1 |
comparison
equal
deleted
inserted
replaced
| 2111:0ad51d0b250b | 2112:44d250ab3b3a |
|---|---|
| 67 cyg_uint32 *len); | 67 cyg_uint32 *len); |
| 68 Cyg_ErrNo (*read)(cyg_io_handle_t handle, | 68 Cyg_ErrNo (*read)(cyg_io_handle_t handle, |
| 69 void *buf, | 69 void *buf, |
| 70 cyg_uint32 *len); | 70 cyg_uint32 *len); |
| 71 Cyg_ErrNo (*bwrite)(cyg_io_handle_t handle, | 71 Cyg_ErrNo (*bwrite)(cyg_io_handle_t handle, |
| 72 const void *buf, | 72 const void *buf, |
| 73 cyg_uint32 *len, | 73 cyg_uint32 *len, // in blocks |
| 74 cyg_uint32 pos); | 74 cyg_uint32 pos); // in blocks |
| 75 Cyg_ErrNo (*bread)(cyg_io_handle_t handle, | 75 Cyg_ErrNo (*bread)(cyg_io_handle_t handle, |
| 76 void *buf, | 76 void *buf, |
| 77 cyg_uint32 *len, | 77 cyg_uint32 *len, // in blocks |
| 78 cyg_uint32 pos); | 78 cyg_uint32 pos); // in blocks |
| 79 cyg_bool (*select)(cyg_io_handle_t handle, | 79 cyg_bool (*select)(cyg_io_handle_t handle, |
| 80 cyg_uint32 which, | 80 cyg_uint32 which, |
| 81 CYG_ADDRWORD info); | 81 CYG_ADDRWORD info); |
| 82 Cyg_ErrNo (*get_config)(cyg_io_handle_t handle, | 82 Cyg_ErrNo (*get_config)(cyg_io_handle_t handle, |
| 83 cyg_uint32 key, | 83 cyg_uint32 key, |
| 128 _select, \ | 128 _select, \ |
| 129 _get_config, \ | 129 _get_config, \ |
| 130 _set_config, \ | 130 _set_config, \ |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 // Note: _bwrite and _bread pass len and pos in terms of blocks, not | |
| 134 // bytes. | |
| 133 #define BLOCK_DEVIO_TABLE(_l,_bwrite,_bread,_select,_get_config,_set_config) \ | 135 #define BLOCK_DEVIO_TABLE(_l,_bwrite,_bread,_select,_get_config,_set_config) \ |
| 134 cyg_devio_table_t _l = { \ | 136 cyg_devio_table_t _l = { \ |
| 135 cyg_devio_cwrite, \ | 137 cyg_devio_cwrite, \ |
| 136 cyg_devio_cread, \ | 138 cyg_devio_cread, \ |
| 137 _bwrite, \ | 139 _bwrite, \ |
