Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc/repairMenu.h
dvl e3a3273e81 More doxygen documentation
git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@421 05563f52-14a8-4384-a975-3d1654cca0fa
2018-01-11 15:38:56 +00:00

184 lines
5.3 KiB
C

// -----------------------------------------------------------------------------
/// @file repairMenu.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
// -----------------------------------------------------------------------------
/**
* repairMenu implementation
* \defgroup repairMenu Package repairMenu
* \ingroup hsb-mrts
* @{
*/
#ifndef INC_REPAIRMENU_H_
#define INC_REPAIRMENU_H_
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include <stdbool.h>
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include "stm32f10x.h"
#include "Error.h"
#include "MenuCore.h"
#include "RepairPreset.h"
#include "repairProcess.h"
#include "CachedStorage.h"
#include "Interlock.h"
#include "keypadMatrix.h"
#include "Observable.h"
#include "rtc.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Type definitions.
// -----------------------------------------------------------------------------
struct RepairMenu
{
bool initialized;
struct MemoryDevice* memoryDevice;
struct CachedStorage presetStorage;
SemaphoreHandle_t repairScreenUpdateSemaphore;
const struct RepairPreset* repairPreset;
struct RepairProcessParameters rpParameters;
Observer observer;
struct MenuCore* menuCore;
};
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
/** ----------------------------------------------------------------------------
* repairMenu_construct
* Description of function
*
* @param self
* @param display
* @param keyboardDevice
* @param taskPriority
* @param stackSize
* @param repairScreenUpdateObserver
*
* @return ErrorStatus
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus repairMenu_construct(struct RepairMenu* self, struct MenuCore* menuCore, struct MemoryDevice* memoryDevice, Observer repairScreenUpdateObserver);
/** ----------------------------------------------------------------------------
* repairMenu_destruct
* Destructor for self
*
* @param self
*
* @return void
*
* @todo
* -----------------------------------------------------------------------------
*/
extern void repairMenu_destruct(struct RepairMenu* self);
/** ----------------------------------------------------------------------------
* repairMenu_feedSecondsCounter
* Feeds the seconds counter of the repair process.
* The process is designed to be run every second, so this feed function should
* be called every second.
*
* @param self The repair menu object
*
* @return void
*
* @todo
* -----------------------------------------------------------------------------
*/
extern void repairMenu_feedSecondsCounter(struct RepairMenu* self);
/** ----------------------------------------------------------------------------
* repairMenu_feedSecondsCounterFromISR
* Feeds the seconds counter of the repair process.
* This function should be called in an ISR context
* The process is designed to be run every second, so this feed function should
* be called every second.
*
* @param self The repair menu object
*
* @return void
*
* @todo
* -----------------------------------------------------------------------------
*/
extern void repairMenu_feedSecondsCounterFromISR(struct RepairMenu* self);
extern void repairMenu_interlockWarning(struct RepairMenu* self, T_INTERLOCK_ID interlockID);
/** ----------------------------------------------------------------------------
* repairMenu_interlockFailed
* Interlock verification failed
*
* @param self The repair menu object
* @param interlockID 0 for common interlock
* !0 for the tesla interlock
*
* @return void
*
* @todo
* -----------------------------------------------------------------------------
*/
extern void repairMenu_interlockFailed(struct RepairMenu* self, T_INTERLOCK_ID interlockID);
extern void repairMenu_powerLossDetected(struct RepairMenu* self);
extern void repairMenu_processFailed(struct RepairMenu* self);
extern void repairMenu_printCRCFailure(struct RepairMenu* self, T_ErrorCode errorCode);
extern void repairMenu_menuStateHandle(struct MenuCore* menuCore);
extern void repairMenu_createMenuEntries(struct MenuCore* menuCore);
#endif /* INC_REPAIRMENU_H_ */
/** @} */