- cachedStorage is functional - Presets can be loaded from FLASH - CRC32 added and applied - Presets with corrputed data will be replaced by default preset Next: Preset update functionality from menu git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@269 05563f52-14a8-4384-a975-3d1654cca0fa
121 lines
3.8 KiB
C
121 lines
3.8 KiB
C
// -----------------------------------------------------------------------------
|
|
/// @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
|
|
// -----------------------------------------------------------------------------
|
|
|
|
/// @defgroup {group_name} {group_description}
|
|
/// Description
|
|
|
|
/// @file RepairPresets.h
|
|
/// @ingroup {group_name}
|
|
|
|
#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 CachedStorage* presetStorage, 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 const struct RepairPreset*
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern const struct RepairPreset* RepairPresets_getPreset(unsigned int index);
|
|
|
|
|
|
|
|
#endif /* REPAIRPRESETS_H_ */
|