Fixed issue with external DAC handlign from repair process

repair process implemented. Simple regulation without feedback (must be addeed, yet)

HW validation menu functional but buggy (IOs not OK)

Added ClearLine functionality to displayDevice

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@244 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-09 15:29:23 +00:00
parent 0e69a81570
commit a73154a5e6
25 changed files with 1054 additions and 229 deletions

View File

@@ -32,8 +32,14 @@
// -----------------------------------------------------------------------------
#include <stdbool.h>
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include "stm32f10x.h"
#include "repairPreset.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
@@ -46,13 +52,25 @@
typedef enum
{
IDLE = 0,
SOFTSTART = 1,
VOLTAGE_HOLD = 2,
PAUSE = 3
PREPARE = 0,
SOFTSTART,
VOLTAGE_HOLD,
PAUSE,
FINISH_VERIFY,
FINISHED
} RepairState;
struct RepairProcessParameters
{
const struct AdcChannel* adcRow1;
const struct AdcChannel* adcRow2;
const struct AdcChannel* adcRow3;
const struct MAX5715_DAC* dacRow1;
const struct MAX5715_DAC* dacRow2;
const struct MAX5715_DAC* dacRow3;
};
struct RepairProcess
{
TaskHandle_t taskHandle;
@@ -63,6 +81,13 @@ struct RepairProcess
uint32_t secondsCounter;
RepairState currentState;
bool initialized;
struct RepairPreset* repairPreset;
const struct AdcChannel* adcRow1;
const struct AdcChannel* adcRow2;
const struct AdcChannel* adcRow3;
const struct MAX5715_DAC* dacRow1;
const struct MAX5715_DAC* dacRow2;
const struct MAX5715_DAC* dacRow3;
};
// -----------------------------------------------------------------------------
@@ -84,7 +109,7 @@ struct RepairProcess
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus repairProcess_construct(struct RepairProcess* self, int taskPriority, uint16_t stackSize);
extern ErrorStatus repairProcess_construct(struct RepairProcess* self, struct RepairProcessParameters* parameters, int taskPriority, uint16_t stackSize);
/** ----------------------------------------------------------------------------
@@ -119,4 +144,19 @@ extern void repairProcess_feedSecondsCounter(struct RepairProcess* self);
*/
extern void repairProcess_feedSecondsCounterFromISR(struct RepairProcess* self);
/** ----------------------------------------------------------------------------
* repairProcess_getRepairTime
* Returns the current active repair time in seconds.
*
* @param self
* @param repairTime
*
* @return ErrorStatus
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus repairProcess_getRepairTime(const struct RepairProcess* self, uint32_t* repairTime);
#endif /* REPAIRPROCESS_H_ */