Going on with structure

Added observer/observable for RTC

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@251 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-12 20:53:05 +00:00
parent 54b6afe5a3
commit c323bfd04e
23 changed files with 1067 additions and 513 deletions

View File

@@ -0,0 +1,94 @@
// -----------------------------------------------------------------------------
/// @file hsb-mrts.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 hsb-mrts.c
/// @ingroup {group_name}
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include <string.h>
#include "hsb-mrts.h"
#include "Display.h"
#include "platform.h"
#include "PCBA.h"
#include "Version.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Type definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// File-scope variables
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Function definitions
// -----------------------------------------------------------------------------
ErrorStatus hsb_generateStartScreen(struct Display* Display)
{
ErrorStatus returnValue = SUCCESS;
if (returnValue == SUCCESS)
{
returnValue = Display_write(mainDisplay, pcba->name, strlen(pcba->name), 1, 1);
}
else
{
returnValue = ERROR;
}
if (returnValue == SUCCESS)
{
char buffer[20];
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "SW V. %d.%d.%d.%d", Version_getInstance()->major,
Version_getInstance()->minor,
Version_getInstance()->branch,
Version_getInstance()->patch);
Display_write(mainDisplay, buffer, strlen(buffer), 3, 4);
}
else
{
returnValue = ERROR;
}
return returnValue;
}