Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/src/hsb-mrts.c
mmi 088ce81dc7 Most parts of the menu structure are functional.
Error handler added
Screens for warning, pause, FINISH etc yet to be added

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@255 05563f52-14a8-4384-a975-3d1654cca0fa
2017-10-17 15:23:56 +00:00

107 lines
3.1 KiB
C

// -----------------------------------------------------------------------------
/// @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 "Logger.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;
}
ErrorStatus hsb_solenoidLock (void)
{
return GPIO_setValue(solenoid, false);
}
ErrorStatus hsb_solenoidUnlock (void)
{
return GPIO_setValue(solenoid, true);
}