Updated comments

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@410 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-12-18 15:05:26 +00:00
parent 0fb4fa7deb
commit 15d02bfa4f

View File

@@ -60,10 +60,59 @@ struct IODevice
// Function declarations // Function declarations
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** ----------------------------------------------------------------------------
* IODevice_construct
* Constructor for a new IO Device
*
* @param self IO Device instance to create
* @param read Pointer to read function
* @param write Pointer to write function
*
* @return ErrorStatus SUCCESS if construction as successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus IODevice_construct (struct IODevice* self, ReadFunction read, WriteFunction write); extern ErrorStatus IODevice_construct (struct IODevice* self, ReadFunction read, WriteFunction write);
/** ----------------------------------------------------------------------------
* IODevice_write
* Writes a character buffer to IO Device
*
* @param self IO Device instance to create
* @param buffer The character string to write to device
* @param length length (in number of bytes) of buffer
*
* @return ErrorStatus SUCCESS if construction as successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus IODevice_write(const struct IODevice* self, const char* buffer, size_t length); extern ErrorStatus IODevice_write(const struct IODevice* self, const char* buffer, size_t length);
/** ----------------------------------------------------------------------------
* IODevice_read
* Reads from IO Device
*
* @param self IO Device instance to create
* @param buffer Pointer to location where read data is
* written to
* @param length length (in number of bytes) of the read
* request
* @param actualLength actual length that has been read. Can
* differ from argument length, but can only
* be smaller or equal.
*
* @return ErrorStatus SUCCESS if construction as successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus IODevice_read(const struct IODevice* self, char* buffer, size_t length, size_t* actualLength); extern ErrorStatus IODevice_read(const struct IODevice* self, char* buffer, size_t length, size_t* actualLength);