Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/Misc/src/IODevice.c
mmi 83cce4ba74 Updates on the IODevice structure.
Display and Logger fully functional.
Keypad task completed - yet to be tested

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@219 05563f52-14a8-4384-a975-3d1654cca0fa
2017-09-28 14:30:36 +00:00

79 lines
2.3 KiB
C

// -----------------------------------------------------------------------------
/// @file IODevice.c
/// @brief Description
// -----------------------------------------------------------------------------
// Micro-Key bv
// Industrieweg 28, 9804 TG Noordhorn
// Postbus 92, 9800 AB Zuidhorn
// The Netherlands
// Tel: +31 594 503020
// Fax: +31 594 505825
// Email: support@microkey.nl
// Web: www.microkey.nl
// -----------------------------------------------------------------------------
/// $Revision$
/// $Author$
/// $Date$
// (c) 2017 Micro-Key bv
// -----------------------------------------------------------------------------
/// @file IODevice.c
/// @ingroup {group_name}
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include "IODevice.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Type definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// File-scope variables
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Function definitions
// -----------------------------------------------------------------------------
ErrorStatus IODevice_construct (struct IODevice* self, ReadFunction read, WriteFunction write)
{
ErrorStatus returnValue = SUCCESS;
self->_write = write;
self->_read = read;
return returnValue;
}
ErrorStatus IODevice_write(const struct IODevice* self, const char* buffer, size_t length)
{
ErrorStatus returnValue = SUCCESS;
if (self->_write != NULL)
{
self->_write(self, buffer, length);
}
return returnValue;
}