ADC debugged and functional now

Added Version interface

Added DisplayDevice to create an independent bridge between display app and specific display driver

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@228 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-04 09:06:16 +00:00
parent 802e9c64ca
commit c613e64e8a
24 changed files with 1147 additions and 231 deletions

View File

@@ -0,0 +1,85 @@
// -----------------------------------------------------------------------------
/// @file Version.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 Version.c
/// @ingroup {group_name}
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include "Version.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Type definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// File-scope variables
// -----------------------------------------------------------------------------
static struct Version* instance = NULL;
static struct Version thisVersion;
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
static ErrorStatus Version_construct(struct Version* self);
// -----------------------------------------------------------------------------
// Function definitions
// -----------------------------------------------------------------------------
struct Version* Version_getInstance(void)
{
ErrorStatus returnValue = SUCCESS;
if (instance == NULL)
{
instance = &thisVersion;
returnValue = Version_construct(instance);
if (returnValue != SUCCESS)
{
instance = NULL;
}
}
return instance;
}
static ErrorStatus Version_construct(struct Version* self)
{
ErrorStatus returnValue = SUCCESS;
self->major = RELEASE_MAJOR;
self->minor = RELEASE_MINOR;
self->branch = RELEASE_BRANCH;
self->patch = RELEASE_PATCH;
return returnValue;
}