PoC_Team
/
ADMW1001_example_firmware
Host API Example for the ADMW1001
Diff: config.c
- Revision:
- 23:bb685f35b08b
- Parent:
- 19:09d58952b65d
--- a/config.c Thu Sep 26 05:56:58 2019 +0000 +++ b/config.c Thu Sep 26 06:15:39 2019 +0000 @@ -100,174 +100,174 @@ .admw1001 = { - .power = { + .power = { - .powerMode = ADMW1001_POWER_MODE_ACTIVE, + .powerMode = ADMW1001_POWER_MODE_ACTIVE, - }, + }, - .measurement = { - - .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS, + .measurement = { - .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, // FIX: Temporarily all values from json are hardcoded to this one in the Contracts.FileGenerator - > file translations!! + .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS, - .cycleInterval = 0, - - .vBiasEnable = true, + .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, // FIX: Temporarily all values from json are hardcoded to this one in the Contracts.FileGenerator - > file translations!! - }, + .cycleInterval = 0, - .diagnostics = { + .vBiasEnable = true, - .disableGlobalDiag = true, + }, - .disableMeasurementDiag = true, + .diagnostics = { - .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED, - - }, + .disableGlobalDiag = true, - .channels = { + .disableMeasurementDiag = true, - [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { + .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED, - .enableChannel = true, + }, - .disablePublishing = false, + .channels = { - .compensationChannel = ADMW1001_CH_ID_NONE, - - .lutSelect = ADMW1001_LUT_DEFAULT, + [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { - .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + .enableChannel = true, - .lowThreshold = -50, + .disablePublishing = false, - .highThreshold = 250, + .compensationChannel = ADMW1001_CH_ID_NONE, - .offsetAdjustment = 0.0, + .lutSelect = ADMW1001_LUT_DEFAULT, - .gainAdjustment = 0.0, - - .sensorParameter = 0.0, + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, - .measurementsPerCycle = 1, + .lowThreshold = -50, - .cycleSkipCount = 0, - - .extraSettlingTime = 0, + .highThreshold = 250, - .priority = 0, + .offsetAdjustment = 0.0, - .adcChannelConfig = { - - .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, + .gainAdjustment = 0.0, - .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, + .sensorParameter = 0.0, - .gain = ADMW1001_ADC_GAIN_2X, + .measurementsPerCycle = 1, - .current = { + .cycleSkipCount = 0, - .excitationState= ADMW1001_ADC_EXC_STATE_ALWAYS_ON, + .extraSettlingTime = 0, - .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, - - .diodeRatio = 0, + .priority = 0, - }, + .adcChannelConfig = { - .filter = { + .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, - .type = ADMW1001_ADC_FILTER_SINC3, + .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, - .sf = ADMW1001_SF_8P24HZ, + .gain = ADMW1001_ADC_GAIN_2X, - .chopMode = ADMW1001_CHOP_MD_SW, - - .notch1p2 = false, + .current = { - .groundSwitch = ADMW1001_ADC_GND_SW_OPEN + .excitationState= ADMW1001_ADC_EXC_STATE_ALWAYS_ON, - }, + .outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA, - .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, + .diodeRatio = 0, }, - }, - - [ADMW1001_CH_ID_ANLG_1_DIFFERENTIAL] = { - - .enableChannel = true, - - .disablePublishing = false, - - .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL, - - .lutSelect = ADMW1001_LUT_DEFAULT, - - .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, - - .lowThreshold = -50, + .filter = { - .highThreshold = 250, - - .offsetAdjustment = 0.0, - - .gainAdjustment = 0.0, - - .sensorParameter = 0.0, + .type = ADMW1001_ADC_FILTER_SINC3, - .measurementsPerCycle = 1, - - .cycleSkipCount = 0, - - .extraSettlingTime = 4499.99986449257, - - .priority = 0, + .sf = ADMW1001_SF_8P24HZ, - .adcChannelConfig = { - - .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K, - - .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, - - .gain = 8, - - .current = { - - .excitationState= ADMW1001_ADC_EXC_STATE_CYCLE_POWER, - - .outputLevel = ADMW1001_ADC_EXC_CURRENT_EXTERNAL, - - .diodeRatio = 0, + .chopMode = ADMW1001_CHOP_MD_SW, - }, - - .filter = { - - .type = ADMW1001_ADC_FILTER_SINC3, - - .sf = ADMW1001_SF_8P24HZ, + .notch1p2 = false, - .chopMode = ADMW1001_CHOP_MD_SW, - - .notch1p2 = false, - - .groundSwitch = ADMW1001_ADC_GND_SW_OPEN - - }, - - .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN }, + .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, + }, }, + [ADMW1001_CH_ID_ANLG_1_DIFFERENTIAL] = { + + .enableChannel = true, + + .disablePublishing = false, + + .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL, + + .lutSelect = ADMW1001_LUT_DEFAULT, + + .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, + + .lowThreshold = -50, + + .highThreshold = 250, + + .offsetAdjustment = 0.0, + + .gainAdjustment = 0.0, + + .sensorParameter = 0.0, + + .measurementsPerCycle = 1, + + .cycleSkipCount = 0, + + .extraSettlingTime = 4499.99986449257, + + .priority = 0, + + .adcChannelConfig = { + + .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K, + + .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, + + .gain = 8, + + .current = { + + .excitationState= ADMW1001_ADC_EXC_STATE_CYCLE_POWER, + + .outputLevel = ADMW1001_ADC_EXC_CURRENT_EXTERNAL, + + .diodeRatio = 0, + + }, + + .filter = { + + .type = ADMW1001_ADC_FILTER_SINC3, + + .sf = ADMW1001_SF_8P24HZ, + + .chopMode = ADMW1001_CHOP_MD_SW, + + .notch1p2 = false, + + .groundSwitch = ADMW1001_ADC_GND_SW_OPEN + + }, + + .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, + + }, + + }, + + }, + }, };