Mbed FW update

Committer:
ADIJake
Date:
Mon Apr 01 11:09:52 2019 +0000
Revision:
0:85855ecd3257
Child:
5:0728bde67bdb
Initial Commit

Who changed what in which revision?

UserRevisionLine numberNew 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
ADIJake 0:85855ecd3257 42 #include "adi_sense_config_types.h"
ADIJake 0:85855ecd3257 43
ADIJake 0:85855ecd3257 44 ADI_SENSE_CONFIG multichannel_continuous_config = {
ADIJake 0:85855ecd3257 45 .versionId = { .major = 1, .minor = 4 },
ADIJake 0:85855ecd3257 46 .productId = ADI_SENSE_PRODUCT_ID_ADSNS1000,
ADIJake 0:85855ecd3257 47 .adisense1000 = {
ADIJake 0:85855ecd3257 48 .power = {
ADIJake 0:85855ecd3257 49 .powerMode = ADI_SENSE_1000_POWER_MODE_FULL,
ADIJake 0:85855ecd3257 50 },
ADIJake 0:85855ecd3257 51 .measurement = {
ADIJake 0:85855ecd3257 52 .operatingMode = ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS,
ADIJake 0:85855ecd3257 53 .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE,
ADIJake 0:85855ecd3257 54 .cycleInterval = 5000000,
ADIJake 0:85855ecd3257 55 },
ADIJake 0:85855ecd3257 56 .channels = {
ADIJake 0:85855ecd3257 57 [ADI_SENSE_1000_CHANNEL_ID_CJC_0] = {
ADIJake 0:85855ecd3257 58 .enableChannel = true,
ADIJake 0:85855ecd3257 59 .disablePublishing = false,
ADIJake 0:85855ecd3257 60 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE,
ADIJake 0:85855ecd3257 61 .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS,
ADIJake 0:85855ecd3257 62 .measurementsPerCycle = 10,
ADIJake 0:85855ecd3257 63 .extraSettlingTime = 0,
ADIJake 0:85855ecd3257 64 .adcChannelConfig = {
ADIJake 0:85855ecd3257 65 .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1,
ADIJake 0:85855ecd3257 66 .gain = ADI_SENSE_1000_ADC_GAIN_8X,
ADIJake 0:85855ecd3257 67 .current = {
ADIJake 0:85855ecd3257 68 .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA,
ADIJake 0:85855ecd3257 69 },
ADIJake 0:85855ecd3257 70 .filter = {
ADIJake 0:85855ecd3257 71 .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS,
ADIJake 0:85855ecd3257 72 },
ADIJake 0:85855ecd3257 73 .reference = {
ADIJake 0:85855ecd3257 74 .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1,
ADIJake 0:85855ecd3257 75 .disableBuffer = false,
ADIJake 0:85855ecd3257 76 },
ADIJake 0:85855ecd3257 77 .enableVbias = false,
ADIJake 0:85855ecd3257 78 },
ADIJake 0:85855ecd3257 79 },
ADIJake 0:85855ecd3257 80 [ADI_SENSE_1000_CHANNEL_ID_CJC_1] = {
ADIJake 0:85855ecd3257 81 .enableChannel = true,
ADIJake 0:85855ecd3257 82 .disablePublishing = false,
ADIJake 0:85855ecd3257 83 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE,
ADIJake 0:85855ecd3257 84 .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS,
ADIJake 0:85855ecd3257 85 .measurementsPerCycle = 10,
ADIJake 0:85855ecd3257 86 .extraSettlingTime = 0,
ADIJake 0:85855ecd3257 87 .adcChannelConfig = {
ADIJake 0:85855ecd3257 88 .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1,
ADIJake 0:85855ecd3257 89 .gain = ADI_SENSE_1000_ADC_GAIN_8X,
ADIJake 0:85855ecd3257 90 .current = {
ADIJake 0:85855ecd3257 91 .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA,
ADIJake 0:85855ecd3257 92 },
ADIJake 0:85855ecd3257 93 .filter = {
ADIJake 0:85855ecd3257 94 .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS,
ADIJake 0:85855ecd3257 95 },
ADIJake 0:85855ecd3257 96 .reference = {
ADIJake 0:85855ecd3257 97 .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1,
ADIJake 0:85855ecd3257 98 .disableBuffer = false,
ADIJake 0:85855ecd3257 99 },
ADIJake 0:85855ecd3257 100 .enableVbias = false,
ADIJake 0:85855ecd3257 101 },
ADIJake 0:85855ecd3257 102 },
ADIJake 0:85855ecd3257 103 [ADI_SENSE_1000_CHANNEL_ID_SENSOR_0] = {
ADIJake 0:85855ecd3257 104 .enableChannel = true,
ADIJake 0:85855ecd3257 105 .disablePublishing = false,
ADIJake 0:85855ecd3257 106 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE,
ADIJake 0:85855ecd3257 107 .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS,
ADIJake 0:85855ecd3257 108 .measurementsPerCycle = 10,
ADIJake 0:85855ecd3257 109 .extraSettlingTime = 0,
ADIJake 0:85855ecd3257 110 .adcChannelConfig = {
ADIJake 0:85855ecd3257 111 .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1,
ADIJake 0:85855ecd3257 112 .gain = ADI_SENSE_1000_ADC_GAIN_8X,
ADIJake 0:85855ecd3257 113 .current = {
ADIJake 0:85855ecd3257 114 .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA,
ADIJake 0:85855ecd3257 115 },
ADIJake 0:85855ecd3257 116 .filter = {
ADIJake 0:85855ecd3257 117 .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS,
ADIJake 0:85855ecd3257 118 },
ADIJake 0:85855ecd3257 119 .reference = {
ADIJake 0:85855ecd3257 120 .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1,
ADIJake 0:85855ecd3257 121 .disableBuffer = false,
ADIJake 0:85855ecd3257 122 },
ADIJake 0:85855ecd3257 123 .enableVbias = false,
ADIJake 0:85855ecd3257 124 },
ADIJake 0:85855ecd3257 125 },
ADIJake 0:85855ecd3257 126 [ADI_SENSE_1000_CHANNEL_ID_SENSOR_1] = {
ADIJake 0:85855ecd3257 127 .enableChannel = true,
ADIJake 0:85855ecd3257 128 .disablePublishing = false,
ADIJake 0:85855ecd3257 129 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_1,
ADIJake 0:85855ecd3257 130 .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS,
ADIJake 0:85855ecd3257 131 .measurementsPerCycle = 10,
ADIJake 0:85855ecd3257 132 .extraSettlingTime = 0,
ADIJake 0:85855ecd3257 133 .adcChannelConfig = {
ADIJake 0:85855ecd3257 134 .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_K_DEF_L1,
ADIJake 0:85855ecd3257 135 .gain = ADI_SENSE_1000_ADC_GAIN_32X,
ADIJake 0:85855ecd3257 136 .filter = {
ADIJake 0:85855ecd3257 137 .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS,
ADIJake 0:85855ecd3257 138 },
ADIJake 0:85855ecd3257 139 .reference = {
ADIJake 0:85855ecd3257 140 .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL,
ADIJake 0:85855ecd3257 141 .disableBuffer = true,
ADIJake 0:85855ecd3257 142 },
ADIJake 0:85855ecd3257 143 .enableVbias = true,
ADIJake 0:85855ecd3257 144 },
ADIJake 0:85855ecd3257 145 },
ADIJake 0:85855ecd3257 146 [ADI_SENSE_1000_CHANNEL_ID_SENSOR_2] = {
ADIJake 0:85855ecd3257 147 .enableChannel = true,
ADIJake 0:85855ecd3257 148 .disablePublishing = false,
ADIJake 0:85855ecd3257 149 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0,
ADIJake 0:85855ecd3257 150 .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS,
ADIJake 0:85855ecd3257 151 .measurementsPerCycle = 10,
ADIJake 0:85855ecd3257 152 .extraSettlingTime = 0,
ADIJake 0:85855ecd3257 153 .adcChannelConfig = {
ADIJake 0:85855ecd3257 154 .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_T_DEF_L1,
ADIJake 0:85855ecd3257 155 .gain = ADI_SENSE_1000_ADC_GAIN_32X,
ADIJake 0:85855ecd3257 156 .filter = {
ADIJake 0:85855ecd3257 157 .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS,
ADIJake 0:85855ecd3257 158 },
ADIJake 0:85855ecd3257 159 .reference = {
ADIJake 0:85855ecd3257 160 .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL,
ADIJake 0:85855ecd3257 161 .disableBuffer = true,
ADIJake 0:85855ecd3257 162 },
ADIJake 0:85855ecd3257 163 .enableVbias = true,
ADIJake 0:85855ecd3257 164 },
ADIJake 0:85855ecd3257 165 },
ADIJake 0:85855ecd3257 166 [ADI_SENSE_1000_CHANNEL_ID_SENSOR_3] = {
ADIJake 0:85855ecd3257 167 .enableChannel = true,
ADIJake 0:85855ecd3257 168 .disablePublishing = false,
ADIJake 0:85855ecd3257 169 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_CJC_0,
ADIJake 0:85855ecd3257 170 .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS,
ADIJake 0:85855ecd3257 171 .measurementsPerCycle = 10,
ADIJake 0:85855ecd3257 172 .extraSettlingTime = 0,
ADIJake 0:85855ecd3257 173 .adcChannelConfig = {
ADIJake 0:85855ecd3257 174 .sensor = ADI_SENSE_1000_ADC_SENSOR_THERMOCOUPLE_J_DEF_L1,
ADIJake 0:85855ecd3257 175 .gain = ADI_SENSE_1000_ADC_GAIN_32X,
ADIJake 0:85855ecd3257 176 .filter = {
ADIJake 0:85855ecd3257 177 .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS,
ADIJake 0:85855ecd3257 178 },
ADIJake 0:85855ecd3257 179 .reference = {
ADIJake 0:85855ecd3257 180 .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL,
ADIJake 0:85855ecd3257 181 .disableBuffer = true,
ADIJake 0:85855ecd3257 182 },
ADIJake 0:85855ecd3257 183 .enableVbias = true,
ADIJake 0:85855ecd3257 184 },
ADIJake 0:85855ecd3257 185 },
ADIJake 0:85855ecd3257 186 [ADI_SENSE_1000_CHANNEL_ID_VOLTAGE_0] = {
ADIJake 0:85855ecd3257 187 .enableChannel = true,
ADIJake 0:85855ecd3257 188 .disablePublishing = false,
ADIJake 0:85855ecd3257 189 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE,
ADIJake 0:85855ecd3257 190 .measurementsPerCycle = 10,
ADIJake 0:85855ecd3257 191 .extraSettlingTime = 0,
ADIJake 0:85855ecd3257 192 .adcChannelConfig = {
ADIJake 0:85855ecd3257 193 .sensor = ADI_SENSE_1000_ADC_SENSOR_VOLTAGE_PRESSURE_A_DEF_L1,
ADIJake 0:85855ecd3257 194 .gain = ADI_SENSE_1000_ADC_GAIN_2X,
ADIJake 0:85855ecd3257 195 .filter = {
ADIJake 0:85855ecd3257 196 .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS,
ADIJake 0:85855ecd3257 197 },
ADIJake 0:85855ecd3257 198 .reference = {
ADIJake 0:85855ecd3257 199 .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL,
ADIJake 0:85855ecd3257 200 .disableBuffer = true,
ADIJake 0:85855ecd3257 201 },
ADIJake 0:85855ecd3257 202 .enableVbias = false,
ADIJake 0:85855ecd3257 203 },
ADIJake 0:85855ecd3257 204 },
ADIJake 0:85855ecd3257 205 [ADI_SENSE_1000_CHANNEL_ID_CURRENT_0] = {
ADIJake 0:85855ecd3257 206 .enableChannel = true,
ADIJake 0:85855ecd3257 207 .disablePublishing = false,
ADIJake 0:85855ecd3257 208 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE,
ADIJake 0:85855ecd3257 209 .measurementsPerCycle = 10,
ADIJake 0:85855ecd3257 210 .extraSettlingTime = 0,
ADIJake 0:85855ecd3257 211 .adcChannelConfig = {
ADIJake 0:85855ecd3257 212 .sensor = ADI_SENSE_1000_ADC_SENSOR_CURRENT_PRESSURE_A_DEF_L1,
ADIJake 0:85855ecd3257 213 .gain = ADI_SENSE_1000_ADC_GAIN_2X,
ADIJake 0:85855ecd3257 214 .filter = {
ADIJake 0:85855ecd3257 215 .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS,
ADIJake 0:85855ecd3257 216 },
ADIJake 0:85855ecd3257 217 .reference = {
ADIJake 0:85855ecd3257 218 .type = ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL,
ADIJake 0:85855ecd3257 219 .disableBuffer = true,
ADIJake 0:85855ecd3257 220 },
ADIJake 0:85855ecd3257 221 .enableVbias = false,
ADIJake 0:85855ecd3257 222 },
ADIJake 0:85855ecd3257 223 },
ADIJake 0:85855ecd3257 224 [ADI_SENSE_1000_CHANNEL_ID_I2C_0] = {
ADIJake 0:85855ecd3257 225 .enableChannel = true,
ADIJake 0:85855ecd3257 226 .disablePublishing = false,
ADIJake 0:85855ecd3257 227 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE,
ADIJake 0:85855ecd3257 228 .measurementsPerCycle = 10,
ADIJake 0:85855ecd3257 229 .extraSettlingTime = 36500,
ADIJake 0:85855ecd3257 230 .i2cChannelConfig = {
ADIJake 0:85855ecd3257 231 .sensor = ADI_SENSE_1000_I2C_SENSOR_HUMIDITY_A_DEF_L1,
ADIJake 0:85855ecd3257 232 .deviceAddress = 0x27,
ADIJake 0:85855ecd3257 233 },
ADIJake 0:85855ecd3257 234 },
ADIJake 0:85855ecd3257 235 },
ADIJake 0:85855ecd3257 236 },
ADIJake 0:85855ecd3257 237 };
ADIJake 0:85855ecd3257 238