ADMW1001_Beta_Release
/
EV-PRO-MW1001_initialCommit
initial commit
multichannel_singlecycle_config.c@13:97cb32670539, 2019-07-25 (annotated)
- Committer:
- Vkadaba
- Date:
- Thu Jul 25 06:38:45 2019 +0000
- Revision:
- 13:97cb32670539
- Parent:
- 8:2f2775c34640
- Child:
- 15:b5d57daeb7c0
admw1001.c file is updated ; ; config version changed to 2.0 from 1.7
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ADIJake | 0:85855ecd3257 | 1 | /*! |
ADIJake | 0:85855ecd3257 | 2 | ****************************************************************************** |
ADIJake | 0:85855ecd3257 | 3 | * @file: config.c |
ADIJake | 0:85855ecd3257 | 4 | * @brief: |
ADIJake | 0:85855ecd3257 | 5 | *----------------------------------------------------------------------------- |
ADIJake | 0:85855ecd3257 | 6 | * |
ADIJake | 0:85855ecd3257 | 7 | Copyright 2017 (c) Analog Devices, Inc. |
ADIJake | 0:85855ecd3257 | 8 | |
ADIJake | 0:85855ecd3257 | 9 | All rights reserved. |
ADIJake | 0:85855ecd3257 | 10 | |
ADIJake | 0:85855ecd3257 | 11 | Redistribution and use in source and binary forms, with or without |
ADIJake | 0:85855ecd3257 | 12 | modification, are permitted provided that the following conditions are met: |
ADIJake | 0:85855ecd3257 | 13 | - Redistributions of source code must retain the above copyright |
ADIJake | 0:85855ecd3257 | 14 | notice, this list of conditions and the following disclaimer. |
ADIJake | 0:85855ecd3257 | 15 | - Redistributions in binary form must reproduce the above copyright |
ADIJake | 0:85855ecd3257 | 16 | notice, this list of conditions and the following disclaimer in |
ADIJake | 0:85855ecd3257 | 17 | the documentation and/or other materials provided with the |
ADIJake | 0:85855ecd3257 | 18 | distribution. |
ADIJake | 0:85855ecd3257 | 19 | - Neither the name of Analog Devices, Inc. nor the names of its |
ADIJake | 0:85855ecd3257 | 20 | contributors may be used to endorse or promote products derived |
ADIJake | 0:85855ecd3257 | 21 | from this software without specific prior written permission. |
ADIJake | 0:85855ecd3257 | 22 | - The use of this software may or may not infringe the patent rights |
ADIJake | 0:85855ecd3257 | 23 | of one or more patent holders. This license does not release you |
ADIJake | 0:85855ecd3257 | 24 | from the requirement that you obtain separate licenses from these |
ADIJake | 0:85855ecd3257 | 25 | patent holders to use this software. |
ADIJake | 0:85855ecd3257 | 26 | - Use of the software either in source or binary form, must be run |
ADIJake | 0:85855ecd3257 | 27 | on or directly connected to an Analog Devices Inc. component. |
ADIJake | 0:85855ecd3257 | 28 | |
ADIJake | 0:85855ecd3257 | 29 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
ADIJake | 0:85855ecd3257 | 30 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
ADIJake | 0:85855ecd3257 | 31 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
ADIJake | 0:85855ecd3257 | 32 | IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, |
ADIJake | 0:85855ecd3257 | 33 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
ADIJake | 0:85855ecd3257 | 34 | LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR |
ADIJake | 0:85855ecd3257 | 35 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
ADIJake | 0:85855ecd3257 | 36 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
ADIJake | 0:85855ecd3257 | 37 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
ADIJake | 0:85855ecd3257 | 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
ADIJake | 0:85855ecd3257 | 39 | * |
ADIJake | 0:85855ecd3257 | 40 | *****************************************************************************/ |
ADIJake | 0:85855ecd3257 | 41 | |
Vkadaba | 5:0728bde67bdb | 42 | #include "admw_config_types.h" |
ADIJake | 0:85855ecd3257 | 43 | |
Vkadaba | 5:0728bde67bdb | 44 | ADMW_CONFIG multichannel_singlecycle_config = { |
Vkadaba | 13:97cb32670539 | 45 | .versionId = { .major = 2, .minor = 0 }, |
Vkadaba | 5:0728bde67bdb | 46 | .productId = ADMW_PRODUCT_ID_ADMW1001, |
Vkadaba | 5:0728bde67bdb | 47 | .admw1001 = { |
ADIJake | 0:85855ecd3257 | 48 | .power = { |
Vkadaba | 6:9d393a9677f4 | 49 | .powerMode = ADMW1001_POWER_MODE_ACTIVE, |
ADIJake | 0:85855ecd3257 | 50 | }, |
ADIJake | 0:85855ecd3257 | 51 | .measurement = { |
Vkadaba | 5:0728bde67bdb | 52 | .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE, |
Vkadaba | 5:0728bde67bdb | 53 | .dataReadyMode = ADMW1001_DATAREADY_PER_CONVERSION, |
ADIJake | 0:85855ecd3257 | 54 | }, |
ADIJake | 0:85855ecd3257 | 55 | .channels = { |
Vkadaba | 8:2f2775c34640 | 56 | [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { |
ADIJake | 0:85855ecd3257 | 57 | .enableChannel = true, |
ADIJake | 0:85855ecd3257 | 58 | .disablePublishing = false, |
Vkadaba | 8:2f2775c34640 | 59 | .compensationChannel = ADMW1001_CH_ID_NONE, |
Vkadaba | 5:0728bde67bdb | 60 | .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, |
ADIJake | 0:85855ecd3257 | 61 | .measurementsPerCycle = 10, |
ADIJake | 0:85855ecd3257 | 62 | .extraSettlingTime = 0, |
ADIJake | 0:85855ecd3257 | 63 | .adcChannelConfig = { |
Vkadaba | 8:2f2775c34640 | 64 | .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, |
Vkadaba | 5:0728bde67bdb | 65 | .gain = ADMW1001_ADC_GAIN_8X, |
ADIJake | 0:85855ecd3257 | 66 | .current = { |
Vkadaba | 5:0728bde67bdb | 67 | .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, |
ADIJake | 0:85855ecd3257 | 68 | }, |
ADIJake | 0:85855ecd3257 | 69 | .filter = { |
Vkadaba | 6:9d393a9677f4 | 70 | .type = ADMW1001_ADC_FILTER_SINC3, |
ADIJake | 0:85855ecd3257 | 71 | }, |
ADIJake | 0:85855ecd3257 | 72 | .reference = { |
Vkadaba | 8:2f2775c34640 | 73 | ADMW1001_ADC_REFERENCE_VOLTAGE_AVDD, |
ADIJake | 0:85855ecd3257 | 74 | }, |
ADIJake | 0:85855ecd3257 | 75 | }, |
ADIJake | 0:85855ecd3257 | 76 | }, |
Vkadaba | 8:2f2775c34640 | 77 | [ADMW1001_CH_ID_ANLG_2_UNIVERSAL] = { |
ADIJake | 0:85855ecd3257 | 78 | .enableChannel = true, |
ADIJake | 0:85855ecd3257 | 79 | .disablePublishing = false, |
Vkadaba | 8:2f2775c34640 | 80 | .compensationChannel = ADMW1001_CH_ID_NONE, |
Vkadaba | 5:0728bde67bdb | 81 | .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, |
ADIJake | 0:85855ecd3257 | 82 | .measurementsPerCycle = 10, |
ADIJake | 0:85855ecd3257 | 83 | .extraSettlingTime = 0, |
ADIJake | 0:85855ecd3257 | 84 | .adcChannelConfig = { |
Vkadaba | 8:2f2775c34640 | 85 | .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, |
Vkadaba | 5:0728bde67bdb | 86 | .gain = ADMW1001_ADC_GAIN_8X, |
ADIJake | 0:85855ecd3257 | 87 | .current = { |
Vkadaba | 5:0728bde67bdb | 88 | .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, |
ADIJake | 0:85855ecd3257 | 89 | }, |
ADIJake | 0:85855ecd3257 | 90 | .filter = { |
Vkadaba | 6:9d393a9677f4 | 91 | .type = ADMW1001_ADC_FILTER_SINC3, |
ADIJake | 0:85855ecd3257 | 92 | }, |
ADIJake | 0:85855ecd3257 | 93 | .reference = { |
Vkadaba | 8:2f2775c34640 | 94 | ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, |
ADIJake | 0:85855ecd3257 | 95 | }, |
ADIJake | 0:85855ecd3257 | 96 | }, |
ADIJake | 0:85855ecd3257 | 97 | }, |
Vkadaba | 8:2f2775c34640 | 98 | [ADMW1001_CH_ID_ANLG_1_DIFFERENTIAL] = { |
ADIJake | 0:85855ecd3257 | 99 | .enableChannel = true, |
ADIJake | 0:85855ecd3257 | 100 | .disablePublishing = false, |
Vkadaba | 8:2f2775c34640 | 101 | .compensationChannel = ADMW1001_CH_ID_NONE, |
Vkadaba | 6:9d393a9677f4 | 102 | .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, |
Vkadaba | 6:9d393a9677f4 | 103 | .measurementsPerCycle = 10, |
Vkadaba | 6:9d393a9677f4 | 104 | .extraSettlingTime = 0, |
Vkadaba | 6:9d393a9677f4 | 105 | .adcChannelConfig = { |
Vkadaba | 8:2f2775c34640 | 106 | .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, |
Vkadaba | 6:9d393a9677f4 | 107 | .gain = ADMW1001_ADC_GAIN_8X, |
Vkadaba | 6:9d393a9677f4 | 108 | .current = { |
Vkadaba | 6:9d393a9677f4 | 109 | .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, |
Vkadaba | 6:9d393a9677f4 | 110 | }, |
Vkadaba | 6:9d393a9677f4 | 111 | .filter = { |
Vkadaba | 6:9d393a9677f4 | 112 | .type = ADMW1001_ADC_FILTER_SINC3, |
Vkadaba | 6:9d393a9677f4 | 113 | }, |
Vkadaba | 6:9d393a9677f4 | 114 | .reference = { |
Vkadaba | 8:2f2775c34640 | 115 | ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, |
Vkadaba | 6:9d393a9677f4 | 116 | }, |
Vkadaba | 6:9d393a9677f4 | 117 | }, |
Vkadaba | 6:9d393a9677f4 | 118 | }, |
Vkadaba | 8:2f2775c34640 | 119 | [ADMW1001_CH_ID_ANLG_2_DIFFERENTIAL] = { |
Vkadaba | 6:9d393a9677f4 | 120 | .enableChannel = true, |
Vkadaba | 6:9d393a9677f4 | 121 | .disablePublishing = false, |
Vkadaba | 8:2f2775c34640 | 122 | .compensationChannel = ADMW1001_CH_ID_ANLG_2_UNIVERSAL, |
Vkadaba | 5:0728bde67bdb | 123 | .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, |
ADIJake | 0:85855ecd3257 | 124 | .measurementsPerCycle = 10, |
ADIJake | 0:85855ecd3257 | 125 | .extraSettlingTime = 0, |
ADIJake | 0:85855ecd3257 | 126 | .adcChannelConfig = { |
Vkadaba | 8:2f2775c34640 | 127 | .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K, |
Vkadaba | 5:0728bde67bdb | 128 | .gain = ADMW1001_ADC_GAIN_32X, |
ADIJake | 0:85855ecd3257 | 129 | .filter = { |
Vkadaba | 6:9d393a9677f4 | 130 | .type = ADMW1001_ADC_FILTER_SINC3, |
ADIJake | 0:85855ecd3257 | 131 | }, |
ADIJake | 0:85855ecd3257 | 132 | .reference = { |
Vkadaba | 8:2f2775c34640 | 133 | ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, |
ADIJake | 0:85855ecd3257 | 134 | }, |
ADIJake | 0:85855ecd3257 | 135 | }, |
ADIJake | 0:85855ecd3257 | 136 | }, |
Vkadaba | 8:2f2775c34640 | 137 | [ADMW1001_CH_ID_DIG_I2C_0] = { |
ADIJake | 0:85855ecd3257 | 138 | .enableChannel = true, |
ADIJake | 0:85855ecd3257 | 139 | .disablePublishing = false, |
Vkadaba | 8:2f2775c34640 | 140 | .compensationChannel = ADMW1001_CH_ID_NONE, |
ADIJake | 0:85855ecd3257 | 141 | .measurementsPerCycle = 10, |
ADIJake | 0:85855ecd3257 | 142 | .extraSettlingTime = 36500, |
ADIJake | 0:85855ecd3257 | 143 | .i2cChannelConfig = { |
Vkadaba | 8:2f2775c34640 | 144 | .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_A, |
ADIJake | 0:85855ecd3257 | 145 | .deviceAddress = 0x27, |
ADIJake | 0:85855ecd3257 | 146 | }, |
ADIJake | 0:85855ecd3257 | 147 | }, |
ADIJake | 0:85855ecd3257 | 148 | }, |
ADIJake | 0:85855ecd3257 | 149 | }, |
ADIJake | 0:85855ecd3257 | 150 | }; |
ADIJake | 0:85855ecd3257 | 151 |