Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc/RepairPreset.h
dvl 15ab232e82 Doxygen update
git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@427 05563f52-14a8-4384-a975-3d1654cca0fa
2018-01-15 11:04:24 +00:00

133 lines
4.1 KiB
C

// -----------------------------------------------------------------------------
/// @file repairPreset.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
// -----------------------------------------------------------------------------
/**
* %RepairPreset implementation
* \defgroup RepairPreset Package RepairPreset
* \ingroup hsb-mrts
* @{
*/
#ifndef REPAIRPRESET_H_
#define REPAIRPRESET_H_
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include "stm32f10x.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
#define REPAIR_PRESET_MAX_STAGES (2)
#define REPAIR_PRESET_MAX_ONE_STAGE_PRESETS (6)
#define REPAIR_PRESET_MAX_TWO_STAGE_PRESETS (3)
// -----------------------------------------------------------------------------
// Type definitions.
// -----------------------------------------------------------------------------
struct RepairPresetParameters
{
int voltage;
int duration;
int softstartDuration;
};
struct RepairPreset
{
int presetNumber;
int numberOfStages;
struct RepairPresetParameters preset[REPAIR_PRESET_MAX_STAGES];
};
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
/** ----------------------------------------------------------------------------
* RepairPreset_generateDefaultPreset
* Generates a default preset
* Values that are used are:
* numberOfStages: 1
* softstart: 100 seconds
* Duration: 200 seconds
* Voltage: 0 Volts
* The voltage is chosen to support both positive and negative voltages
*
* @param self The repair preset object
* @param presetNumber the index of the preset
*
* @return ErrorStatus SUCCESS if generation was successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus RepairPreset_generateDefaultPreset(struct RepairPreset* self, unsigned int presetNumber);
/** ----------------------------------------------------------------------------
* RepairPreset_setSoftstartValue
* Description of function
*
* @param self
* @param value
* @return void
*
* @todo
* -----------------------------------------------------------------------------
*/
extern void RepairPreset_setSoftstartValue(struct RepairPresetParameters* self, unsigned int value);
/** ----------------------------------------------------------------------------
* RepairPreset_setSoftstartValue
* Description of function
*
* @param self
* @param value
* @return void
*
* @todo
* -----------------------------------------------------------------------------
*/
extern void RepairPreset_setDurationValue(struct RepairPresetParameters* self, unsigned int value);
/** ----------------------------------------------------------------------------
* RepairPreset_setSoftstartValue
* Description of function
*
* @param self
* @param value
* @return void
*
* @todo
* -----------------------------------------------------------------------------
*/
extern void RepairPreset_setVoltageValue(struct RepairPresetParameters* self, int value);
#endif /* REPAIRPRESET_H_ */
/** @} */