- Added WARNING handler - put voltage calculations to dedicated module fixed last errors. Updated menu repair screen without ERROR from PID This is version 0.9.0.3, which is used for the first duration test Will also be tagged git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@272 05563f52-14a8-4384-a975-3d1654cca0fa
123 lines
3.4 KiB
C
123 lines
3.4 KiB
C
// -----------------------------------------------------------------------------
|
|
/// @file Error.h
|
|
/// @brief File 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) 2015 Micro-Key bv
|
|
// -----------------------------------------------------------------------------
|
|
|
|
/// @defgroup {group_name} {group_description}
|
|
/// Description
|
|
|
|
/// @file Error.h
|
|
/// @ingroup {group_name}
|
|
|
|
#ifndef ERROR_H_
|
|
#define ERROR_H_
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Include files
|
|
// -----------------------------------------------------------------------------
|
|
|
|
#include "stm32f10x.h"
|
|
|
|
#include "Observable.h"
|
|
|
|
#include "FreeRTOS.h"
|
|
#include "task.h"
|
|
// -----------------------------------------------------------------------------
|
|
// Constant and macro definitions
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Type definitions.
|
|
// -----------------------------------------------------------------------------
|
|
|
|
typedef enum
|
|
{
|
|
GPIO_FAIL,
|
|
INTERLOCK_COMMON_FAIL,
|
|
POWERENABLE_FAIL,
|
|
REPAIR_FAIL,
|
|
ERROR_CRC_PIN,
|
|
ERROR_CRC_PARAMETERS,
|
|
ERROR_CRC_PRESETS
|
|
} T_ErrorCode;
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Function declarations
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* Error_construct
|
|
* Constructs the error handler
|
|
*
|
|
* @return ErrorStatus SUCCESS if construction was successful
|
|
* ERROR otherwise
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern ErrorStatus Error_construct(void);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* Error_getObservable
|
|
* Returns the observable of the Error handler
|
|
*
|
|
* @return struct Observable* Observable of the ERROR handler
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern struct Observable* Error_getObservable(void);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* Error_postError
|
|
* Posts a new error
|
|
*
|
|
* @param errorCode ERROR CODE
|
|
*
|
|
* @return void
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern void Error_postError(T_ErrorCode errorCode);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* Error_postErrorFromISR
|
|
* Posts a new error from an ISR context
|
|
*
|
|
* @param errorCode ERROR CODE
|
|
*
|
|
* @return void
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern void Error_postErrorFromISR(T_ErrorCode errorCode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* ERROR_H_ */
|