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
86 lines
2.6 KiB
C
86 lines
2.6 KiB
C
// -----------------------------------------------------------------------------
|
|
/// @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;
|
|
}
|