Bumped Mbed FW version to 01.20.0080

Committer:
Vkadaba
Date:
Fri Apr 24 06:37:01 2020 +0000
Revision:
72:35ea0b4e725b
Parent:
63:2655a04c00f5
Added admw_SetExtVrefBufferMode functionality:; updated the config files ; Bumped the FW version to 1.20.0080

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Vkadaba 5:0728bde67bdb 1 /*
Vkadaba 6:9d393a9677f4 2 Copyright 2019 (c) Analog Devices, Inc.
Vkadaba 5:0728bde67bdb 3
Vkadaba 5:0728bde67bdb 4 All rights reserved.
Vkadaba 5:0728bde67bdb 5
Vkadaba 5:0728bde67bdb 6 Redistribution and use in source and binary forms, with or without
Vkadaba 5:0728bde67bdb 7 modification, are permitted provided that the following conditions are met:
Vkadaba 5:0728bde67bdb 8 - Redistributions of source code must retain the above copyright
Vkadaba 5:0728bde67bdb 9 notice, this list of conditions and the following disclaimer.
Vkadaba 5:0728bde67bdb 10 - Redistributions in binary form must reproduce the above copyright
Vkadaba 5:0728bde67bdb 11 notice, this list of conditions and the following disclaimer in
Vkadaba 5:0728bde67bdb 12 the documentation and/or other materials provided with the
Vkadaba 5:0728bde67bdb 13 distribution.
Vkadaba 5:0728bde67bdb 14 - Neither the name of Analog Devices, Inc. nor the names of its
Vkadaba 5:0728bde67bdb 15 contributors may be used to endorse or promote products derived
Vkadaba 5:0728bde67bdb 16 from this software without specific prior written permission.
Vkadaba 5:0728bde67bdb 17 - The use of this software may or may not infringe the patent rights
Vkadaba 5:0728bde67bdb 18 of one or more patent holders. This license does not release you
Vkadaba 5:0728bde67bdb 19 from the requirement that you obtain separate licenses from these
Vkadaba 5:0728bde67bdb 20 patent holders to use this software.
Vkadaba 5:0728bde67bdb 21 - Use of the software either in source or binary form, must be run
Vkadaba 5:0728bde67bdb 22 on or directly connected to an Analog Devices Inc. component.
Vkadaba 5:0728bde67bdb 23
Vkadaba 5:0728bde67bdb 24 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
Vkadaba 5:0728bde67bdb 25 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
Vkadaba 5:0728bde67bdb 26 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
Vkadaba 5:0728bde67bdb 27 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
Vkadaba 5:0728bde67bdb 28 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Vkadaba 5:0728bde67bdb 29 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
Vkadaba 5:0728bde67bdb 30 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Vkadaba 5:0728bde67bdb 31 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Vkadaba 5:0728bde67bdb 32 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Vkadaba 5:0728bde67bdb 33 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Vkadaba 5:0728bde67bdb 34 */
Vkadaba 5:0728bde67bdb 35
Vkadaba 5:0728bde67bdb 36 /*!
Vkadaba 5:0728bde67bdb 37 ******************************************************************************
Vkadaba 5:0728bde67bdb 38 * @file: admw1001_config.h
Vkadaba 5:0728bde67bdb 39 * @brief: Configuration type definitions for ADMW1001.
Vkadaba 5:0728bde67bdb 40 *-----------------------------------------------------------------------------
Vkadaba 5:0728bde67bdb 41 */
Vkadaba 5:0728bde67bdb 42
Vkadaba 5:0728bde67bdb 43 #ifndef __ADMW1001_CONFIG_H__
Vkadaba 5:0728bde67bdb 44 #define __ADMW1001_CONFIG_H__
Vkadaba 5:0728bde67bdb 45
Vkadaba 5:0728bde67bdb 46 #include "admw_platform.h"
Vkadaba 5:0728bde67bdb 47 #include "admw1001_sensor_types.h"
Vkadaba 5:0728bde67bdb 48
Vkadaba 5:0728bde67bdb 49 /*! @addtogroup ADMW1001_Api
Vkadaba 5:0728bde67bdb 50 * @{
Vkadaba 5:0728bde67bdb 51 */
Vkadaba 5:0728bde67bdb 52
Vkadaba 5:0728bde67bdb 53 #ifdef __cplusplus
Vkadaba 5:0728bde67bdb 54 extern "C" {
Vkadaba 5:0728bde67bdb 55 #endif
Vkadaba 5:0728bde67bdb 56
Vkadaba 5:0728bde67bdb 57 /*! Maximum length allowed for a digital sensor command */
Vkadaba 5:0728bde67bdb 58 #define ADMW1001_SENSOR_COMMAND_MAX_LENGTH 7
Vkadaba 5:0728bde67bdb 59
Vkadaba 5:0728bde67bdb 60 /*! ADMW1001 channel priority options */
Vkadaba 45:f5f553b8c0d5 61 typedef enum
Vkadaba 45:f5f553b8c0d5 62 {
Vkadaba 5:0728bde67bdb 63 ADMW1001_CHANNEL_PRIORITY_0 = 0,
Vkadaba 5:0728bde67bdb 64 ADMW1001_CHANNEL_PRIORITY_1,
Vkadaba 5:0728bde67bdb 65 ADMW1001_CHANNEL_PRIORITY_2,
Vkadaba 5:0728bde67bdb 66 ADMW1001_CHANNEL_PRIORITY_3,
Vkadaba 5:0728bde67bdb 67 ADMW1001_CHANNEL_PRIORITY_4,
Vkadaba 5:0728bde67bdb 68 ADMW1001_CHANNEL_PRIORITY_5,
Vkadaba 5:0728bde67bdb 69 ADMW1001_CHANNEL_PRIORITY_6,
Vkadaba 5:0728bde67bdb 70 ADMW1001_CHANNEL_PRIORITY_7,
Vkadaba 5:0728bde67bdb 71 ADMW1001_CHANNEL_PRIORITY_8,
Vkadaba 5:0728bde67bdb 72 ADMW1001_CHANNEL_PRIORITY_9,
Vkadaba 5:0728bde67bdb 73 ADMW1001_CHANNEL_PRIORITY_10,
Vkadaba 5:0728bde67bdb 74 ADMW1001_CHANNEL_PRIORITY_11,
Vkadaba 5:0728bde67bdb 75 ADMW1001_CHANNEL_PRIORITY_12,
Vkadaba 5:0728bde67bdb 76
Vkadaba 5:0728bde67bdb 77 ADMW1001_CHANNEL_PRIORITY_HIGHEST = ADMW1001_CHANNEL_PRIORITY_0,
Vkadaba 8:2f2775c34640 78 ADMW1001_CHANNEL_PRIORITY_LOWEST = ADMW1001_CHANNEL_PRIORITY_12,
Vkadaba 8:2f2775c34640 79
Vkadaba 8:2f2775c34640 80 } ADMW1001_CHANNEL_PRIORITY;
Vkadaba 5:0728bde67bdb 81
Vkadaba 5:0728bde67bdb 82 /*! ADMW1001 operating mode options */
Vkadaba 45:f5f553b8c0d5 83 typedef enum
Vkadaba 45:f5f553b8c0d5 84 {
Vkadaba 5:0728bde67bdb 85 ADMW1001_OPERATING_MODE_SINGLECYCLE = 0,
Vkadaba 5:0728bde67bdb 86 /*!< Executes a single measurement cycle and stops */
Vkadaba 5:0728bde67bdb 87 ADMW1001_OPERATING_MODE_CONTINUOUS,
Vkadaba 5:0728bde67bdb 88 /*!< Continuously executes measurement cycles */
Vkadaba 8:2f2775c34640 89
Vkadaba 8:2f2775c34640 90 } ADMW1001_OPERATING_MODE;
Vkadaba 5:0728bde67bdb 91
Vkadaba 5:0728bde67bdb 92 /*! ADMW1001 data ready mode options */
Vkadaba 45:f5f553b8c0d5 93 typedef enum
Vkadaba 45:f5f553b8c0d5 94 {
Vkadaba 5:0728bde67bdb 95 ADMW1001_DATAREADY_PER_CONVERSION = 0,
Vkadaba 5:0728bde67bdb 96 /*!< The DATAREADY signal is asserted after completion of each conversion
Vkadaba 5:0728bde67bdb 97 * - a single data sample only from the latest completed conversion is
Vkadaba 5:0728bde67bdb 98 * stored in this mode
Vkadaba 5:0728bde67bdb 99 */
Vkadaba 5:0728bde67bdb 100 ADMW1001_DATAREADY_PER_CYCLE,
Vkadaba 5:0728bde67bdb 101 /*!< The DATAREADY signal is asserted after completion of each measurement
Vkadaba 5:0728bde67bdb 102 * cycle
Vkadaba 5:0728bde67bdb 103 * - data samples only from the lastest completed measurement cycle are
Vkadaba 5:0728bde67bdb 104 * stored in this mode
Vkadaba 5:0728bde67bdb 105 */
Vkadaba 8:2f2775c34640 106 ADMW1001_DATAREADY_PER_FIFO_FILL,
Vkadaba 8:2f2775c34640 107 /*!< The DATAREADY signal is asserted after each fill of the data FIFO
Vkadaba 8:2f2775c34640 108 * - applicable only when @ref ADMW1001_OPERATING_MODE_CONTINUOUS or
Vkadaba 8:2f2775c34640 109 * @ref ADMW1001_OPERATING_MODE_MULTICYCLE is also selected
Vkadaba 5:0728bde67bdb 110 */
Vkadaba 8:2f2775c34640 111
Vkadaba 8:2f2775c34640 112 } ADMW1001_DATAREADY_MODE;
Vkadaba 5:0728bde67bdb 113
Vkadaba 5:0728bde67bdb 114 /*! ADMW1001 power mode options */
Vkadaba 45:f5f553b8c0d5 115 typedef enum
Vkadaba 45:f5f553b8c0d5 116 {
Vkadaba 50:d84305e5e1c0 117 ADMW1001_POWER_MODE_ACTIVE = 0,
Vkadaba 50:d84305e5e1c0 118 /*!< Part is fully powered up and either cycling through a sequence or awaiting a configuration */
Vkadaba 50:d84305e5e1c0 119 ADMW1001_POWER_MODE_HIBERNATION,
Vkadaba 6:9d393a9677f4 120 /*!< module has entede hibernation mode. All analog circuitry is disabled. All peripherals disabled apart from the Wake-up pin functionality. */
Vkadaba 5:0728bde67bdb 121
Vkadaba 8:2f2775c34640 122 } ADMW1001_POWER_MODE;
Vkadaba 8:2f2775c34640 123
Vkadaba 72:35ea0b4e725b 124 /*! ADMW1001 External Vref Buffer Mode options */
Vkadaba 72:35ea0b4e725b 125 typedef enum
Vkadaba 72:35ea0b4e725b 126 {
Vkadaba 72:35ea0b4e725b 127 ADMW1001_VREF_BUFF_MODE_DISABLE_BOTH = 0,
Vkadaba 72:35ea0b4e725b 128 /*!< Both Vref+ and Vref- buffers to be disabled */
Vkadaba 72:35ea0b4e725b 129 ADMW1001_VREF_BUFF_MODE_ONLY_POS,
Vkadaba 72:35ea0b4e725b 130 /*!< only Vref+ buffer to be disabled */
Vkadaba 72:35ea0b4e725b 131 ADMW1001_VREF_BUFF_MODE_ONLY_NEG,
Vkadaba 72:35ea0b4e725b 132 /*!< Only Vref- buffers to be disabled */
Vkadaba 72:35ea0b4e725b 133 ADMW1001_VREF_BUFF_MODE_ENABLE_BOTH,
Vkadaba 72:35ea0b4e725b 134 /*!< Both Vref+ and Vref- buffers to be Enabled */
Vkadaba 72:35ea0b4e725b 135 } ADMW1001_VREF_BUFFER_MODE;
Vkadaba 5:0728bde67bdb 136
Vkadaba 5:0728bde67bdb 137 /*! ADMW1001 measurement unit options
Vkadaba 5:0728bde67bdb 138 *
Vkadaba 5:0728bde67bdb 139 * Optionally select a measurement unit for final conversion results.
Vkadaba 5:0728bde67bdb 140 * Currently applicable only to specific temperature sensor types.
Vkadaba 5:0728bde67bdb 141 */
Vkadaba 45:f5f553b8c0d5 142 typedef enum
Vkadaba 45:f5f553b8c0d5 143 {
Vkadaba 5:0728bde67bdb 144 ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED = 0,
Vkadaba 5:0728bde67bdb 145 /*!< No measurement unit specified */
Vkadaba 5:0728bde67bdb 146 ADMW1001_MEASUREMENT_UNIT_CELSIUS,
Vkadaba 5:0728bde67bdb 147 /*!< Celsius temperature unit - applicable to temperature sensors only */
Vkadaba 5:0728bde67bdb 148 ADMW1001_MEASUREMENT_UNIT_FAHRENHEIT,
Vkadaba 5:0728bde67bdb 149 /*!< Fahrenheit temperature unit - applicable to temperature sensors only */
Vkadaba 8:2f2775c34640 150
Vkadaba 8:2f2775c34640 151 } ADMW1001_MEASUREMENT_UNIT;
Vkadaba 5:0728bde67bdb 152
Vkadaba 45:f5f553b8c0d5 153 typedef enum
Vkadaba 45:f5f553b8c0d5 154 {
Vkadaba 33:df7a00f1b8e1 155 ADMW1001_BUFFER_BYPASSS_DISABLED = 0,
Vkadaba 33:df7a00f1b8e1 156 /*!< Buffer Bypass Disabled */
Vkadaba 33:df7a00f1b8e1 157 ADMW1001_BUFFER_BYPASSS_ENABLED,
Vkadaba 33:df7a00f1b8e1 158 /*!< Buffer Bypass Enabled */
Vkadaba 34:b60ee1e0af2b 159
Vkadaba 33:df7a00f1b8e1 160 } ADMW1001_BUFFER_BYPASSS;
Vkadaba 33:df7a00f1b8e1 161
Vkadaba 5:0728bde67bdb 162 /*! ADMW1001 analog input signal amplification gain options
Vkadaba 5:0728bde67bdb 163 *
Vkadaba 5:0728bde67bdb 164 * @note applicable only to ADC analog sensor channels
Vkadaba 5:0728bde67bdb 165 */
Vkadaba 45:f5f553b8c0d5 166 typedef enum
Vkadaba 45:f5f553b8c0d5 167 {
Vkadaba 6:9d393a9677f4 168 ADMW1001_ADC_RTD_CURVE_EUROPEAN = 0,
Vkadaba 6:9d393a9677f4 169 /*!< EUROPEAN RTD curve used. */
Vkadaba 6:9d393a9677f4 170 ADMW1001_ADC_RTD_CURVE_AMERICAN,
Vkadaba 6:9d393a9677f4 171 /*!< AMERICAN RTD curve used. */
Vkadaba 6:9d393a9677f4 172 ADMW1001_ADC_RTD_CURVE_JAPANESE,
Vkadaba 6:9d393a9677f4 173 /*!< JAPANESE RTD curve used. */
Vkadaba 6:9d393a9677f4 174 ADMW1001_ADC_RTD_CURVE_ITS90,
Vkadaba 6:9d393a9677f4 175 /*!< ITS90 RTD curve used. */
Vkadaba 8:2f2775c34640 176
Vkadaba 8:2f2775c34640 177 } ADMW1001_ADC_RTD_CURVE;
Vkadaba 6:9d393a9677f4 178 /*! ADMW1001 analog input signal amplification gain options
Vkadaba 6:9d393a9677f4 179 *
Vkadaba 6:9d393a9677f4 180 * @note applicable only to ADC analog sensor channels
Vkadaba 6:9d393a9677f4 181 */
Vkadaba 45:f5f553b8c0d5 182 typedef enum
Vkadaba 45:f5f553b8c0d5 183 {
Vkadaba 5:0728bde67bdb 184 ADMW1001_ADC_GAIN_1X = 0,
Vkadaba 5:0728bde67bdb 185 /*!< no amplification gain */
Vkadaba 5:0728bde67bdb 186 ADMW1001_ADC_GAIN_2X,
Vkadaba 5:0728bde67bdb 187 /*!< x2 amplification gain */
Vkadaba 5:0728bde67bdb 188 ADMW1001_ADC_GAIN_4X,
Vkadaba 5:0728bde67bdb 189 /*!< x4 amplification gain */
Vkadaba 5:0728bde67bdb 190 ADMW1001_ADC_GAIN_8X,
Vkadaba 5:0728bde67bdb 191 /*!< x8 amplification gain */
Vkadaba 5:0728bde67bdb 192 ADMW1001_ADC_GAIN_16X,
Vkadaba 5:0728bde67bdb 193 /*!< x16 amplification gain */
Vkadaba 5:0728bde67bdb 194 ADMW1001_ADC_GAIN_32X,
Vkadaba 5:0728bde67bdb 195 /*!< x32 amplification gain */
Vkadaba 5:0728bde67bdb 196 ADMW1001_ADC_GAIN_64X,
Vkadaba 5:0728bde67bdb 197 /*!< x64 amplification gain */
Vkadaba 8:2f2775c34640 198
Vkadaba 8:2f2775c34640 199 } ADMW1001_ADC_GAIN;
Vkadaba 5:0728bde67bdb 200
Vkadaba 6:9d393a9677f4 201 /*! ADMW1001 analog sensor excitation state options
Vkadaba 6:9d393a9677f4 202 *
Vkadaba 6:9d393a9677f4 203 * @note applicable only to ADC analog sensor channels, and
Vkadaba 6:9d393a9677f4 204 * specific sensor types
Vkadaba 6:9d393a9677f4 205 */
Vkadaba 45:f5f553b8c0d5 206 typedef enum
Vkadaba 45:f5f553b8c0d5 207 {
Vkadaba 45:f5f553b8c0d5 208 ADMW1001_ADC_EXC_STATE_CYCLE_POWER = 0,
Vkadaba 33:df7a00f1b8e1 209 /*!< Excitation for measurement is active only during measurement */
Vkadaba 6:9d393a9677f4 210 ADMW1001_ADC_EXC_STATE_ALWAYS_ON,
Vkadaba 6:9d393a9677f4 211 /*!< Excitation for measurement is always on */
Vkadaba 45:f5f553b8c0d5 212
Vkadaba 8:2f2775c34640 213 } ADMW1001_ADC_EXC_STATE;
Vkadaba 6:9d393a9677f4 214
Vkadaba 5:0728bde67bdb 215 /*! ADMW1001 analog sensor excitation current output level options
Vkadaba 5:0728bde67bdb 216 *
Vkadaba 5:0728bde67bdb 217 * @note applicable only to ADC analog sensor channels, and
Vkadaba 5:0728bde67bdb 218 * specific sensor types
Vkadaba 5:0728bde67bdb 219 */
Vkadaba 45:f5f553b8c0d5 220 typedef enum
Vkadaba 45:f5f553b8c0d5 221 {
Vkadaba 18:cbf514cce921 222 ADMW1001_ADC_NO_EXTERNAL_EXC_CURRENT = -1,
Vkadaba 34:b60ee1e0af2b 223 /*!< NO External excitation is provided */
Vkadaba 6:9d393a9677f4 224 ADMW1001_ADC_EXC_CURRENT_EXTERNAL = 0,
Vkadaba 34:b60ee1e0af2b 225 /*!< External excitation is provided */
Vkadaba 5:0728bde67bdb 226 ADMW1001_ADC_EXC_CURRENT_50uA,
Vkadaba 5:0728bde67bdb 227 /*!< 50uA excitation current enabled */
Vkadaba 5:0728bde67bdb 228 ADMW1001_ADC_EXC_CURRENT_100uA,
Vkadaba 5:0728bde67bdb 229 /*!< 100uA excitation current */
Vkadaba 5:0728bde67bdb 230 ADMW1001_ADC_EXC_CURRENT_250uA,
Vkadaba 5:0728bde67bdb 231 /*!< 250uA excitation current enabled */
Vkadaba 5:0728bde67bdb 232 ADMW1001_ADC_EXC_CURRENT_500uA,
Vkadaba 5:0728bde67bdb 233 /*!< 500uA excitation current enabled */
Vkadaba 5:0728bde67bdb 234 ADMW1001_ADC_EXC_CURRENT_1000uA,
Vkadaba 5:0728bde67bdb 235 /*!< 1mA excitation current enabled */
Vkadaba 8:2f2775c34640 236
Vkadaba 8:2f2775c34640 237 } ADMW1001_ADC_EXC_CURRENT;
Vkadaba 5:0728bde67bdb 238
Vkadaba 5:0728bde67bdb 239 /*! ADMW1001 analog sensor excitation current ratios used for diode sensor
Vkadaba 5:0728bde67bdb 240 *
Vkadaba 5:0728bde67bdb 241 * @note applicable only to a diode sensor
Vkadaba 5:0728bde67bdb 242 */
Vkadaba 45:f5f553b8c0d5 243 typedef enum
Vkadaba 45:f5f553b8c0d5 244 {
Vkadaba 34:b60ee1e0af2b 245 ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_10UA_100UA = 0,
Vkadaba 6:9d393a9677f4 246 /**< 2 Current measurement 10uA 100uA */
Vkadaba 34:b60ee1e0af2b 247 ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_20UA_160UA,
Vkadaba 6:9d393a9677f4 248 /**< 2 Current measurement 20uA 160uA */
Vkadaba 34:b60ee1e0af2b 249 ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_50UA_300UA,
Vkadaba 6:9d393a9677f4 250 /**< 2 Current measurement 50uA 300uA */
Vkadaba 34:b60ee1e0af2b 251 ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_100UA_600UA,
Vkadaba 6:9d393a9677f4 252 /**< 2 Current measurement 100uA 600uA */
Vkadaba 34:b60ee1e0af2b 253 ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_10UA_50UA_100UA,
Vkadaba 6:9d393a9677f4 254 /**< 3 current measuremetn 10uA 50uA 100uA */
Vkadaba 34:b60ee1e0af2b 255 ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_20UA_100UA_160UA,
Vkadaba 6:9d393a9677f4 256 /**< 3 current measuremetn 20uA 100uA 160uA */
Vkadaba 34:b60ee1e0af2b 257 ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_50UA_150UA_300UA,
Vkadaba 6:9d393a9677f4 258 /**< 3 current measuremetn 50uA 150uA 300uA */
Vkadaba 6:9d393a9677f4 259 ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_100UA_300UA_600UA,
Vkadaba 6:9d393a9677f4 260 /**< 3 current measuremetn 100uA 300uA 600uA */
Vkadaba 8:2f2775c34640 261
Vkadaba 8:2f2775c34640 262 } ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO;
Vkadaba 5:0728bde67bdb 263
Vkadaba 5:0728bde67bdb 264 /*! ADMW1001 analog reference selection options
Vkadaba 5:0728bde67bdb 265 *
Vkadaba 5:0728bde67bdb 266 * @note applicable only to ADC analog sensor channels, and
Vkadaba 5:0728bde67bdb 267 * specific sensor types
Vkadaba 5:0728bde67bdb 268 */
Vkadaba 45:f5f553b8c0d5 269 typedef enum
Vkadaba 45:f5f553b8c0d5 270 {
Vkadaba 8:2f2775c34640 271 ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL = 0,
Vkadaba 8:2f2775c34640 272 /*!< Internal VRef - 1.2V */
Vkadaba 61:0f16a2e3b58b 273 ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_1 = 1,
Vkadaba 8:2f2775c34640 274 /*!< External reference voltage #1 */
Vkadaba 61:0f16a2e3b58b 275 ADMW1001_ADC_REFERENCE_VOLTAGE_AVDD = 3,
Vkadaba 61:0f16a2e3b58b 276 /*!< Analog Supply Voltage AVDD reference (typically 3.3V) is selected */
Vkadaba 5:0728bde67bdb 277
Vkadaba 8:2f2775c34640 278 } ADMW1001_ADC_REFERENCE_TYPE;
Vkadaba 5:0728bde67bdb 279
Vkadaba 6:9d393a9677f4 280 /*! ADMW1001 ADC Reference configuration
Vkadaba 6:9d393a9677f4 281 *
Vkadaba 6:9d393a9677f4 282 * @note applicable only to ADC analog sensor channels
Vkadaba 6:9d393a9677f4 283 */
Vkadaba 45:f5f553b8c0d5 284 typedef enum
Vkadaba 45:f5f553b8c0d5 285 {
Vkadaba 6:9d393a9677f4 286 ADMW1001_ADC_GND_SW_OPEN = 0,
Vkadaba 6:9d393a9677f4 287 /*!< Ground switch not enabled for measurement. */
Vkadaba 6:9d393a9677f4 288 ADMW1001_ADC_GND_SW_CLOSED,
Vkadaba 8:2f2775c34640 289 /*!< Ground switch enabled for measurement. */
Vkadaba 8:2f2775c34640 290
Vkadaba 8:2f2775c34640 291 } ADMW1001_ADC_GND_SW;
Vkadaba 8:2f2775c34640 292
Vkadaba 8:2f2775c34640 293 /*! ADMW1001 analog filter chop mode
Vkadaba 8:2f2775c34640 294 *
Vkadaba 8:2f2775c34640 295 * @note applicable only to ADC analog sensor channels
Vkadaba 8:2f2775c34640 296 */
Vkadaba 45:f5f553b8c0d5 297 typedef enum
Vkadaba 45:f5f553b8c0d5 298 {
Vkadaba 63:2655a04c00f5 299 ADMW1001_CHOP_MD_OFF = 0,
Vkadaba 63:2655a04c00f5 300 /*!< chop performed. */
Vkadaba 63:2655a04c00f5 301 ADMW1001_CHOP_MD_ON,
Vkadaba 34:b60ee1e0af2b 302
Vkadaba 8:2f2775c34640 303 } ADMW1001_CHOP_MD;
Vkadaba 6:9d393a9677f4 304
Vkadaba 5:0728bde67bdb 305 /*! ADMW1001 analog filter selection options
Vkadaba 5:0728bde67bdb 306 *
Vkadaba 5:0728bde67bdb 307 * @note applicable only to ADC analog sensor channels
Vkadaba 5:0728bde67bdb 308 */
Vkadaba 45:f5f553b8c0d5 309 typedef enum
Vkadaba 45:f5f553b8c0d5 310 {
Vkadaba 6:9d393a9677f4 311 ADMW1001_ADC_FILTER_SINC4 = 0,
Vkadaba 8:2f2775c34640 312 /*!< SINC4 - 4th order sinc response filter */
Vkadaba 6:9d393a9677f4 313 ADMW1001_ADC_FILTER_SINC3,
Vkadaba 8:2f2775c34640 314 /*!< SINC3 - 3rd order sinc response filter */
Vkadaba 8:2f2775c34640 315
Vkadaba 8:2f2775c34640 316 } ADMW1001_ADC_FILTER_TYPE;
Vkadaba 8:2f2775c34640 317
Vkadaba 8:2f2775c34640 318 /*! ADMW1001 Sinc Filter range (SF)
Vkadaba 8:2f2775c34640 319 *
Vkadaba 8:2f2775c34640 320 * @note applicable only to ADC analog sensor channels
Vkadaba 34:b60ee1e0af2b 321 * @note SF must be set in conjunction with chop mode
Vkadaba 8:2f2775c34640 322 * and sinc filter type to achieve the desired sampling rate.
Vkadaba 8:2f2775c34640 323 */
Vkadaba 45:f5f553b8c0d5 324 typedef enum
Vkadaba 45:f5f553b8c0d5 325 {
Vkadaba 8:2f2775c34640 326 ADMW1001_SF_122HZ = 7,
Vkadaba 8:2f2775c34640 327 /*!< SF setting for 122Hz sample rate. */
Vkadaba 8:2f2775c34640 328 ADMW1001_SF_61HZ = 31,
Vkadaba 8:2f2775c34640 329 /*!< SF setting for 61Hz sample rate. */
Vkadaba 8:2f2775c34640 330 ADMW1001_SF_30P5HZ = 51,
Vkadaba 8:2f2775c34640 331 /*!< SF setting for 61Hz sample rate. */
Vkadaba 8:2f2775c34640 332 ADMW1001_SF_10HZ = 124,
Vkadaba 8:2f2775c34640 333 /*!< SF setting for 10Hz sample rate. */
Vkadaba 8:2f2775c34640 334 ADMW1001_SF_8P24HZ = 125,
Vkadaba 8:2f2775c34640 335 /*!< SF setting for 8.24Hz sample rate. */
Vkadaba 8:2f2775c34640 336 ADMW1001_SF_5HZ = 127,
Vkadaba 8:2f2775c34640 337 /*!< SF setting for 5Hz sample rate. */
Vkadaba 8:2f2775c34640 338
Vkadaba 8:2f2775c34640 339 } ADMW1001_SINC_FILTER_RANGE;
Vkadaba 5:0728bde67bdb 340
Vkadaba 5:0728bde67bdb 341 /*! ADMW1001 I2C clock speed options
Vkadaba 5:0728bde67bdb 342 *
Vkadaba 5:0728bde67bdb 343 * @note applicable only for I2C sensors
Vkadaba 5:0728bde67bdb 344 */
Vkadaba 45:f5f553b8c0d5 345 typedef enum
Vkadaba 45:f5f553b8c0d5 346 {
Vkadaba 8:2f2775c34640 347 ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K = 0,
Vkadaba 5:0728bde67bdb 348 /*!< 100kHz I2C clock speed */
Vkadaba 8:2f2775c34640 349 ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K,
Vkadaba 5:0728bde67bdb 350 /*!< 400kHz I2C clock speed */
Vkadaba 8:2f2775c34640 351
Vkadaba 8:2f2775c34640 352 } ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED;
Vkadaba 5:0728bde67bdb 353
Vkadaba 5:0728bde67bdb 354
Vkadaba 5:0728bde67bdb 355 /*! ADMW1001 Power Configuration options */
Vkadaba 45:f5f553b8c0d5 356 typedef struct
Vkadaba 45:f5f553b8c0d5 357 {
Vkadaba 5:0728bde67bdb 358 ADMW1001_POWER_MODE powerMode;
Vkadaba 5:0728bde67bdb 359 /*!< Power mode selection */
Vkadaba 8:2f2775c34640 360
Vkadaba 8:2f2775c34640 361 } ADMW1001_POWER_CONFIG;
Vkadaba 5:0728bde67bdb 362
Vkadaba 5:0728bde67bdb 363 /*! ADMW1001 Multi-Cycle Configuration options
Vkadaba 5:0728bde67bdb 364 *
Vkadaba 5:0728bde67bdb 365 * @note required only when ADMW1001_OPERATING_MODE_MULTICYCLE is selected
Vkadaba 5:0728bde67bdb 366 * as the operatingMode (@ref ADMW1001_MEASUREMENT_CONFIG)
Vkadaba 5:0728bde67bdb 367 */
Vkadaba 45:f5f553b8c0d5 368 typedef struct
Vkadaba 45:f5f553b8c0d5 369 {
Vkadaba 8:2f2775c34640 370 uint32_t cyclesPerBurst;
Vkadaba 5:0728bde67bdb 371 /*!< Number of cycles to complete for a single burst */
Vkadaba 8:2f2775c34640 372 uint32_t burstInterval;
Vkadaba 5:0728bde67bdb 373 /*!< Interval, in seconds, between each successive burst of cycles */
Vkadaba 8:2f2775c34640 374
Vkadaba 8:2f2775c34640 375 } ADMW1001_MULTICYCLE_CONFIG;
Vkadaba 5:0728bde67bdb 376
Vkadaba 5:0728bde67bdb 377 /*! ADMW1001 Measurement Configuration options */
Vkadaba 45:f5f553b8c0d5 378 typedef struct
Vkadaba 45:f5f553b8c0d5 379 {
Vkadaba 5:0728bde67bdb 380 ADMW1001_OPERATING_MODE operatingMode;
Vkadaba 5:0728bde67bdb 381 /*!< Operating mode - specifies how measurement cycles are scheduled */
Vkadaba 5:0728bde67bdb 382 ADMW1001_DATAREADY_MODE dataReadyMode;
Vkadaba 5:0728bde67bdb 383 /*!< Data read mode - specifies how output samples are stored for reading */
Vkadaba 45:f5f553b8c0d5 384 uint8_t excitationState;
Vkadaba 43:e1789b7214cf 385 /*!< Excitation current state */
Vkadaba 45:f5f553b8c0d5 386 uint8_t groundSwitch;
Vkadaba 45:f5f553b8c0d5 387 /*!< Option to open or close sensor ground switch */
Vkadaba 50:d84305e5e1c0 388 uint8_t fifoNumCycles;
Vkadaba 50:d84305e5e1c0 389 /*!< Specifies the number of cycles to fill a FIFO buffer
Vkadaba 50:d84305e5e1c0 390 * Applicable only when operatingMode is ADMW1001_OPERATING_MODE_CONTINUOUS
Vkadaba 34:b60ee1e0af2b 391 */
Vkadaba 8:2f2775c34640 392 uint32_t cycleInterval;
Vkadaba 8:2f2775c34640 393 /*!< Cycle interval - specifies the time interval between the start of each
Vkadaba 8:2f2775c34640 394 * successive measurement cycle. Applicable only when operatingMode is
Vkadaba 8:2f2775c34640 395 * not ADMW1001_OPERATING_MODE_SINGLECYCLE
Vkadaba 8:2f2775c34640 396 */
Vkadaba 8:2f2775c34640 397 bool vBiasEnable;
Vkadaba 8:2f2775c34640 398 /*!< Enable voltage Bias output of ADC
Vkadaba 8:2f2775c34640 399 */
Vkadaba 8:2f2775c34640 400 float32_t externalRef1Value;
Vkadaba 8:2f2775c34640 401 /*!< Voltage value connected to external reference input #1.
Vkadaba 5:0728bde67bdb 402 * Applicable only if the selected reference type is
Vkadaba 8:2f2775c34640 403 * voltage.
Vkadaba 5:0728bde67bdb 404 * (see @ref ADMW1001_ADC_REFERENCE_TYPE)
Vkadaba 34:b60ee1e0af2b 405 */
Vkadaba 33:df7a00f1b8e1 406 float32_t RSenseValue;
Vkadaba 34:b60ee1e0af2b 407 /*!< Sense resistor value in Ohms. */
Vkadaba 34:b60ee1e0af2b 408 float32_t externalRefVoltage;
Vkadaba 34:b60ee1e0af2b 409 /*!< External Reference Voltage.
Vkadaba 34:b60ee1e0af2b 410 */
Vkadaba 45:f5f553b8c0d5 411 float32_t AVDDVoltage;
Vkadaba 45:f5f553b8c0d5 412 /*!< AVDD Voltage.
Vkadaba 45:f5f553b8c0d5 413 */
Vkadaba 72:35ea0b4e725b 414 uint8_t extVrefBuffMode;
Vkadaba 72:35ea0b4e725b 415 /*!< External Vref Buff mode.
Vkadaba 72:35ea0b4e725b 416 uint32_t reserved1[3];
Vkadaba 45:f5f553b8c0d5 417 /*!< Reserved for future use and ensure word alignment.
Vkadaba 45:f5f553b8c0d5 418 */
Vkadaba 8:2f2775c34640 419
Vkadaba 8:2f2775c34640 420 } ADMW1001_MEASUREMENT_CONFIG;
Vkadaba 5:0728bde67bdb 421
Vkadaba 5:0728bde67bdb 422 /*! ADMW1001 ADC Excitation Current output configuration
Vkadaba 5:0728bde67bdb 423 *
Vkadaba 5:0728bde67bdb 424 * @note applicable only to ADC analog sensor channels, and
Vkadaba 5:0728bde67bdb 425 * specific sensor types
Vkadaba 5:0728bde67bdb 426 */
Vkadaba 45:f5f553b8c0d5 427 typedef struct
Vkadaba 45:f5f553b8c0d5 428 {
Vkadaba 5:0728bde67bdb 429 ADMW1001_ADC_EXC_CURRENT outputLevel;
Vkadaba 5:0728bde67bdb 430 /*!< Excitation current output level */
Vkadaba 5:0728bde67bdb 431 ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO diodeRatio;
Vkadaba 5:0728bde67bdb 432 /*!< Excitation current output diode ratio */
Vkadaba 45:f5f553b8c0d5 433 float32_t idealityRatio;
Vkadaba 8:2f2775c34640 434
Vkadaba 8:2f2775c34640 435 } ADMW1001_ADC_EXC_CURRENT_CONFIG;
Vkadaba 5:0728bde67bdb 436
Vkadaba 5:0728bde67bdb 437 /*! ADMW1001 ADC Filter configuration
Vkadaba 5:0728bde67bdb 438 *
Vkadaba 5:0728bde67bdb 439 * @note applicable only to ADC analog sensor channels
Vkadaba 5:0728bde67bdb 440 */
Vkadaba 45:f5f553b8c0d5 441 typedef struct
Vkadaba 45:f5f553b8c0d5 442 {
Vkadaba 8:2f2775c34640 443 ADMW1001_ADC_FILTER_TYPE type;
Vkadaba 5:0728bde67bdb 444 /*!< Filter type selection */
Vkadaba 8:2f2775c34640 445 ADMW1001_SINC_FILTER_RANGE sf;
Vkadaba 8:2f2775c34640 446 /*!< SF value used along with filter type and chop mode to determine speed */
Vkadaba 17:2f0028880874 447 ADMW1001_CHOP_MD chopMode;
Vkadaba 6:9d393a9677f4 448 /*!< Enable filter chop */
Vkadaba 8:2f2775c34640 449 bool notch1p2;
Vkadaba 6:9d393a9677f4 450 /*!< Enable Notch 2 Filter Mode */
Vkadaba 45:f5f553b8c0d5 451
Vkadaba 8:2f2775c34640 452 } ADMW1001_ADC_FILTER_CONFIG;
Vkadaba 5:0728bde67bdb 453
Vkadaba 5:0728bde67bdb 454 /*! ADMW1001 ADC analog channel configuration details
Vkadaba 5:0728bde67bdb 455 *
Vkadaba 5:0728bde67bdb 456 * @note applicable only to ADC analog sensor channels
Vkadaba 5:0728bde67bdb 457 */
Vkadaba 45:f5f553b8c0d5 458 typedef struct
Vkadaba 45:f5f553b8c0d5 459 {
Vkadaba 5:0728bde67bdb 460 ADMW1001_ADC_SENSOR_TYPE sensor;
Vkadaba 5:0728bde67bdb 461 /*!< Sensor type selection */
Vkadaba 6:9d393a9677f4 462 ADMW1001_ADC_RTD_CURVE rtdCurve;
Vkadaba 6:9d393a9677f4 463 /*!< Rtd curve selection */
Vkadaba 5:0728bde67bdb 464 ADMW1001_ADC_GAIN gain;
Vkadaba 5:0728bde67bdb 465 /*!< ADC Gain selection */
Vkadaba 5:0728bde67bdb 466 ADMW1001_ADC_EXC_CURRENT_CONFIG current;
Vkadaba 5:0728bde67bdb 467 /*!< ADC Excitation Current configuration */
Vkadaba 5:0728bde67bdb 468 ADMW1001_ADC_FILTER_CONFIG filter;
Vkadaba 5:0728bde67bdb 469 /*!< ADC Filter configuration */
Vkadaba 8:2f2775c34640 470 ADMW1001_ADC_REFERENCE_TYPE reference;
Vkadaba 5:0728bde67bdb 471 /*!< ADC Reference configuration */
Vkadaba 33:df7a00f1b8e1 472 uint8_t bufferBypass;
Vkadaba 45:f5f553b8c0d5 473 /*!< Buffer Bypass configuration */
Vkadaba 33:df7a00f1b8e1 474 uint8_t reserved0[2];
Vkadaba 8:2f2775c34640 475 /*!< Reserved for future use and ensure word alignment. */
Vkadaba 8:2f2775c34640 476 uint32_t reserved1[6];
Vkadaba 8:2f2775c34640 477 /*!< Reserved for future use and ensure word alignment. */
Vkadaba 8:2f2775c34640 478
Vkadaba 8:2f2775c34640 479 } ADMW1001_ADC_CHANNEL_CONFIG;
Vkadaba 8:2f2775c34640 480
Vkadaba 8:2f2775c34640 481 /*! ADMW1001 look-up table selection
Vkadaba 8:2f2775c34640 482 * Select table used to linearise the measurement.
Vkadaba 8:2f2775c34640 483 */
Vkadaba 45:f5f553b8c0d5 484 typedef enum
Vkadaba 45:f5f553b8c0d5 485 {
Vkadaba 8:2f2775c34640 486 ADMW1001_LUT_DEFAULT = 0,
Vkadaba 8:2f2775c34640 487 /*!< Default LUT */
Vkadaba 45:f5f553b8c0d5 488 ADMW1001_LUT_CUSTOM = 1,
Vkadaba 8:2f2775c34640 489 /*!< User defined custom LUT */
Vkadaba 45:f5f553b8c0d5 490 ADMW1001_LUT_RESERVED = 2,
Vkadaba 8:2f2775c34640 491 /*!< Reserved for future use */
Vkadaba 34:b60ee1e0af2b 492
Vkadaba 8:2f2775c34640 493 } ADMW1001_LUT_SELECT;
Vkadaba 5:0728bde67bdb 494
Vkadaba 5:0728bde67bdb 495 /*! ADMW1001 digital sensor data encoding
Vkadaba 5:0728bde67bdb 496 *
Vkadaba 5:0728bde67bdb 497 * @note applicable only to SPI and I2C digital sensor channels
Vkadaba 5:0728bde67bdb 498 */
Vkadaba 45:f5f553b8c0d5 499 typedef enum
Vkadaba 45:f5f553b8c0d5 500 {
Vkadaba 8:2f2775c34640 501 ADMW1001_DIGITAL_SENSOR_DATA_CODING_NONE = 0,
Vkadaba 5:0728bde67bdb 502 /**< None/Invalid - data format is ignored if coding is set to this value */
Vkadaba 5:0728bde67bdb 503 ADMW1001_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR,
Vkadaba 5:0728bde67bdb 504 /**< Unipolar - unsigned integer values */
Vkadaba 5:0728bde67bdb 505 ADMW1001_DIGITAL_SENSOR_DATA_CODING_TWOS_COMPLEMENT,
Vkadaba 5:0728bde67bdb 506 /**< Twos-complement - signed integer values */
Vkadaba 5:0728bde67bdb 507 ADMW1001_DIGITAL_SENSOR_DATA_CODING_OFFSET_BINARY,
Vkadaba 5:0728bde67bdb 508 /**< Offset Binary - used to represent signed values with unsigned integers,
Vkadaba 5:0728bde67bdb 509 * with the mid-range value representing 0 */
Vkadaba 8:2f2775c34640 510
Vkadaba 8:2f2775c34640 511 } ADMW1001_DIGITAL_SENSOR_DATA_CODING;
Vkadaba 5:0728bde67bdb 512
Vkadaba 5:0728bde67bdb 513 /*! ADMW1001 digital sensor data format configuration
Vkadaba 5:0728bde67bdb 514 *
Vkadaba 5:0728bde67bdb 515 * @note applicable only to SPI and I2C digital sensor channels
Vkadaba 5:0728bde67bdb 516 */
Vkadaba 45:f5f553b8c0d5 517 typedef struct
Vkadaba 45:f5f553b8c0d5 518 {
Vkadaba 5:0728bde67bdb 519 ADMW1001_DIGITAL_SENSOR_DATA_CODING coding;
Vkadaba 5:0728bde67bdb 520 /**< Data Encoding of Sensor Result */
Vkadaba 5:0728bde67bdb 521 bool littleEndian;
Vkadaba 5:0728bde67bdb 522 /**< Set as true if data format is little-endian, false otherwise */
Vkadaba 5:0728bde67bdb 523 bool leftJustified;
Vkadaba 5:0728bde67bdb 524 /**< Set as true if data is left-justified in the data frame, false otherwise */
Vkadaba 5:0728bde67bdb 525 uint8_t frameLength;
Vkadaba 5:0728bde67bdb 526 /**< Data frame length (number of bytes to read from the sensor) */
Vkadaba 5:0728bde67bdb 527 uint8_t numDataBits;
Vkadaba 5:0728bde67bdb 528 /**< Number of relevant data bits to extract from the data frame */
Vkadaba 5:0728bde67bdb 529 uint8_t bitOffset;
Vkadaba 5:0728bde67bdb 530 /**< Data bit offset, relative to data alignment within the data frame */
Vkadaba 8:2f2775c34640 531 uint8_t reserved[2];
Vkadaba 8:2f2775c34640 532 /*!< Reserved for future use and ensure word alignment. */
Vkadaba 8:2f2775c34640 533
Vkadaba 8:2f2775c34640 534 } ADMW1001_DIGITAL_SENSOR_DATA_FORMAT;
Vkadaba 5:0728bde67bdb 535
Vkadaba 5:0728bde67bdb 536
Vkadaba 5:0728bde67bdb 537 /*! ADMW1001 digital sensor communication config
Vkadaba 5:0728bde67bdb 538 *
Vkadaba 5:0728bde67bdb 539 * @note applicable only to digital sensor channels
Vkadaba 5:0728bde67bdb 540 */
Vkadaba 45:f5f553b8c0d5 541 typedef struct
Vkadaba 45:f5f553b8c0d5 542 {
Vkadaba 8:2f2775c34640 543 bool useCustomCommsConfig;
Vkadaba 5:0728bde67bdb 544 /*!< Optional parameter to enable user digital communication settings */
Vkadaba 8:2f2775c34640 545 ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED i2cClockSpeed;
Vkadaba 5:0728bde67bdb 546 /*!< Optional parameter to configure specific i2c speed for i2c sensor */
Vkadaba 8:2f2775c34640 547
Vkadaba 8:2f2775c34640 548 } ADMW1001_DIGITAL_SENSOR_COMMS;
Vkadaba 5:0728bde67bdb 549
Vkadaba 5:0728bde67bdb 550 /*! ADMW1001 I2C digital channel configuration details
Vkadaba 5:0728bde67bdb 551 *
Vkadaba 5:0728bde67bdb 552 * @note applicable only to I2C digital sensor channels
Vkadaba 5:0728bde67bdb 553 */
Vkadaba 45:f5f553b8c0d5 554 typedef struct
Vkadaba 45:f5f553b8c0d5 555 {
Vkadaba 8:2f2775c34640 556 ADMW1001_I2C_SENSOR_TYPE sensor;
Vkadaba 5:0728bde67bdb 557 /*!< Sensor type selection */
Vkadaba 8:2f2775c34640 558 uint8_t deviceAddress;
Vkadaba 5:0728bde67bdb 559 /*!< I2C device address (7-bit) */
Vkadaba 8:2f2775c34640 560 uint8_t reserved;
Vkadaba 8:2f2775c34640 561 /*!< Reserved for future use and ensure word alignment. */
Vkadaba 8:2f2775c34640 562 ADMW1001_DIGITAL_SENSOR_DATA_FORMAT dataFormat;
Vkadaba 5:0728bde67bdb 563 /*!< Optional data format configuration to parse/extract data from the device.
Vkadaba 5:0728bde67bdb 564 * A default data format will be used if this is not specified.
Vkadaba 5:0728bde67bdb 565 * Applicable only to specific I2C sensor types
Vkadaba 5:0728bde67bdb 566 */
Vkadaba 8:2f2775c34640 567 ADMW1001_DIGITAL_SENSOR_COMMS configureComms;
Vkadaba 5:0728bde67bdb 568 /*!< Optional configuration to setup a user communication config.
Vkadaba 5:0728bde67bdb 569 * A default configuration will be used if this is not specified.
Vkadaba 5:0728bde67bdb 570 * Applicable only to specific I2C sensor types.
Vkadaba 5:0728bde67bdb 571 */
Vkadaba 8:2f2775c34640 572
Vkadaba 8:2f2775c34640 573 } ADMW1001_I2C_CHANNEL_CONFIG;
Vkadaba 5:0728bde67bdb 574
Vkadaba 5:0728bde67bdb 575
Vkadaba 5:0728bde67bdb 576 /*! ADMW1001 Measurement Channel configuration details */
Vkadaba 45:f5f553b8c0d5 577 typedef struct
Vkadaba 45:f5f553b8c0d5 578 {
Vkadaba 8:2f2775c34640 579 bool enableChannel;
Vkadaba 5:0728bde67bdb 580 /*!< Option to include this channel in normal measurement cycles */
Vkadaba 8:2f2775c34640 581 bool disablePublishing;
Vkadaba 5:0728bde67bdb 582 /*!< Option to disable publishing of data samples from this channel. The
Vkadaba 5:0728bde67bdb 583 * channel may still be included in measurement cycles, but data samples
Vkadaba 5:0728bde67bdb 584 * obtained from this channel will not be published. This is typically
Vkadaba 5:0728bde67bdb 585 * used for channels which are required only as a compensation reference
Vkadaba 5:0728bde67bdb 586 * for another channel (e.g. Cold-Junction Compensation channels).
Vkadaba 5:0728bde67bdb 587 */
Vkadaba 8:2f2775c34640 588 ADMW1001_CH_ID compensationChannel;
Vkadaba 8:2f2775c34640 589 /*!< Optional compensation channel. Set to ADMW1001_CH_ID_NONE if not
Vkadaba 5:0728bde67bdb 590 * required. Typically used for thermocouple sensors that require a
Vkadaba 5:0728bde67bdb 591 * separate measurement of the "cold-junction" temperature, which can be
Vkadaba 5:0728bde67bdb 592 * be provided by an RTD temperature sensor connected on a separate
Vkadaba 5:0728bde67bdb 593 * "compensation channel" */
Vkadaba 8:2f2775c34640 594 ADMW1001_LUT_SELECT lutSelect;
Vkadaba 8:2f2775c34640 595 /*!<Select Look Up Table LUT for calculations, this implies that the
Vkadaba 5:0728bde67bdb 596 * fundamental measurement for the sensor (typically mV or Ohms)
Vkadaba 8:2f2775c34640 597 * 0 = default, 1= unity, 2 = custom
Vkadaba 5:0728bde67bdb 598 */
Vkadaba 8:2f2775c34640 599 ADMW1001_MEASUREMENT_UNIT measurementUnit;
Vkadaba 5:0728bde67bdb 600 /*!< Optional measurement unit selection for conversion results. Applicable
Vkadaba 5:0728bde67bdb 601 * only for certain sensor types. Set to
Vkadaba 5:0728bde67bdb 602 * ADMW1001_MEASUREMENT_UNIT_DEFAULT if not applicable.
Vkadaba 5:0728bde67bdb 603 */
Vkadaba 8:2f2775c34640 604 float32_t lowThreshold;
Vkadaba 5:0728bde67bdb 605 /*!< Optional minimum threshold value for each processed sample, to be
Vkadaba 5:0728bde67bdb 606 * checked prior to publishing. A channel ALERT condition is raised
Vkadaba 5:0728bde67bdb 607 * if the processed value is lower than this threshold. Set to NaN
Vkadaba 5:0728bde67bdb 608 * if not required.
Vkadaba 5:0728bde67bdb 609 */
Vkadaba 8:2f2775c34640 610 float32_t highThreshold;
Vkadaba 5:0728bde67bdb 611 /*!< Optional maximum threshold value for each processed sample, to be
Vkadaba 5:0728bde67bdb 612 * checked prior to publishing. A channel ALERT condition is raised
Vkadaba 5:0728bde67bdb 613 * if the processed value is higher than this threshold. Set to NaN
Vkadaba 5:0728bde67bdb 614 * if not required.
Vkadaba 5:0728bde67bdb 615 */
Vkadaba 8:2f2775c34640 616 float32_t offsetAdjustment;
Vkadaba 5:0728bde67bdb 617 /*!< Optional offset adjustment value applied to each processed sample.
Vkadaba 5:0728bde67bdb 618 * Set to NaN or 0.0 if not required.
Vkadaba 5:0728bde67bdb 619 */
Vkadaba 8:2f2775c34640 620 float32_t gainAdjustment;
Vkadaba 5:0728bde67bdb 621 /*!< Optional gain adjustment value applied to each processed sample.
Vkadaba 5:0728bde67bdb 622 * Set to NaN or 1.0 if not required.
Vkadaba 5:0728bde67bdb 623 */
Vkadaba 8:2f2775c34640 624 float32_t sensorParameter;
Vkadaba 5:0728bde67bdb 625 /*!< Optional sensor parameter adjustment.
Vkadaba 5:0728bde67bdb 626 * Set to NaN or 0 if not required.
Vkadaba 5:0728bde67bdb 627 */
Vkadaba 8:2f2775c34640 628 uint32_t measurementsPerCycle;
Vkadaba 5:0728bde67bdb 629 /*!< The number of measurements to obtain from this channel within each
Vkadaba 5:0728bde67bdb 630 * cycle. Each enabled channel is measured in turn, until the number of
Vkadaba 5:0728bde67bdb 631 * measurements requested for the channel has been reached. A different
Vkadaba 5:0728bde67bdb 632 * number of measurements-per-cycle may be specified for each channel.
Vkadaba 5:0728bde67bdb 633 */
Vkadaba 8:2f2775c34640 634 uint32_t cycleSkipCount;
Vkadaba 5:0728bde67bdb 635 /*!< Optional number of cycles to skip, such that this channel is included
Vkadaba 5:0728bde67bdb 636 * in the sequence in only one of every (cycleSkipCount + 1) cycles that
Vkadaba 5:0728bde67bdb 637 * occur. If set to 0 (default), this channel is included in every cycle;
Vkadaba 5:0728bde67bdb 638 * if set to 1, this channel is included in every 2nd cycle; if set to 2,
Vkadaba 5:0728bde67bdb 639 * this channel is included in every 3rd cycle, and so on.
Vkadaba 5:0728bde67bdb 640 */
Vkadaba 8:2f2775c34640 641 uint32_t extraSettlingTime;
Vkadaba 5:0728bde67bdb 642 /*!< A minimum settling time is applied internally for each channel, based
Vkadaba 45:f5f553b8c0d5 643 * on the sensor type. However, additional settling time (milliseconds)
Vkadaba 5:0728bde67bdb 644 * can optionally be specified. Set to 0 if not required.
Vkadaba 5:0728bde67bdb 645 */
Vkadaba 8:2f2775c34640 646 ADMW1001_CHANNEL_PRIORITY priority;
Vkadaba 5:0728bde67bdb 647 /*!< By default, channels are arranged in the measurement sequence based on
Vkadaba 5:0728bde67bdb 648 * ascending order of channel ID. However, a priority-level may be
Vkadaba 5:0728bde67bdb 649 * specified per channel to force a different ordering of the channels,
Vkadaba 5:0728bde67bdb 650 * with higher-priority channels appearing before lower-priority channels.
Vkadaba 5:0728bde67bdb 651 * Channels with equal priority are ordered by ascending order of channel
Vkadaba 5:0728bde67bdb 652 * ID. Lower numbers indicate higher priority, with 0 being the highest.
Vkadaba 5:0728bde67bdb 653 * Set to 0 if not required.
Vkadaba 5:0728bde67bdb 654 */
Vkadaba 45:f5f553b8c0d5 655 union
Vkadaba 45:f5f553b8c0d5 656 {
Vkadaba 8:2f2775c34640 657 ADMW1001_ADC_CHANNEL_CONFIG adcChannelConfig;
Vkadaba 5:0728bde67bdb 658 /*!< ADC channel configuration - applicable only to ADC channels */
Vkadaba 8:2f2775c34640 659 ADMW1001_I2C_CHANNEL_CONFIG i2cChannelConfig;
Vkadaba 5:0728bde67bdb 660 /*!< I2C channel configuration - applicable only to I2C channels */
Vkadaba 5:0728bde67bdb 661 };
Vkadaba 6:9d393a9677f4 662 /*!< Only one of adcChannelConfig, i2cChannelConfig, spiChannelConfig
Vkadaba 6:9d393a9677f4 663 * is required, depending on the channel designation
Vkadaba 6:9d393a9677f4 664 * (analog, I2C, SPI)
Vkadaba 5:0728bde67bdb 665 */
Vkadaba 8:2f2775c34640 666
Vkadaba 8:2f2775c34640 667 } ADMW1001_CHANNEL_CONFIG;
Vkadaba 5:0728bde67bdb 668
Vkadaba 5:0728bde67bdb 669 /*! ADMW1001 Diagnostics configuration details */
Vkadaba 45:f5f553b8c0d5 670 typedef struct
Vkadaba 45:f5f553b8c0d5 671 {
Vkadaba 8:2f2775c34640 672 bool disableGlobalDiag;
Vkadaba 5:0728bde67bdb 673 /*!< Option to disable the following diagnostic checks on the ADC:
Vkadaba 5:0728bde67bdb 674 * - Reference Detection errors
Vkadaba 5:0728bde67bdb 675 * - Input under-/over-voltage errors
Vkadaba 5:0728bde67bdb 676 * - Calibration, Conversion and Saturation errors
Vkadaba 5:0728bde67bdb 677 */
Vkadaba 8:2f2775c34640 678 bool disableMeasurementDiag;
Vkadaba 5:0728bde67bdb 679 /*!< Option to disable additional checks per measurement channel:
Vkadaba 5:0728bde67bdb 680 * - High/low threshold limit violation
Vkadaba 5:0728bde67bdb 681 */
Vkadaba 8:2f2775c34640 682
Vkadaba 8:2f2775c34640 683 bool disableCriticalTempAbort;
Vkadaba 5:0728bde67bdb 684 /*!< Option to disable abort of measurement cycle if the operating
Vkadaba 5:0728bde67bdb 685 * temperature of the ADMW1001 has exceeded critical limits
Vkadaba 5:0728bde67bdb 686 */
Vkadaba 8:2f2775c34640 687
Vkadaba 45:f5f553b8c0d5 688 uint8_t osdFrequency;
Vkadaba 5:0728bde67bdb 689 /*!< Option to enable Open-Circuit Detection at a selected cycle interval */
Vkadaba 5:0728bde67bdb 690
Vkadaba 8:2f2775c34640 691 } ADMW1001_DIAGNOSTICS_CONFIG;
Vkadaba 8:2f2775c34640 692
Vkadaba 5:0728bde67bdb 693
Vkadaba 5:0728bde67bdb 694 /*! ADMW1001 Device configuration details */
Vkadaba 45:f5f553b8c0d5 695 typedef struct
Vkadaba 45:f5f553b8c0d5 696 {
Vkadaba 5:0728bde67bdb 697 ADMW1001_POWER_CONFIG power;
Vkadaba 5:0728bde67bdb 698 /*!< Power configuration details */
Vkadaba 5:0728bde67bdb 699 ADMW1001_MEASUREMENT_CONFIG measurement;
Vkadaba 5:0728bde67bdb 700 /*!< Measurement configuration details */
Vkadaba 5:0728bde67bdb 701 ADMW1001_DIAGNOSTICS_CONFIG diagnostics;
Vkadaba 5:0728bde67bdb 702 /*!< FFT configuration details */
Vkadaba 5:0728bde67bdb 703 ADMW1001_CHANNEL_CONFIG channels[ADMW1001_MAX_CHANNELS];
Vkadaba 5:0728bde67bdb 704 /*!< Channel-specific configuration details */
Vkadaba 8:2f2775c34640 705
Vkadaba 8:2f2775c34640 706 } ADMW1001_CONFIG;
Vkadaba 5:0728bde67bdb 707
Vkadaba 5:0728bde67bdb 708 #ifdef __cplusplus
Vkadaba 5:0728bde67bdb 709 }
Vkadaba 5:0728bde67bdb 710 #endif
Vkadaba 5:0728bde67bdb 711
Vkadaba 5:0728bde67bdb 712 /*!
Vkadaba 5:0728bde67bdb 713 * @}
Vkadaba 5:0728bde67bdb 714 */
Vkadaba 5:0728bde67bdb 715
Vkadaba 5:0728bde67bdb 716 #endif /* __ADMW1001_CONFIG_H__ */