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
This commit is contained in:
mmi
2017-10-17 15:23:56 +00:00
parent e201de0d97
commit 088ce81dc7
17 changed files with 883 additions and 161 deletions

View File

@@ -0,0 +1,89 @@
// -----------------------------------------------------------------------------
/// @file Error.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 Error.c
/// @ingroup {group_name}
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include "Error.h"
#include "platform.h"
#include "Logger.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Type definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// File-scope variables
// -----------------------------------------------------------------------------
static struct Observable observable;
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Function definitions
// -----------------------------------------------------------------------------
ErrorStatus Error_construct(void)
{
Observable_construct(&observable);
return SUCCESS;
}
struct Observable* Error_getObservable(void)
{
return &observable;
}
void Error_postError(T_ErrorCode errorCode)
{
LOGGER_ERROR(mainLog, "ERROR POSTED WITH CODE %d", errorCode);
Observable_notifyObservers(&observable, (const void* const)errorCode);
}
void Error_postErrorFromISR(T_ErrorCode errorCode)
{
portBASE_TYPE higherPriorityTaskWoken = pdFALSE;
LOGGER_ERROR_ISR(mainLog, "ERROR POSTED FROM ISR");
Observable_notifyObservers(&observable, (const void* const)errorCode);
portEND_SWITCHING_ISR(higherPriorityTaskWoken);
}