123
Fork of LG by
Diff: DeviceISACS.h
- Revision:
- 167:bedc0a9d559a
- Parent:
- 166:c3c0b8a90d81
- Child:
- 173:7f938afb0447
diff -r c3c0b8a90d81 -r bedc0a9d559a DeviceISACS.h --- a/DeviceISACS.h Sun May 22 18:59:20 2016 +0000 +++ b/DeviceISACS.h Sun Jun 05 11:03:33 2016 +0000 @@ -9,68 +9,58 @@ // output(voltage - code - DAC - Amplifier - control unit - hfo) //Information signal amplitude control system input ( = ADC - low pass filter - code - voltage) typedefs -typedef struct _DeviceISACSInputInterpolatorSettings { +typedef struct _DeviceISACSInputTransferFunction { uint32_t points; //Number of actual control points (up to 16) int32_t voltage[16]; //Output voltage control points in signed 16.16 fixed point format int32_t code[16]; //DAC code control points -} DeviceISACSInputInterpolatorSettings; +} DeviceISACSInputTransferFunction; -typedef struct _DeviceISACSInputInterpolator { - DeviceISACSInputInterpolatorSettings settings; -} DeviceISACSInputInterpolator; - -typedef struct _DeviceISACSInput { +typedef struct _DeviceISACSInputSettings { int32_t voltage; int32_t sum; int32_t average; - DeviceISACSInputInterpolator interpolator; - //DeviceISACSFilter filter; + DeviceISACSInputTransferFunction transfer; +} DeviceISACSInputSettings; + +typedef struct _DeviceISACSInputState { + int32_t voltage; + int32_t sum; + int32_t average; +} DeviceISACSInputState; + +typedef struct _DeviceISACSInput { + DeviceISACSInputSettings settings; + DeviceISACSInputState state; } DeviceISACSInput; //Information signal amplitude control system output ( = DAC + amplifier + control unit + hfo) typedefs -typedef struct _DeviceISACSOutputInterpolatorSettings { +typedef struct _DeviceISACSOutputTransferFunction { uint32_t points; //Number of actual control points (up to 16) int32_t voltage[16]; //Output voltage control points in signed 16.16 fixed point format int32_t code[16]; //DAC code control points -} DeviceISACSOutputInterpolatorSettings; +} DeviceISACSOutputTransferFunction; -typedef struct _DeviceISACSOutputInterpolator { - DeviceISACSOutputInterpolatorSettings settings; -} DeviceISACSOutputInterpolator; +typedef struct _DeviceISACSOutputStart { + uint32_t voltage; //Output voltage +} DeviceISACSOutputStart; -/* -typedef struct _DeviceISACSOutputConditionSettings { - int32_t voltage; //Output voltage in signed 16.16 fixed point format -} DeviceISACSOutputConditionSettings; +typedef struct _DeviceISACSOutputReset { + uint32_t voltage; //Output voltage +} DeviceISACSOutputReset; typedef struct _DeviceISACSOutputSettings { - DeviceISACSOutputInterpolatorSettings interpolator; - DeviceISACSOutputConditionSettings start; - DeviceISACSOutputConditionSettings reset; + DeviceISACSOutputTransferFunction transfer; + DeviceISACSOutputStart start; + DeviceISACSOutputReset reset; } DeviceISACSOutputSettings; -*/ - -typedef struct _DeviceISACSOutputStartSettings { - uint32_t voltage; //Output voltage -} DeviceISACSOutputStartSettings; -typedef struct _DeviceISACSOutputStart { - DeviceISACSOutputStartSettings settings; -} DeviceISACSOutputStart; - -typedef struct _DeviceISACSOutputResetSettings { - uint32_t voltage; //Output voltage -} DeviceISACSOutputResetSettings; - -typedef struct _DeviceISACSOutputReset { - DeviceISACSOutputResetSettings settings; -} DeviceISACSOutputReset; +typedef struct _DeviceISACSOutputState { + int32_t voltage; //Output value - constant for measurement cycle +} DeviceISACSOutputState; typedef struct _DeviceISACSOutput { - int32_t voltage; //Output value - constant for measurement cycle - DeviceISACSOutputInterpolator interpolator; - DeviceISACSOutputStart start; - DeviceISACSOutputReset reset; + DeviceISACSOutputSettings settings; + DeviceISACSOutputState state; } DeviceISACSOutput; //Information signal amplitude control system regulator typedefs @@ -110,18 +100,17 @@ } DeviceISACS; //Information signal amplitude stabilizer functions -void InitISACSPotentiometersWithDefaults(void); -void InitISACSPotentiometers(void); - -void InitISACSOutputWithDefaults(void); -void InitISACSOutput(void); +void InitISACSOutputDefaultSettings(void); +void InitISACSOutputState(void); +void DeviceStartISACSOutput(void); -void InitISACSRegulatorWithDefaults(void); -void InitISACSRegulator(void); +void InitISACSRegulatorDefaultSettings(void); +void InitISACSRegulatorState(void); +void DeviceStartISACSRegulator(void); -void InitISACSWithDefaults(void); -void InitISACS(void); -void StartISACS(void); +void InitISACSDefaultSettings(void); +void InitISACSState(void); +void DeviceStartISACS(void); void isacsProcess(void);