From 15d02bfa4fd02dd627914bb6bc44a093abfda4de Mon Sep 17 00:00:00 2001 From: mmi Date: Mon, 18 Dec 2017 15:05:26 +0000 Subject: [PATCH] Updated comments git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@410 05563f52-14a8-4384-a975-3d1654cca0fa --- .../0 - Code/HAL/inc/IODevice.h | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/inc/IODevice.h b/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/inc/IODevice.h index a3f552b..48dcc07 100644 --- a/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/inc/IODevice.h +++ b/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/inc/IODevice.h @@ -60,10 +60,59 @@ struct IODevice // 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); + +/** ---------------------------------------------------------------------------- + * 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); + +/** ---------------------------------------------------------------------------- + * 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);