Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/Platform/src/Version.c
mmi c613e64e8a 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
2017-10-04 09:06:16 +00:00

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;
}