Dmitry Kovalev / Mbed 2 deprecated LGfiltr

Dependencies:   mbed

Fork of LGstaandart by Dmitry Kovalev

Committer:
Diletant
Date:
Sun May 15 19:12:12 2016 +0000
Revision:
161:efd949e8d536
Parent:
156:e68ee0bcdcda
Child:
166:c3c0b8a90d81
Device & ... update. Not final!!!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Diletant 149:abbf7663d27d 1 #ifndef __DEVICE_PLCS_H__
Diletant 149:abbf7663d27d 2 #define __DEVICE_PLCS_H__
Diletant 149:abbf7663d27d 3
Diletant 161:efd949e8d536 4 //Path length control amplifier (DAC - amplifier - control unit - drive) typedefs
Diletant 156:e68ee0bcdcda 5 typedef struct _DevicePathLengthControlAmplifierSettings {
Diletant 156:e68ee0bcdcda 6 uint32_t reference; //Reference voltage
Diletant 156:e68ee0bcdcda 7 uint32_t gain; //Amplifier gain
Diletant 156:e68ee0bcdcda 8 } DevicePathLengthControlAmplifierSettings;
Diletant 156:e68ee0bcdcda 9
Diletant 156:e68ee0bcdcda 10 typedef struct _DevicePathLengthControlAmplifier {
Diletant 156:e68ee0bcdcda 11 DevicePathLengthControlAmplifierSettings settings;
Diletant 156:e68ee0bcdcda 12 } DevicePathLengthControlAmplifier;
Diletant 156:e68ee0bcdcda 13
Diletant 161:efd949e8d536 14 //Path length control reset typedefs
Diletant 161:efd949e8d536 15 typedef struct _DevicePathLengthControlResetDelaySettings {
Diletant 161:efd949e8d536 16 uint32_t center; //reset delay in mks for normal conditions
Diletant 161:efd949e8d536 17 uint32_t slope; //signed 16.16 format output voltage reset level correction per correction interval
Diletant 161:efd949e8d536 18 } DevicePathLengthControlResetDelaySettings;
Diletant 161:efd949e8d536 19
Diletant 161:efd949e8d536 20 typedef struct _DevicePathLengthControlResetLevelSettings {
Diletant 161:efd949e8d536 21 uint32_t center; //signed 16.16 format output voltage reset level
Diletant 161:efd949e8d536 22 uint32_t slope; //signed 16.16 format output voltage reset level correction per correction interval
Diletant 161:efd949e8d536 23 } DevicePathLengthControlResetLevelSettings;
Diletant 161:efd949e8d536 24
Diletant 161:efd949e8d536 25 typedef struct _DevicePathLengthControlResetConditionSettings {
Diletant 161:efd949e8d536 26 DevicePathLengthControlResetDelaySettings delay;
Diletant 161:efd949e8d536 27 DevicePathLengthControlResetLevelSettings level;
Diletant 161:efd949e8d536 28 } DevicePathLengthControlResetConditionSettings;
Diletant 161:efd949e8d536 29
Diletant 161:efd949e8d536 30 typedef struct _DevicePathLengthControlResetSettings {
Diletant 161:efd949e8d536 31 DevicePathLengthControlResetConditionSettings cooling;
Diletant 161:efd949e8d536 32 DevicePathLengthControlResetConditionSettings heating;
Diletant 161:efd949e8d536 33 } DevicePathLengthControlResetSettings;
Diletant 161:efd949e8d536 34
Diletant 161:efd949e8d536 35 typedef struct _DevicePathLengthControlResetState {
Diletant 161:efd949e8d536 36 uint32_t delay; //reset delay in mks
Diletant 161:efd949e8d536 37 uint32_t level; //signed 16.16 format output voltage reset level
Diletant 161:efd949e8d536 38 } DevicePathLengthControlResetState;
Diletant 161:efd949e8d536 39
Diletant 161:efd949e8d536 40 typedef struct _DevicePathLengthControlReset {
Diletant 161:efd949e8d536 41 DevicePathLengthControlResetSettings settings;
Diletant 161:efd949e8d536 42 DevicePathLengthControlResetState state;
Diletant 161:efd949e8d536 43 } DevicePathLengthControlReset;
Diletant 161:efd949e8d536 44
Diletant 161:efd949e8d536 45 //Path length control system modulator typedefs
Diletant 161:efd949e8d536 46 typedef struct _DevicePathLengthControlModulatorSettings {
Diletant 161:efd949e8d536 47 uint8_t enabled;
Diletant 161:efd949e8d536 48 } DevicePathLengthControlModulatorSettings;
Diletant 149:abbf7663d27d 49
Diletant 161:efd949e8d536 50 typedef struct _DevicePathLengthControlModulatorState {
Diletant 161:efd949e8d536 51 uint8_t enabled;
Diletant 161:efd949e8d536 52 } DevicePathLengthControlModulatorState;
Diletant 161:efd949e8d536 53
Diletant 161:efd949e8d536 54 typedef struct _DevicePathLengthControlModulator {
Diletant 161:efd949e8d536 55 DevicePathLengthControlModulatorSettings settings;
Diletant 161:efd949e8d536 56 DevicePathLengthControlModulatorState state;
Diletant 161:efd949e8d536 57 } DevicePathLengthControlModulator;
Diletant 161:efd949e8d536 58
Diletant 161:efd949e8d536 59 //Path length control system regulator typedefs
Diletant 161:efd949e8d536 60 typedef struct _DevicePathLengthControlRegulatorSettings {
Diletant 161:efd949e8d536 61 uint8_t enabled;
Diletant 161:efd949e8d536 62 uint32_t reference; //signed 16.16 format reference voltage
Diletant 161:efd949e8d536 63 uint32_t scale; //signed 16.16 format regulator scale factor
Diletant 161:efd949e8d536 64 } DevicePathLengthControlRegulatorSettings;
Diletant 149:abbf7663d27d 65
Diletant 161:efd949e8d536 66 typedef struct _DevicePathLengthControlRegulatorState {
Diletant 161:efd949e8d536 67 uint8_t enabled;
Diletant 161:efd949e8d536 68 uint32_t reference; //signed 16.16 format reference voltage
Diletant 161:efd949e8d536 69 uint32_t scale; //signed 16.16 format regulator scale factor
Diletant 161:efd949e8d536 70 uint32_t error; //signed 16.16 format regulator error
Diletant 161:efd949e8d536 71 } DevicePathLengthControlRegulatorState;
Diletant 161:efd949e8d536 72
Diletant 161:efd949e8d536 73 typedef struct _DevicePathLengthControlRegulator {
Diletant 161:efd949e8d536 74 DevicePathLengthControlRegulatorSettings settings;
Diletant 161:efd949e8d536 75 DevicePathLengthControlRegulatorState state;
Diletant 161:efd949e8d536 76 } DevicePathLengthControlRegulator;
Diletant 161:efd949e8d536 77
Diletant 161:efd949e8d536 78 //Path length control system typedefs
Diletant 161:efd949e8d536 79 // Output signal ADC: device.controller.SSP.ADC[4]
Diletant 161:efd949e8d536 80 // Path length control system DAC: device.controller.SSP.DAC[1]
Diletant 149:abbf7663d27d 81 typedef struct _DevicePathLengthControlSystem {
Diletant 161:efd949e8d536 82 DevicePathLengthControlModulator modulator;
Diletant 156:e68ee0bcdcda 83 DevicePathLengthControlAmplifier amplifier;
Diletant 161:efd949e8d536 84 DevicePathLengthControlReset reset;
Diletant 161:efd949e8d536 85 DevicePathLengthControlRegulator regulator;
Diletant 149:abbf7663d27d 86 } DevicePathLengthControlSystem;
Diletant 149:abbf7663d27d 87
Diletant 161:efd949e8d536 88 //Path length control system functions
Diletant 149:abbf7663d27d 89 void InitPathLengthControlSystemWithDefaults(void);
Diletant 149:abbf7663d27d 90 void InitPathLengthControlSystem(void);
Diletant 149:abbf7663d27d 91 void StartPathLengthControlSystem(void);
Diletant 149:abbf7663d27d 92
Diletant 149:abbf7663d27d 93 #endif /* __DEVICE_PLCS_H__ */