// ----------------------------------------------------------------------------- /// @file RepairPresets.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 // ----------------------------------------------------------------------------- /** * %RepairPresets implementation * \defgroup RepairPresets Package RepairPresets * \ingroup hsb-mrts * @{ */ #ifndef REPAIRPRESETS_H_ #define REPAIRPRESETS_H_ // ----------------------------------------------------------------------------- // Include files // ----------------------------------------------------------------------------- #include "stm32f10x.h" #include "RepairPreset.h" #include "CachedStorage.h" // ----------------------------------------------------------------------------- // Constant and macro definitions // ----------------------------------------------------------------------------- #define REPAIR_PRESETS_NUMBER_OF_PRESETS (9) // ----------------------------------------------------------------------------- // Type definitions. // ----------------------------------------------------------------------------- typedef enum { REPAIR_PRESETS_ANODE, REPAIR_PRESETS_CATHODE, REPAIR_PRESETS_MCP, REPAIR_PRESETS_TESLA, }REPAIR_PRESETS_ID; // ----------------------------------------------------------------------------- // Function declarations // ----------------------------------------------------------------------------- /** ---------------------------------------------------------------------------- * RepairPresets_construct * Constructor for repair presets * * @return ErrorStatus * * @todo * ----------------------------------------------------------------------------- */ extern ErrorStatus RepairPresets_construct(struct MemoryDevice* memoryDevice); /** ---------------------------------------------------------------------------- * RepairPresets_destruct * Destructor for repair presets * * @return void * * @todo * ----------------------------------------------------------------------------- */ extern void RepairPresets_destruct(void); /** ---------------------------------------------------------------------------- * RepairPresets_loadPresets * Loads a new set of presets into the cached storage * Prior to loading, any previously loaded presets will be unloaded * automatically * * @param presetID Identifier of the set of presets * * @return ErrorStatus SUCCESS if loading was successful * ERROR otherwise * * @todo * ----------------------------------------------------------------------------- */ extern ErrorStatus RepairPresets_loadPresets(REPAIR_PRESETS_ID presetID); /** ---------------------------------------------------------------------------- * RepairPresets_getPreset * Returns a pointer to a specific repair preset * * @param index Index of the repair preset to return * must be between 1 and * REPAIR_PRESETS_NUMBER_OF_PRESETS * * @return struct RepairPreset* * * @todo * ----------------------------------------------------------------------------- */ extern struct RepairPreset* RepairPresets_getPreset(unsigned int index); extern ErrorStatus RepairPresets_writePreset(struct RepairPreset* preset); /** ---------------------------------------------------------------------------- * RepairPresets_savePreset * Description of function * * @return void * * @todo * ----------------------------------------------------------------------------- */ extern void RepairPresets_savePresets(void); #endif /* REPAIRPRESETS_H_ */ /** @} */