Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc/RepairPresets.h
mmi 17207a3a4b Fixed some major issues with RAM shortage. Also moved the cached storage to a MALLOC design instead of fixed memory usage. Using freertos porteds malloc and free required to move to HEAP4 to make sure memory does not get fragmented.
Resized nearly all task stacks

Also: 
- Menu fixes for insertion. Almost done, just need to fix the negative voltage insertion for mcp and cathode
- Added Device parameters, must be filled in

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@271 05563f52-14a8-4384-a975-3d1654cca0fa
2017-11-07 15:50:25 +00:00

136 lines
4.2 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 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_ */