ADMW1001_Beta_Release
/
EV-PRO-MW1001_initialCommit
initial commit
multichannel_continuous_config.c@56:38b36e947602, 2020-02-24 (annotated)
- Committer:
- Vkadaba
- Date:
- Mon Feb 24 08:49:25 2020 +0000
- Revision:
- 56:38b36e947602
- Parent:
- 45:f5f553b8c0d5
Config files updated and minor code changes
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 | * |
Vkadaba | 15:b5d57daeb7c0 | 7 | Copyright 2019 (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_continuous_config = { |
Vkadaba | 56:38b36e947602 | 45 | .versionId = { .major = 2, .minor = 0 }, |
Vkadaba | 5:0728bde67bdb | 46 | .productId = ADMW_PRODUCT_ID_ADMW1001, |
Vkadaba | 5:0728bde67bdb | 47 | .admw1001 = { |
Vkadaba | 23:bb685f35b08b | 48 | .power = { |
Vkadaba | 23:bb685f35b08b | 49 | .powerMode = ADMW1001_POWER_MODE_ACTIVE, |
Vkadaba | 23:bb685f35b08b | 50 | }, |
Vkadaba | 23:bb685f35b08b | 51 | .measurement = { |
Vkadaba | 37:6acfbb4405cd | 52 | .externalRefVoltage=0.0, |
Vkadaba | 56:38b36e947602 | 53 | .AVDDVoltage=3.0, |
Vkadaba | 23:bb685f35b08b | 54 | .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS, |
Vkadaba | 56:38b36e947602 | 55 | .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, |
Vkadaba | 23:bb685f35b08b | 56 | .cycleInterval = 0, |
Vkadaba | 56:38b36e947602 | 57 | .excitationState = ADMW1001_ADC_EXC_STATE_CYCLE_POWER, |
Vkadaba | 23:bb685f35b08b | 58 | .vBiasEnable = true, |
Vkadaba | 56:38b36e947602 | 59 | .RSenseValue = 1000, |
Vkadaba | 56:38b36e947602 | 60 | .groundSwitch = ADMW1001_ADC_GND_SW_OPEN, |
Vkadaba | 23:bb685f35b08b | 61 | }, |
Vkadaba | 23:bb685f35b08b | 62 | .channels = { |
Vkadaba | 23:bb685f35b08b | 63 | [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = { |
Vkadaba | 23:bb685f35b08b | 64 | .enableChannel = true, |
Vkadaba | 23:bb685f35b08b | 65 | .disablePublishing = false, |
Vkadaba | 23:bb685f35b08b | 66 | .compensationChannel = ADMW1001_CH_ID_NONE, |
Vkadaba | 23:bb685f35b08b | 67 | .lutSelect = ADMW1001_LUT_DEFAULT, |
Vkadaba | 37:6acfbb4405cd | 68 | .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, |
Vkadaba | 56:38b36e947602 | 69 | .extraSettlingTime = 0, |
Vkadaba | 37:6acfbb4405cd | 70 | .lowThreshold = -50, |
Vkadaba | 37:6acfbb4405cd | 71 | .highThreshold = 250, |
Vkadaba | 34:b60ee1e0af2b | 72 | .measurementsPerCycle = 1, |
Vkadaba | 56:38b36e947602 | 73 | .offsetAdjustment = 0, |
Vkadaba | 56:38b36e947602 | 74 | .gainAdjustment = 1, |
Vkadaba | 23:bb685f35b08b | 75 | .adcChannelConfig = { |
Vkadaba | 23:bb685f35b08b | 76 | .sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100, |
Vkadaba | 23:bb685f35b08b | 77 | .gain = ADMW1001_ADC_GAIN_1X, |
Vkadaba | 23:bb685f35b08b | 78 | .current = { |
Vkadaba | 56:38b36e947602 | 79 | .outputLevel = ADMW1001_ADC_EXC_CURRENT_500uA, |
Vkadaba | 8:2f2775c34640 | 80 | }, |
Vkadaba | 56:38b36e947602 | 81 | .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN, |
Vkadaba | 23:bb685f35b08b | 82 | .filter = { |
Vkadaba | 23:bb685f35b08b | 83 | .type = ADMW1001_ADC_FILTER_SINC3, |
Vkadaba | 23:bb685f35b08b | 84 | .sf = ADMW1001_SF_8P24HZ, |
Vkadaba | 23:bb685f35b08b | 85 | .chopMode = ADMW1001_CHOP_MD_SW, |
Vkadaba | 56:38b36e947602 | 86 | .notch1p2 = true |
ADIJake | 0:85855ecd3257 | 87 | }, |
Vkadaba | 23:bb685f35b08b | 88 | .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, |
Vkadaba | 37:6acfbb4405cd | 89 | .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, |
ADIJake | 0:85855ecd3257 | 90 | }, |
ADIJake | 0:85855ecd3257 | 91 | }, |
Vkadaba | 23:bb685f35b08b | 92 | [ADMW1001_CH_ID_ANLG_1_DIFFERENTIAL] = { |
Vkadaba | 23:bb685f35b08b | 93 | .enableChannel = true, |
Vkadaba | 23:bb685f35b08b | 94 | .disablePublishing = false, |
Vkadaba | 23:bb685f35b08b | 95 | .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL, |
Vkadaba | 23:bb685f35b08b | 96 | .lutSelect = ADMW1001_LUT_DEFAULT, |
Vkadaba | 37:6acfbb4405cd | 97 | .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS, |
Vkadaba | 56:38b36e947602 | 98 | .extraSettlingTime = 4.49999986449257, |
Vkadaba | 37:6acfbb4405cd | 99 | .lowThreshold = -50, |
Vkadaba | 37:6acfbb4405cd | 100 | .highThreshold = 250, |
Vkadaba | 34:b60ee1e0af2b | 101 | .measurementsPerCycle = 1, |
Vkadaba | 56:38b36e947602 | 102 | .offsetAdjustment = 0, |
Vkadaba | 56:38b36e947602 | 103 | .gainAdjustment = 1, |
Vkadaba | 23:bb685f35b08b | 104 | .adcChannelConfig = { |
Vkadaba | 23:bb685f35b08b | 105 | .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_K, |
Vkadaba | 23:bb685f35b08b | 106 | .gain = ADMW1001_ADC_GAIN_8X, |
Vkadaba | 23:bb685f35b08b | 107 | .filter = { |
Vkadaba | 23:bb685f35b08b | 108 | .type = ADMW1001_ADC_FILTER_SINC3, |
Vkadaba | 23:bb685f35b08b | 109 | .sf = ADMW1001_SF_8P24HZ, |
Vkadaba | 23:bb685f35b08b | 110 | .chopMode = ADMW1001_CHOP_MD_SW, |
Vkadaba | 56:38b36e947602 | 111 | .notch1p2 = true |
Vkadaba | 23:bb685f35b08b | 112 | }, |
Vkadaba | 23:bb685f35b08b | 113 | .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, |
Vkadaba | 37:6acfbb4405cd | 114 | .bufferBypass = ADMW1001_BUFFER_BYPASSS_DISABLED, |
Vkadaba | 23:bb685f35b08b | 115 | }, |
Vkadaba | 23:bb685f35b08b | 116 | }, |
Vkadaba | 23:bb685f35b08b | 117 | [ADMW1001_CH_ID_DIG_I2C_0] = { |
Vkadaba | 56:38b36e947602 | 118 | .enableChannel = true, |
Vkadaba | 23:bb685f35b08b | 119 | .disablePublishing = false, |
Vkadaba | 23:bb685f35b08b | 120 | .compensationChannel = ADMW1001_CH_ID_NONE, |
Vkadaba | 56:38b36e947602 | 121 | .measurementUnit = ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED, |
Vkadaba | 34:b60ee1e0af2b | 122 | .measurementsPerCycle = 1, |
Vkadaba | 56:38b36e947602 | 123 | .extraSettlingTime = 99.5000014663674, |
Vkadaba | 23:bb685f35b08b | 124 | .i2cChannelConfig = { |
Vkadaba | 23:bb685f35b08b | 125 | .sensor = ADMW1001_I2C_SENSOR_HUMIDITY_B, |
Vkadaba | 23:bb685f35b08b | 126 | }, |
Vkadaba | 56:38b36e947602 | 127 | } |
Vkadaba | 23:bb685f35b08b | 128 | }, |
Vkadaba | 23:bb685f35b08b | 129 | }, |
Vkadaba | 22:2835e9e9f59f | 130 | }; |