![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Minor changes to support ADMW FWv1.17.75
inc/admw1001/admw1001_config.h@6:9d393a9677f4, 2019-06-15 (annotated)
- Committer:
- Vkadaba
- Date:
- Sat Jun 15 14:30:49 2019 +0000
- Revision:
- 6:9d393a9677f4
- Parent:
- 5:0728bde67bdb
- Child:
- 8:2f2775c34640
Register map is updated and sensor config files are modified
Who changed what in which revision?
User | Revision | Line number | New 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 | /* Undefine for versions prior to V2.3. */ |
Vkadaba | 5:0728bde67bdb | 50 | #undef __V2_3_CFG_FMT__ |
Vkadaba | 5:0728bde67bdb | 51 | |
Vkadaba | 5:0728bde67bdb | 52 | |
Vkadaba | 5:0728bde67bdb | 53 | /*! @addtogroup ADMW1001_Api |
Vkadaba | 5:0728bde67bdb | 54 | * @{ |
Vkadaba | 5:0728bde67bdb | 55 | */ |
Vkadaba | 5:0728bde67bdb | 56 | |
Vkadaba | 5:0728bde67bdb | 57 | #ifdef __cplusplus |
Vkadaba | 5:0728bde67bdb | 58 | extern "C" { |
Vkadaba | 5:0728bde67bdb | 59 | #endif |
Vkadaba | 5:0728bde67bdb | 60 | |
Vkadaba | 5:0728bde67bdb | 61 | /*! Maximum length allowed for a digital sensor command */ |
Vkadaba | 5:0728bde67bdb | 62 | #define ADMW1001_SENSOR_COMMAND_MAX_LENGTH 7 |
Vkadaba | 5:0728bde67bdb | 63 | |
Vkadaba | 5:0728bde67bdb | 64 | /*! ADMW1001 channel priority options */ |
Vkadaba | 5:0728bde67bdb | 65 | typedef enum { |
Vkadaba | 5:0728bde67bdb | 66 | ADMW1001_CHANNEL_PRIORITY_0 = 0, |
Vkadaba | 5:0728bde67bdb | 67 | ADMW1001_CHANNEL_PRIORITY_1, |
Vkadaba | 5:0728bde67bdb | 68 | ADMW1001_CHANNEL_PRIORITY_2, |
Vkadaba | 5:0728bde67bdb | 69 | ADMW1001_CHANNEL_PRIORITY_3, |
Vkadaba | 5:0728bde67bdb | 70 | ADMW1001_CHANNEL_PRIORITY_4, |
Vkadaba | 5:0728bde67bdb | 71 | ADMW1001_CHANNEL_PRIORITY_5, |
Vkadaba | 5:0728bde67bdb | 72 | ADMW1001_CHANNEL_PRIORITY_6, |
Vkadaba | 5:0728bde67bdb | 73 | ADMW1001_CHANNEL_PRIORITY_7, |
Vkadaba | 5:0728bde67bdb | 74 | ADMW1001_CHANNEL_PRIORITY_8, |
Vkadaba | 5:0728bde67bdb | 75 | ADMW1001_CHANNEL_PRIORITY_9, |
Vkadaba | 5:0728bde67bdb | 76 | ADMW1001_CHANNEL_PRIORITY_10, |
Vkadaba | 5:0728bde67bdb | 77 | ADMW1001_CHANNEL_PRIORITY_11, |
Vkadaba | 5:0728bde67bdb | 78 | ADMW1001_CHANNEL_PRIORITY_12, |
Vkadaba | 5:0728bde67bdb | 79 | ADMW1001_CHANNEL_PRIORITY_13, |
Vkadaba | 5:0728bde67bdb | 80 | ADMW1001_CHANNEL_PRIORITY_14, |
Vkadaba | 5:0728bde67bdb | 81 | ADMW1001_CHANNEL_PRIORITY_15, |
Vkadaba | 5:0728bde67bdb | 82 | |
Vkadaba | 5:0728bde67bdb | 83 | ADMW1001_CHANNEL_PRIORITY_HIGHEST = ADMW1001_CHANNEL_PRIORITY_0, |
Vkadaba | 5:0728bde67bdb | 84 | ADMW1001_CHANNEL_PRIORITY_LOWEST = ADMW1001_CHANNEL_PRIORITY_15, |
Vkadaba | 5:0728bde67bdb | 85 | } ADMW1001_CHANNEL_PRIORITY; |
Vkadaba | 5:0728bde67bdb | 86 | |
Vkadaba | 5:0728bde67bdb | 87 | /*! ADMW1001 operating mode options */ |
Vkadaba | 5:0728bde67bdb | 88 | typedef enum { |
Vkadaba | 5:0728bde67bdb | 89 | ADMW1001_OPERATING_MODE_SINGLECYCLE = 0, |
Vkadaba | 5:0728bde67bdb | 90 | /*!< Executes a single measurement cycle and stops */ |
Vkadaba | 5:0728bde67bdb | 91 | ADMW1001_OPERATING_MODE_CONTINUOUS, |
Vkadaba | 5:0728bde67bdb | 92 | /*!< Continuously executes measurement cycles */ |
Vkadaba | 5:0728bde67bdb | 93 | ADMW1001_OPERATING_MODE_MULTICYCLE, |
Vkadaba | 5:0728bde67bdb | 94 | /*!< Executes a burst of measurement cycles, repeated at defined intervals */ |
Vkadaba | 5:0728bde67bdb | 95 | } ADMW1001_OPERATING_MODE; |
Vkadaba | 5:0728bde67bdb | 96 | |
Vkadaba | 5:0728bde67bdb | 97 | /*! ADMW1001 data ready mode options */ |
Vkadaba | 5:0728bde67bdb | 98 | typedef enum { |
Vkadaba | 5:0728bde67bdb | 99 | ADMW1001_DATAREADY_PER_CONVERSION = 0, |
Vkadaba | 5:0728bde67bdb | 100 | /*!< The DATAREADY signal is asserted after completion of each conversion |
Vkadaba | 5:0728bde67bdb | 101 | * - a single data sample only from the latest completed conversion is |
Vkadaba | 5:0728bde67bdb | 102 | * stored in this mode |
Vkadaba | 5:0728bde67bdb | 103 | */ |
Vkadaba | 5:0728bde67bdb | 104 | ADMW1001_DATAREADY_PER_CYCLE, |
Vkadaba | 5:0728bde67bdb | 105 | /*!< The DATAREADY signal is asserted after completion of each measurement |
Vkadaba | 5:0728bde67bdb | 106 | * cycle |
Vkadaba | 5:0728bde67bdb | 107 | * - data samples only from the lastest completed measurement cycle are |
Vkadaba | 5:0728bde67bdb | 108 | * stored in this mode |
Vkadaba | 5:0728bde67bdb | 109 | */ |
Vkadaba | 5:0728bde67bdb | 110 | ADMW1001_DATAREADY_PER_MULTICYCLE_BURST, |
Vkadaba | 5:0728bde67bdb | 111 | /*!< The DATAREADY signal is asserted after completion of each burst of |
Vkadaba | 5:0728bde67bdb | 112 | * measurement cycles |
Vkadaba | 5:0728bde67bdb | 113 | * - applicable only when @ref ADMW1001_OPERATING_MODE_MULTICYCLE |
Vkadaba | 5:0728bde67bdb | 114 | * is also selected |
Vkadaba | 5:0728bde67bdb | 115 | * - data samples only from the lastest completed burst of measurement |
Vkadaba | 5:0728bde67bdb | 116 | * cycles are stored in this mode |
Vkadaba | 5:0728bde67bdb | 117 | */ |
Vkadaba | 5:0728bde67bdb | 118 | } ADMW1001_DATAREADY_MODE; |
Vkadaba | 5:0728bde67bdb | 119 | |
Vkadaba | 5:0728bde67bdb | 120 | /*! ADMW1001 power mode options */ |
Vkadaba | 5:0728bde67bdb | 121 | typedef enum { |
Vkadaba | 6:9d393a9677f4 | 122 | ADMW1001_POWER_MODE_HIBERNATION = 0, |
Vkadaba | 6:9d393a9677f4 | 123 | /*!< module has entede hibernation mode. All analog circuitry is disabled. All peripherals disabled apart from the Wake-up pin functionality. */ |
Vkadaba | 6:9d393a9677f4 | 124 | ADMW1001_POWER_MODE_ACTIVE, |
Vkadaba | 6:9d393a9677f4 | 125 | /*!< Part is fully powered up and either cycling through a sequence or awaiting a configuration */ |
Vkadaba | 5:0728bde67bdb | 126 | } ADMW1001_POWER_MODE; |
Vkadaba | 5:0728bde67bdb | 127 | |
Vkadaba | 5:0728bde67bdb | 128 | #ifdef __V2_3_CFG_FMT__ |
Vkadaba | 5:0728bde67bdb | 129 | /*! ADMW1001 measurement analog filter settling options */ |
Vkadaba | 5:0728bde67bdb | 130 | typedef enum |
Vkadaba | 5:0728bde67bdb | 131 | { |
Vkadaba | 5:0728bde67bdb | 132 | ADMW1001_FILTER_SETTLING_ALWAYS = 0, |
Vkadaba | 5:0728bde67bdb | 133 | /*!< Allow full settling time to elapse between every measurement from an analog sensor */ |
Vkadaba | 6:9d393a9677f4 | 134 | ADMW1001_FILTER_SETTLING_FAST, |
Vkadaba | 5:0728bde67bdb | 135 | /*!< Skip settling time between consecutive measurements from an analog sensor */ |
Vkadaba | 5:0728bde67bdb | 136 | } ADMW1001_FILTER_SETTLING; |
Vkadaba | 5:0728bde67bdb | 137 | #endif |
Vkadaba | 5:0728bde67bdb | 138 | |
Vkadaba | 5:0728bde67bdb | 139 | /*! ADMW1001 measurement unit options |
Vkadaba | 5:0728bde67bdb | 140 | * |
Vkadaba | 5:0728bde67bdb | 141 | * Optionally select a measurement unit for final conversion results. |
Vkadaba | 5:0728bde67bdb | 142 | * Currently applicable only to specific temperature sensor types. |
Vkadaba | 5:0728bde67bdb | 143 | */ |
Vkadaba | 5:0728bde67bdb | 144 | typedef enum { |
Vkadaba | 5:0728bde67bdb | 145 | ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED = 0, |
Vkadaba | 5:0728bde67bdb | 146 | /*!< No measurement unit specified */ |
Vkadaba | 5:0728bde67bdb | 147 | ADMW1001_MEASUREMENT_UNIT_CELSIUS, |
Vkadaba | 5:0728bde67bdb | 148 | /*!< Celsius temperature unit - applicable to temperature sensors only */ |
Vkadaba | 5:0728bde67bdb | 149 | ADMW1001_MEASUREMENT_UNIT_FAHRENHEIT, |
Vkadaba | 5:0728bde67bdb | 150 | /*!< Fahrenheit temperature unit - applicable to temperature sensors only */ |
Vkadaba | 5:0728bde67bdb | 151 | } ADMW1001_MEASUREMENT_UNIT; |
Vkadaba | 5:0728bde67bdb | 152 | |
Vkadaba | 5:0728bde67bdb | 153 | /*! ADMW1001 Open-Sensor Diagnostics frequency |
Vkadaba | 5:0728bde67bdb | 154 | * |
Vkadaba | 5:0728bde67bdb | 155 | * Select the per-cycle frequency at which open-sensor diagnostic |
Vkadaba | 5:0728bde67bdb | 156 | * checks should be performed. Open-sensor diagnostic checks typically require |
Vkadaba | 5:0728bde67bdb | 157 | * specific or time-consuming processing which cannot be executed while a |
Vkadaba | 5:0728bde67bdb | 158 | * measurement cycle is running. |
Vkadaba | 5:0728bde67bdb | 159 | * |
Vkadaba | 5:0728bde67bdb | 160 | * @note Open-sensor diagnostic checks, when performed, will add a delay to the |
Vkadaba | 5:0728bde67bdb | 161 | * start of the next measurement cycle. |
Vkadaba | 5:0728bde67bdb | 162 | */ |
Vkadaba | 5:0728bde67bdb | 163 | typedef enum { |
Vkadaba | 5:0728bde67bdb | 164 | ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED = 0, |
Vkadaba | 5:0728bde67bdb | 165 | /*!< No Open-Sensor Detection is performed */ |
Vkadaba | 5:0728bde67bdb | 166 | ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_CYCLE, |
Vkadaba | 5:0728bde67bdb | 167 | /*!< No Open-Sensor Detection is performed prior to each cycle */ |
Vkadaba | 5:0728bde67bdb | 168 | ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_100_CYCLES, |
Vkadaba | 5:0728bde67bdb | 169 | /*!< No Open-Sensor Detection is performed at intervals of 100 cycles */ |
Vkadaba | 5:0728bde67bdb | 170 | ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_1000_CYCLES, |
Vkadaba | 6:9d393a9677f4 | 171 | /*!< No Open-Sensor Detection is performed at intervals of 1001 cycles */ |
Vkadaba | 5:0728bde67bdb | 172 | } ADMW1001_OPEN_SENSOR_DIAGNOSTICS; |
Vkadaba | 5:0728bde67bdb | 173 | |
Vkadaba | 5:0728bde67bdb | 174 | /*! ADMW1001 analog input signal amplification gain options |
Vkadaba | 5:0728bde67bdb | 175 | * |
Vkadaba | 5:0728bde67bdb | 176 | * @note applicable only to ADC analog sensor channels |
Vkadaba | 5:0728bde67bdb | 177 | */ |
Vkadaba | 5:0728bde67bdb | 178 | typedef enum { |
Vkadaba | 6:9d393a9677f4 | 179 | ADMW1001_ADC_RTD_CURVE_EUROPEAN = 0, |
Vkadaba | 6:9d393a9677f4 | 180 | /*!< EUROPEAN RTD curve used. */ |
Vkadaba | 6:9d393a9677f4 | 181 | ADMW1001_ADC_RTD_CURVE_AMERICAN, |
Vkadaba | 6:9d393a9677f4 | 182 | /*!< AMERICAN RTD curve used. */ |
Vkadaba | 6:9d393a9677f4 | 183 | ADMW1001_ADC_RTD_CURVE_JAPANESE, |
Vkadaba | 6:9d393a9677f4 | 184 | /*!< JAPANESE RTD curve used. */ |
Vkadaba | 6:9d393a9677f4 | 185 | ADMW1001_ADC_RTD_CURVE_ITS90, |
Vkadaba | 6:9d393a9677f4 | 186 | /*!< ITS90 RTD curve used. */ |
Vkadaba | 6:9d393a9677f4 | 187 | } ADMW1001_ADC_RTD_CURVE; |
Vkadaba | 6:9d393a9677f4 | 188 | /*! ADMW1001 analog input signal amplification gain options |
Vkadaba | 6:9d393a9677f4 | 189 | * |
Vkadaba | 6:9d393a9677f4 | 190 | * @note applicable only to ADC analog sensor channels |
Vkadaba | 6:9d393a9677f4 | 191 | */ |
Vkadaba | 6:9d393a9677f4 | 192 | typedef enum { |
Vkadaba | 5:0728bde67bdb | 193 | ADMW1001_ADC_GAIN_1X = 0, |
Vkadaba | 5:0728bde67bdb | 194 | /*!< no amplification gain */ |
Vkadaba | 5:0728bde67bdb | 195 | ADMW1001_ADC_GAIN_2X, |
Vkadaba | 5:0728bde67bdb | 196 | /*!< x2 amplification gain */ |
Vkadaba | 5:0728bde67bdb | 197 | ADMW1001_ADC_GAIN_4X, |
Vkadaba | 5:0728bde67bdb | 198 | /*!< x4 amplification gain */ |
Vkadaba | 5:0728bde67bdb | 199 | ADMW1001_ADC_GAIN_8X, |
Vkadaba | 5:0728bde67bdb | 200 | /*!< x8 amplification gain */ |
Vkadaba | 5:0728bde67bdb | 201 | ADMW1001_ADC_GAIN_16X, |
Vkadaba | 5:0728bde67bdb | 202 | /*!< x16 amplification gain */ |
Vkadaba | 5:0728bde67bdb | 203 | ADMW1001_ADC_GAIN_32X, |
Vkadaba | 5:0728bde67bdb | 204 | /*!< x32 amplification gain */ |
Vkadaba | 5:0728bde67bdb | 205 | ADMW1001_ADC_GAIN_64X, |
Vkadaba | 5:0728bde67bdb | 206 | /*!< x64 amplification gain */ |
Vkadaba | 5:0728bde67bdb | 207 | ADMW1001_ADC_GAIN_128X, |
Vkadaba | 5:0728bde67bdb | 208 | /*!< x128 amplification gain */ |
Vkadaba | 5:0728bde67bdb | 209 | } ADMW1001_ADC_GAIN; |
Vkadaba | 5:0728bde67bdb | 210 | |
Vkadaba | 6:9d393a9677f4 | 211 | /*! ADMW1001 analog sensor excitation state options |
Vkadaba | 6:9d393a9677f4 | 212 | * |
Vkadaba | 6:9d393a9677f4 | 213 | * @note applicable only to ADC analog sensor channels, and |
Vkadaba | 6:9d393a9677f4 | 214 | * specific sensor types |
Vkadaba | 6:9d393a9677f4 | 215 | */ |
Vkadaba | 6:9d393a9677f4 | 216 | typedef enum { |
Vkadaba | 6:9d393a9677f4 | 217 | ADMW1001_ADC_EXC_STATE_ALWAYS_ON, |
Vkadaba | 6:9d393a9677f4 | 218 | /*!< Excitation for measurement is always on */ |
Vkadaba | 6:9d393a9677f4 | 219 | ADMW1001_ADC_EXC_STATE_CYCLE_POWER, |
Vkadaba | 6:9d393a9677f4 | 220 | /*!< Excitation for measurement is active only during measurement */ |
Vkadaba | 6:9d393a9677f4 | 221 | } ADMW1001_ADC_EXC_STATE; |
Vkadaba | 6:9d393a9677f4 | 222 | |
Vkadaba | 5:0728bde67bdb | 223 | /*! ADMW1001 analog sensor excitation current output level options |
Vkadaba | 5:0728bde67bdb | 224 | * |
Vkadaba | 5:0728bde67bdb | 225 | * @note applicable only to ADC analog sensor channels, and |
Vkadaba | 5:0728bde67bdb | 226 | * specific sensor types |
Vkadaba | 5:0728bde67bdb | 227 | */ |
Vkadaba | 5:0728bde67bdb | 228 | typedef enum { |
Vkadaba | 6:9d393a9677f4 | 229 | ADMW1001_ADC_EXC_CURRENT_EXTERNAL = 0, |
Vkadaba | 6:9d393a9677f4 | 230 | /*!< External excitation is provided */ |
Vkadaba | 5:0728bde67bdb | 231 | ADMW1001_ADC_EXC_CURRENT_50uA, |
Vkadaba | 5:0728bde67bdb | 232 | /*!< 50uA excitation current enabled */ |
Vkadaba | 5:0728bde67bdb | 233 | ADMW1001_ADC_EXC_CURRENT_100uA, |
Vkadaba | 5:0728bde67bdb | 234 | /*!< 100uA excitation current */ |
Vkadaba | 5:0728bde67bdb | 235 | ADMW1001_ADC_EXC_CURRENT_250uA, |
Vkadaba | 5:0728bde67bdb | 236 | /*!< 250uA excitation current enabled */ |
Vkadaba | 5:0728bde67bdb | 237 | ADMW1001_ADC_EXC_CURRENT_500uA, |
Vkadaba | 5:0728bde67bdb | 238 | /*!< 500uA excitation current enabled */ |
Vkadaba | 5:0728bde67bdb | 239 | ADMW1001_ADC_EXC_CURRENT_1000uA, |
Vkadaba | 5:0728bde67bdb | 240 | /*!< 1mA excitation current enabled */ |
Vkadaba | 5:0728bde67bdb | 241 | } ADMW1001_ADC_EXC_CURRENT; |
Vkadaba | 5:0728bde67bdb | 242 | |
Vkadaba | 5:0728bde67bdb | 243 | /*! ADMW1001 analog sensor excitation current ratios used for diode sensor |
Vkadaba | 5:0728bde67bdb | 244 | * |
Vkadaba | 5:0728bde67bdb | 245 | * @note applicable only to a diode sensor |
Vkadaba | 5:0728bde67bdb | 246 | */ |
Vkadaba | 5:0728bde67bdb | 247 | typedef enum { |
Vkadaba | 6:9d393a9677f4 | 248 | ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_10UA_100UA = 0, |
Vkadaba | 6:9d393a9677f4 | 249 | /**< 2 Current measurement 10uA 100uA */ |
Vkadaba | 6:9d393a9677f4 | 250 | ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_20UA_160UA, |
Vkadaba | 6:9d393a9677f4 | 251 | /**< 2 Current measurement 20uA 160uA */ |
Vkadaba | 6:9d393a9677f4 | 252 | ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_50UA_300UA, |
Vkadaba | 6:9d393a9677f4 | 253 | /**< 2 Current measurement 50uA 300uA */ |
Vkadaba | 6:9d393a9677f4 | 254 | ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_100UA_600UA, |
Vkadaba | 6:9d393a9677f4 | 255 | /**< 2 Current measurement 100uA 600uA */ |
Vkadaba | 6:9d393a9677f4 | 256 | ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_10UA_50UA_100UA, |
Vkadaba | 6:9d393a9677f4 | 257 | /**< 3 current measuremetn 10uA 50uA 100uA */ |
Vkadaba | 6:9d393a9677f4 | 258 | ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_20UA_100UA_160UA, |
Vkadaba | 6:9d393a9677f4 | 259 | /**< 3 current measuremetn 20uA 100uA 160uA */ |
Vkadaba | 6:9d393a9677f4 | 260 | ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_50UA_150UA_300UA, |
Vkadaba | 6:9d393a9677f4 | 261 | /**< 3 current measuremetn 50uA 150uA 300uA */ |
Vkadaba | 6:9d393a9677f4 | 262 | ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_100UA_300UA_600UA, |
Vkadaba | 6:9d393a9677f4 | 263 | /**< 3 current measuremetn 100uA 300uA 600uA */ |
Vkadaba | 5:0728bde67bdb | 264 | } ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO; |
Vkadaba | 5:0728bde67bdb | 265 | |
Vkadaba | 5:0728bde67bdb | 266 | /*! ADMW1001 analog reference selection options |
Vkadaba | 5:0728bde67bdb | 267 | * |
Vkadaba | 5:0728bde67bdb | 268 | * @note applicable only to ADC analog sensor channels, and |
Vkadaba | 5:0728bde67bdb | 269 | * specific sensor types |
Vkadaba | 5:0728bde67bdb | 270 | */ |
Vkadaba | 5:0728bde67bdb | 271 | typedef enum { |
Vkadaba | 5:0728bde67bdb | 272 | ADMW1001_ADC_REFERENCE_NONE = 0, |
Vkadaba | 5:0728bde67bdb | 273 | /*!< No reference is selected */ |
Vkadaba | 5:0728bde67bdb | 274 | |
Vkadaba | 5:0728bde67bdb | 275 | ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_1, |
Vkadaba | 5:0728bde67bdb | 276 | /*!< Internal reference resistor #1 (4320 ohms) is selected */ |
Vkadaba | 5:0728bde67bdb | 277 | ADMW1001_ADC_REFERENCE_RESISTOR_INTERNAL_2, |
Vkadaba | 6:9d393a9677f4 | 278 | /*!< Internal reference resistor #2 (10010 ohms) is selected */ |
Vkadaba | 5:0728bde67bdb | 279 | ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL, |
Vkadaba | 5:0728bde67bdb | 280 | /*!< Internal ADC voltage reference (2.5V) is selected */ |
Vkadaba | 5:0728bde67bdb | 281 | ADMW1001_ADC_REFERENCE_VOLTAGE_AVDD, |
Vkadaba | 5:0728bde67bdb | 282 | /*!< Analag Supply Voltage AVDD reference (typically 3.3V) is selected */ |
Vkadaba | 5:0728bde67bdb | 283 | |
Vkadaba | 5:0728bde67bdb | 284 | ADMW1001_ADC_REFERENCE_RESISTOR_EXTERNAL_1, |
Vkadaba | 5:0728bde67bdb | 285 | /*!< External user-supplied reference resistor #1 is selected |
Vkadaba | 5:0728bde67bdb | 286 | * |
Vkadaba | 5:0728bde67bdb | 287 | * @note reference resistor value externalRef1Value must be specified |
Vkadaba | 5:0728bde67bdb | 288 | * (see @ref ADMW1001_MEASUREMENT_CONFIG) */ |
Vkadaba | 5:0728bde67bdb | 289 | ADMW1001_ADC_REFERENCE_RESISTOR_EXTERNAL_2, |
Vkadaba | 5:0728bde67bdb | 290 | /*!< External user-supplied reference resistor #2 is selected |
Vkadaba | 5:0728bde67bdb | 291 | * |
Vkadaba | 5:0728bde67bdb | 292 | * @note reference resistor value externalRef2Value must be specified |
Vkadaba | 5:0728bde67bdb | 293 | * (see @ref ADMW1001_MEASUREMENT_CONFIG) */ |
Vkadaba | 5:0728bde67bdb | 294 | ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_1, |
Vkadaba | 5:0728bde67bdb | 295 | /*!< External user-supplied reference voltage #1 is selected |
Vkadaba | 5:0728bde67bdb | 296 | * |
Vkadaba | 5:0728bde67bdb | 297 | * @note reference voltage value externalRef1Value must be specified |
Vkadaba | 5:0728bde67bdb | 298 | * (see @ref ADMW1001_MEASUREMENT_CONFIG) */ |
Vkadaba | 5:0728bde67bdb | 299 | ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_2, |
Vkadaba | 5:0728bde67bdb | 300 | /*!< External user-supplied reference voltage #2 is selected |
Vkadaba | 5:0728bde67bdb | 301 | * |
Vkadaba | 5:0728bde67bdb | 302 | * @note reference voltage value externalRef2Value must be specified |
Vkadaba | 5:0728bde67bdb | 303 | * (see @ref ADMW1001_MEASUREMENT_CONFIG) */ |
Vkadaba | 5:0728bde67bdb | 304 | ADMW1001_ADC_REFERENCE_BRIDGE_EXCITATION, |
Vkadaba | 5:0728bde67bdb | 305 | /*!< Bridge Excition Voltage is selected as reference |
Vkadaba | 5:0728bde67bdb | 306 | * |
Vkadaba | 5:0728bde67bdb | 307 | * @note this reference MUST be selected for 4/6-wire bridge sensor types |
Vkadaba | 5:0728bde67bdb | 308 | * (see @ref ADMW1001_ADC_SENSOR_TYPE) */ |
Vkadaba | 5:0728bde67bdb | 309 | } ADMW1001_ADC_REFERENCE_TYPE; |
Vkadaba | 5:0728bde67bdb | 310 | |
Vkadaba | 6:9d393a9677f4 | 311 | /*! ADMW1001 ADC Reference configuration |
Vkadaba | 6:9d393a9677f4 | 312 | * |
Vkadaba | 6:9d393a9677f4 | 313 | * @note applicable only to ADC analog sensor channels |
Vkadaba | 6:9d393a9677f4 | 314 | */ |
Vkadaba | 6:9d393a9677f4 | 315 | typedef enum { |
Vkadaba | 6:9d393a9677f4 | 316 | ADMW1001_ADC_GND_SW_OPEN = 0, |
Vkadaba | 6:9d393a9677f4 | 317 | /*!< Ground switch not enabled for measurement. */ |
Vkadaba | 6:9d393a9677f4 | 318 | ADMW1001_ADC_GND_SW_CLOSED, |
Vkadaba | 6:9d393a9677f4 | 319 | /*!< Ground switch closed for measurement. */ |
Vkadaba | 6:9d393a9677f4 | 320 | } ADMW1001_ADC_GND_SW; |
Vkadaba | 6:9d393a9677f4 | 321 | |
Vkadaba | 5:0728bde67bdb | 322 | /*! ADMW1001 analog filter selection options |
Vkadaba | 5:0728bde67bdb | 323 | * |
Vkadaba | 5:0728bde67bdb | 324 | * @note applicable only to ADC analog sensor channels |
Vkadaba | 5:0728bde67bdb | 325 | */ |
Vkadaba | 5:0728bde67bdb | 326 | typedef enum { |
Vkadaba | 6:9d393a9677f4 | 327 | ADMW1001_ADC_FILTER_SINC4 = 0, |
Vkadaba | 5:0728bde67bdb | 328 | /*!< SINC4 filter |
Vkadaba | 5:0728bde67bdb | 329 | * |
Vkadaba | 5:0728bde67bdb | 330 | * @note The number of input samples to be averaged by the filter |
Vkadaba | 5:0728bde67bdb | 331 | * must be specified by fs (see @ref ADMW1001_ADC_FILTER_CONFIG). |
Vkadaba | 5:0728bde67bdb | 332 | * The fs value affects the output sample rate and settling times |
Vkadaba | 5:0728bde67bdb | 333 | * of the ADC */ |
Vkadaba | 6:9d393a9677f4 | 334 | ADMW1001_ADC_FILTER_SINC3, |
Vkadaba | 5:0728bde67bdb | 335 | } ADMW1001_ADC_FILTER_TYPE; |
Vkadaba | 5:0728bde67bdb | 336 | |
Vkadaba | 5:0728bde67bdb | 337 | /*! ADMW1001 I2C clock speed options |
Vkadaba | 5:0728bde67bdb | 338 | * |
Vkadaba | 5:0728bde67bdb | 339 | * @note applicable only for I2C sensors |
Vkadaba | 5:0728bde67bdb | 340 | */ |
Vkadaba | 5:0728bde67bdb | 341 | typedef enum |
Vkadaba | 5:0728bde67bdb | 342 | { |
Vkadaba | 5:0728bde67bdb | 343 | ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K = 0, |
Vkadaba | 5:0728bde67bdb | 344 | /*!< 100kHz I2C clock speed */ |
Vkadaba | 5:0728bde67bdb | 345 | ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K, |
Vkadaba | 5:0728bde67bdb | 346 | /*!< 400kHz I2C clock speed */ |
Vkadaba | 5:0728bde67bdb | 347 | } ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED; |
Vkadaba | 5:0728bde67bdb | 348 | |
Vkadaba | 5:0728bde67bdb | 349 | /*! ADMW1001 SPI mode options |
Vkadaba | 5:0728bde67bdb | 350 | * |
Vkadaba | 5:0728bde67bdb | 351 | * @note applicable only for SPI sensors |
Vkadaba | 5:0728bde67bdb | 352 | */ |
Vkadaba | 5:0728bde67bdb | 353 | typedef enum |
Vkadaba | 5:0728bde67bdb | 354 | { |
Vkadaba | 5:0728bde67bdb | 355 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_0 = 0, |
Vkadaba | 5:0728bde67bdb | 356 | /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 0 */ |
Vkadaba | 5:0728bde67bdb | 357 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_1, |
Vkadaba | 5:0728bde67bdb | 358 | /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 1 */ |
Vkadaba | 5:0728bde67bdb | 359 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_2, |
Vkadaba | 5:0728bde67bdb | 360 | /*!< SPI mode 0 Clock Polarity = 1 Clock Phase = 0 */ |
Vkadaba | 5:0728bde67bdb | 361 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_3, |
Vkadaba | 5:0728bde67bdb | 362 | /*!< SPI mode 0 Clock Polarity = 1 Clock Phase = 1 */ |
Vkadaba | 5:0728bde67bdb | 363 | } ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE; |
Vkadaba | 5:0728bde67bdb | 364 | |
Vkadaba | 5:0728bde67bdb | 365 | /*! ADMW1001 SPI clock speed options |
Vkadaba | 5:0728bde67bdb | 366 | * |
Vkadaba | 5:0728bde67bdb | 367 | * @note applicable only for SPI sensors |
Vkadaba | 5:0728bde67bdb | 368 | */ |
Vkadaba | 5:0728bde67bdb | 369 | typedef enum |
Vkadaba | 5:0728bde67bdb | 370 | { |
Vkadaba | 5:0728bde67bdb | 371 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_13MHZ = 0, |
Vkadaba | 5:0728bde67bdb | 372 | /*!< SPI Clock Speed configured to 13MHz */ |
Vkadaba | 5:0728bde67bdb | 373 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6_5MHZ, |
Vkadaba | 5:0728bde67bdb | 374 | /*!< SPI Clock Speed configured to 6.5MHz */ |
Vkadaba | 5:0728bde67bdb | 375 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3_25MHZ, |
Vkadaba | 5:0728bde67bdb | 376 | /*!< SPI Clock Speed configured to 3.25MHz */ |
Vkadaba | 5:0728bde67bdb | 377 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_625MHZ, |
Vkadaba | 5:0728bde67bdb | 378 | /*!< SPI Clock Speed configured to 1.625MHz */ |
Vkadaba | 5:0728bde67bdb | 379 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_812KHZ, |
Vkadaba | 5:0728bde67bdb | 380 | /*!< SPI Clock Speed configured to 812kHz */ |
Vkadaba | 5:0728bde67bdb | 381 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_406KHZ, |
Vkadaba | 5:0728bde67bdb | 382 | /*!< SPI Clock Speed configured to 406kHz */ |
Vkadaba | 5:0728bde67bdb | 383 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_203KHZ, |
Vkadaba | 5:0728bde67bdb | 384 | /*!< SPI Clock Speed configured to 203kHz */ |
Vkadaba | 5:0728bde67bdb | 385 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_101KHZ, |
Vkadaba | 5:0728bde67bdb | 386 | /*!< SPI Clock Speed configured to 101kHz */ |
Vkadaba | 5:0728bde67bdb | 387 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_50KHZ, |
Vkadaba | 5:0728bde67bdb | 388 | /*!< SPI Clock Speed configured to 50kHz */ |
Vkadaba | 5:0728bde67bdb | 389 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_25KHZ, |
Vkadaba | 5:0728bde67bdb | 390 | /*!< SPI Clock Speed configured to 25kHz */ |
Vkadaba | 5:0728bde67bdb | 391 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_12KHZ, |
Vkadaba | 5:0728bde67bdb | 392 | /*!< SPI Clock Speed configured to 12kHz */ |
Vkadaba | 5:0728bde67bdb | 393 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6KHZ, |
Vkadaba | 5:0728bde67bdb | 394 | /*!< SPI Clock Speed configured to 6kHz */ |
Vkadaba | 5:0728bde67bdb | 395 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3KHZ, |
Vkadaba | 5:0728bde67bdb | 396 | /*!< SPI Clock Speed configured to 3kHz */ |
Vkadaba | 5:0728bde67bdb | 397 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_5KHZ, |
Vkadaba | 5:0728bde67bdb | 398 | /*!< SPI Clock Speed configured to 1.5kHz */ |
Vkadaba | 5:0728bde67bdb | 399 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_793HZ, |
Vkadaba | 5:0728bde67bdb | 400 | /*!< SPI Clock Speed configured to 793hz */ |
Vkadaba | 5:0728bde67bdb | 401 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_396HZ, |
Vkadaba | 5:0728bde67bdb | 402 | /*!< SPI Clock Speed configured to 396hz */ |
Vkadaba | 5:0728bde67bdb | 403 | } ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK; |
Vkadaba | 5:0728bde67bdb | 404 | |
Vkadaba | 5:0728bde67bdb | 405 | /*! ADMW1001 Power Configuration options */ |
Vkadaba | 5:0728bde67bdb | 406 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 407 | ADMW1001_POWER_MODE powerMode; |
Vkadaba | 5:0728bde67bdb | 408 | /*!< Power mode selection */ |
Vkadaba | 5:0728bde67bdb | 409 | } ADMW1001_POWER_CONFIG; |
Vkadaba | 5:0728bde67bdb | 410 | |
Vkadaba | 5:0728bde67bdb | 411 | /*! ADMW1001 Multi-Cycle Configuration options |
Vkadaba | 5:0728bde67bdb | 412 | * |
Vkadaba | 5:0728bde67bdb | 413 | * @note required only when ADMW1001_OPERATING_MODE_MULTICYCLE is selected |
Vkadaba | 5:0728bde67bdb | 414 | * as the operatingMode (@ref ADMW1001_MEASUREMENT_CONFIG) |
Vkadaba | 5:0728bde67bdb | 415 | */ |
Vkadaba | 5:0728bde67bdb | 416 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 417 | uint32_t cyclesPerBurst; |
Vkadaba | 5:0728bde67bdb | 418 | /*!< Number of cycles to complete for a single burst */ |
Vkadaba | 5:0728bde67bdb | 419 | uint32_t burstInterval; |
Vkadaba | 5:0728bde67bdb | 420 | /*!< Interval, in seconds, between each successive burst of cycles */ |
Vkadaba | 5:0728bde67bdb | 421 | } ADMW1001_MULTICYCLE_CONFIG; |
Vkadaba | 5:0728bde67bdb | 422 | |
Vkadaba | 5:0728bde67bdb | 423 | /*! ADMW1001 Measurement Configuration options */ |
Vkadaba | 5:0728bde67bdb | 424 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 425 | ADMW1001_OPERATING_MODE operatingMode; |
Vkadaba | 5:0728bde67bdb | 426 | /*!< Operating mode - specifies how measurement cycles are scheduled */ |
Vkadaba | 5:0728bde67bdb | 427 | ADMW1001_DATAREADY_MODE dataReadyMode; |
Vkadaba | 5:0728bde67bdb | 428 | /*!< Data read mode - specifies how output samples are stored for reading */ |
Vkadaba | 5:0728bde67bdb | 429 | ADMW1001_MULTICYCLE_CONFIG multiCycleConfig; |
Vkadaba | 5:0728bde67bdb | 430 | /*!< Multi-Cycle configuration - specifies how bursts of measurement cycles |
Vkadaba | 5:0728bde67bdb | 431 | * are scheduled. Applicable only when operatingMode is |
Vkadaba | 5:0728bde67bdb | 432 | * ADMW1001_OPERATING_MODE_MULTICYCLE |
Vkadaba | 5:0728bde67bdb | 433 | */ |
Vkadaba | 6:9d393a9677f4 | 434 | uint32_t cycleInterval; |
Vkadaba | 5:0728bde67bdb | 435 | /*!< Cycle interval - specifies the time interval between the start of each |
Vkadaba | 5:0728bde67bdb | 436 | * successive measurement cycle. Applicable only when operatingMode is |
Vkadaba | 5:0728bde67bdb | 437 | * not ADMW1001_OPERATING_MODE_SINGLECYCLE |
Vkadaba | 5:0728bde67bdb | 438 | */ |
Vkadaba | 5:0728bde67bdb | 439 | #ifdef __V2_3_CFG_FMT__ |
Vkadaba | 5:0728bde67bdb | 440 | ADMW1001_FILTER_SETTLING filterSettling; |
Vkadaba | 5:0728bde67bdb | 441 | /*!< Analog filter settling - specifies the policy for settling time |
Vkadaba | 5:0728bde67bdb | 442 | * between consecutive measurements from an analog channel in a multi- |
Vkadaba | 5:0728bde67bdb | 443 | * channel configuration. Note that, in single analog channel |
Vkadaba | 5:0728bde67bdb | 444 | * configurations, settling time is always skipped between consecutive |
Vkadaba | 5:0728bde67bdb | 445 | * measurements in a measurement cycle. |
Vkadaba | 5:0728bde67bdb | 446 | */ |
Vkadaba | 5:0728bde67bdb | 447 | #endif |
Vkadaba | 5:0728bde67bdb | 448 | float32_t externalRef1Value; |
Vkadaba | 5:0728bde67bdb | 449 | /*!< Resistance/voltage value connected to external reference input #1. |
Vkadaba | 5:0728bde67bdb | 450 | * Applicable only if the selected reference type is |
Vkadaba | 5:0728bde67bdb | 451 | * ADMW1001_ADC_REFERENCE_RESISTOR_EXTERNAL_1 or |
Vkadaba | 5:0728bde67bdb | 452 | * ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_1 |
Vkadaba | 5:0728bde67bdb | 453 | * (see @ref ADMW1001_ADC_REFERENCE_TYPE) |
Vkadaba | 5:0728bde67bdb | 454 | */ |
Vkadaba | 5:0728bde67bdb | 455 | bool enableExternalFlash; |
Vkadaba | 5:0728bde67bdb | 456 | /*!< Enable the use of external flash memory for storage of samples. |
Vkadaba | 5:0728bde67bdb | 457 | */ |
Vkadaba | 5:0728bde67bdb | 458 | } ADMW1001_MEASUREMENT_CONFIG; |
Vkadaba | 5:0728bde67bdb | 459 | |
Vkadaba | 5:0728bde67bdb | 460 | /*! ADMW1001 ADC Excitation Current output configuration |
Vkadaba | 5:0728bde67bdb | 461 | * |
Vkadaba | 5:0728bde67bdb | 462 | * @note applicable only to ADC analog sensor channels, and |
Vkadaba | 5:0728bde67bdb | 463 | * specific sensor types |
Vkadaba | 5:0728bde67bdb | 464 | */ |
Vkadaba | 5:0728bde67bdb | 465 | typedef struct { |
Vkadaba | 6:9d393a9677f4 | 466 | ADMW1001_ADC_EXC_STATE excitationState; |
Vkadaba | 6:9d393a9677f4 | 467 | /*!< Excitation current state */ |
Vkadaba | 5:0728bde67bdb | 468 | ADMW1001_ADC_EXC_CURRENT outputLevel; |
Vkadaba | 5:0728bde67bdb | 469 | /*!< Excitation current output level */ |
Vkadaba | 5:0728bde67bdb | 470 | ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO diodeRatio; |
Vkadaba | 5:0728bde67bdb | 471 | /*!< Excitation current output diode ratio */ |
Vkadaba | 5:0728bde67bdb | 472 | } ADMW1001_ADC_EXC_CURRENT_CONFIG; |
Vkadaba | 5:0728bde67bdb | 473 | |
Vkadaba | 5:0728bde67bdb | 474 | /*! ADMW1001 ADC Filter configuration |
Vkadaba | 5:0728bde67bdb | 475 | * |
Vkadaba | 5:0728bde67bdb | 476 | * @note applicable only to ADC analog sensor channels |
Vkadaba | 5:0728bde67bdb | 477 | */ |
Vkadaba | 5:0728bde67bdb | 478 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 479 | ADMW1001_ADC_FILTER_TYPE type; |
Vkadaba | 5:0728bde67bdb | 480 | /*!< Filter type selection */ |
Vkadaba | 6:9d393a9677f4 | 481 | uint32_t sf; |
Vkadaba | 6:9d393a9677f4 | 482 | /*!< SF value used along with filter type to determine speed */ |
Vkadaba | 6:9d393a9677f4 | 483 | bool filterChop; |
Vkadaba | 6:9d393a9677f4 | 484 | /*!< Enable filter chop */ |
Vkadaba | 6:9d393a9677f4 | 485 | bool notch1p2; |
Vkadaba | 6:9d393a9677f4 | 486 | /*!< Enable Notch 2 Filter Mode */ |
Vkadaba | 6:9d393a9677f4 | 487 | ADMW1001_ADC_GND_SW groundSwitch; |
Vkadaba | 6:9d393a9677f4 | 488 | /*!< Option to open or close sensor ground switch */ |
Vkadaba | 5:0728bde67bdb | 489 | } ADMW1001_ADC_FILTER_CONFIG; |
Vkadaba | 5:0728bde67bdb | 490 | |
Vkadaba | 5:0728bde67bdb | 491 | /*! ADMW1001 ADC Referemce configuration |
Vkadaba | 5:0728bde67bdb | 492 | * |
Vkadaba | 5:0728bde67bdb | 493 | * @note applicable only to ADC analog sensor channels |
Vkadaba | 5:0728bde67bdb | 494 | */ |
Vkadaba | 5:0728bde67bdb | 495 | typedef struct { |
Vkadaba | 6:9d393a9677f4 | 496 | ADMW1001_ADC_REFERENCE_TYPE type; |
Vkadaba | 5:0728bde67bdb | 497 | /*!< Filter type selection */ |
Vkadaba | 5:0728bde67bdb | 498 | } ADMW1001_ADC_REFERENCE_CONFIG; |
Vkadaba | 5:0728bde67bdb | 499 | |
Vkadaba | 5:0728bde67bdb | 500 | /*! ADMW1001 ADC analog channel configuration details |
Vkadaba | 5:0728bde67bdb | 501 | * |
Vkadaba | 5:0728bde67bdb | 502 | * @note applicable only to ADC analog sensor channels |
Vkadaba | 5:0728bde67bdb | 503 | */ |
Vkadaba | 5:0728bde67bdb | 504 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 505 | ADMW1001_ADC_SENSOR_TYPE sensor; |
Vkadaba | 5:0728bde67bdb | 506 | /*!< Sensor type selection */ |
Vkadaba | 6:9d393a9677f4 | 507 | ADMW1001_ADC_RTD_CURVE rtdCurve; |
Vkadaba | 6:9d393a9677f4 | 508 | /*!< Rtd curve selection */ |
Vkadaba | 5:0728bde67bdb | 509 | ADMW1001_ADC_GAIN gain; |
Vkadaba | 5:0728bde67bdb | 510 | /*!< ADC Gain selection */ |
Vkadaba | 5:0728bde67bdb | 511 | ADMW1001_ADC_EXC_CURRENT_CONFIG current; |
Vkadaba | 5:0728bde67bdb | 512 | /*!< ADC Excitation Current configuration */ |
Vkadaba | 5:0728bde67bdb | 513 | ADMW1001_ADC_FILTER_CONFIG filter; |
Vkadaba | 5:0728bde67bdb | 514 | /*!< ADC Filter configuration */ |
Vkadaba | 5:0728bde67bdb | 515 | ADMW1001_ADC_REFERENCE_CONFIG reference; |
Vkadaba | 5:0728bde67bdb | 516 | /*!< ADC Reference configuration */ |
Vkadaba | 6:9d393a9677f4 | 517 | bool enableVbias; |
Vkadaba | 5:0728bde67bdb | 518 | /*!< Option to enable internal ADC voltage bias */ |
Vkadaba | 5:0728bde67bdb | 519 | } ADMW1001_ADC_CHANNEL_CONFIG; |
Vkadaba | 5:0728bde67bdb | 520 | |
Vkadaba | 5:0728bde67bdb | 521 | /*! ADMW1001 digital sensor data encoding |
Vkadaba | 5:0728bde67bdb | 522 | * |
Vkadaba | 5:0728bde67bdb | 523 | * @note applicable only to SPI and I2C digital sensor channels |
Vkadaba | 5:0728bde67bdb | 524 | */ |
Vkadaba | 5:0728bde67bdb | 525 | typedef enum |
Vkadaba | 5:0728bde67bdb | 526 | { |
Vkadaba | 5:0728bde67bdb | 527 | ADMW1001_DIGITAL_SENSOR_DATA_CODING_NONE, |
Vkadaba | 5:0728bde67bdb | 528 | /**< None/Invalid - data format is ignored if coding is set to this value */ |
Vkadaba | 5:0728bde67bdb | 529 | ADMW1001_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR, |
Vkadaba | 5:0728bde67bdb | 530 | /**< Unipolar - unsigned integer values */ |
Vkadaba | 5:0728bde67bdb | 531 | ADMW1001_DIGITAL_SENSOR_DATA_CODING_TWOS_COMPLEMENT, |
Vkadaba | 5:0728bde67bdb | 532 | /**< Twos-complement - signed integer values */ |
Vkadaba | 5:0728bde67bdb | 533 | ADMW1001_DIGITAL_SENSOR_DATA_CODING_OFFSET_BINARY, |
Vkadaba | 5:0728bde67bdb | 534 | /**< Offset Binary - used to represent signed values with unsigned integers, |
Vkadaba | 5:0728bde67bdb | 535 | * with the mid-range value representing 0 */ |
Vkadaba | 5:0728bde67bdb | 536 | } ADMW1001_DIGITAL_SENSOR_DATA_CODING; |
Vkadaba | 5:0728bde67bdb | 537 | |
Vkadaba | 5:0728bde67bdb | 538 | /*! ADMW1001 digital sensor data format configuration |
Vkadaba | 5:0728bde67bdb | 539 | * |
Vkadaba | 5:0728bde67bdb | 540 | * @note applicable only to SPI and I2C digital sensor channels |
Vkadaba | 5:0728bde67bdb | 541 | */ |
Vkadaba | 5:0728bde67bdb | 542 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 543 | ADMW1001_DIGITAL_SENSOR_DATA_CODING coding; |
Vkadaba | 5:0728bde67bdb | 544 | /**< Data Encoding of Sensor Result */ |
Vkadaba | 5:0728bde67bdb | 545 | bool littleEndian; |
Vkadaba | 5:0728bde67bdb | 546 | /**< Set as true if data format is little-endian, false otherwise */ |
Vkadaba | 5:0728bde67bdb | 547 | bool leftJustified; |
Vkadaba | 5:0728bde67bdb | 548 | /**< Set as true if data is left-justified in the data frame, false otherwise */ |
Vkadaba | 5:0728bde67bdb | 549 | uint8_t frameLength; |
Vkadaba | 5:0728bde67bdb | 550 | /**< Data frame length (number of bytes to read from the sensor) */ |
Vkadaba | 5:0728bde67bdb | 551 | uint8_t numDataBits; |
Vkadaba | 5:0728bde67bdb | 552 | /**< Number of relevant data bits to extract from the data frame */ |
Vkadaba | 5:0728bde67bdb | 553 | uint8_t bitOffset; |
Vkadaba | 5:0728bde67bdb | 554 | /**< Data bit offset, relative to data alignment within the data frame */ |
Vkadaba | 5:0728bde67bdb | 555 | } ADMW1001_DIGITAL_SENSOR_DATA_FORMAT; |
Vkadaba | 5:0728bde67bdb | 556 | |
Vkadaba | 5:0728bde67bdb | 557 | /*! ADMW1001 digital sensor command |
Vkadaba | 5:0728bde67bdb | 558 | * |
Vkadaba | 5:0728bde67bdb | 559 | * @note applicable only to SPI and I2C digital sensor channels |
Vkadaba | 5:0728bde67bdb | 560 | */ |
Vkadaba | 5:0728bde67bdb | 561 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 562 | uint8_t command[ADMW1001_SENSOR_COMMAND_MAX_LENGTH]; |
Vkadaba | 5:0728bde67bdb | 563 | /*!< Optional command bytes to send to the device */ |
Vkadaba | 5:0728bde67bdb | 564 | uint8_t commandLength; |
Vkadaba | 5:0728bde67bdb | 565 | /*!< Number of valid command bytes. Set to 0 if unused */ |
Vkadaba | 5:0728bde67bdb | 566 | } ADMW1001_DIGITAL_SENSOR_COMMAND; |
Vkadaba | 5:0728bde67bdb | 567 | |
Vkadaba | 5:0728bde67bdb | 568 | /*! ADMW1001 digital sensor calibration param |
Vkadaba | 5:0728bde67bdb | 569 | * |
Vkadaba | 5:0728bde67bdb | 570 | * @note applicable only to digital sensor channels |
Vkadaba | 5:0728bde67bdb | 571 | */ |
Vkadaba | 5:0728bde67bdb | 572 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 573 | uint32_t calibrationParam; |
Vkadaba | 5:0728bde67bdb | 574 | /*!< Independently established environmental variable used during calibration |
Vkadaba | 5:0728bde67bdb | 575 | * of a digital sensor. Used only if the sensor supports calibration |
Vkadaba | 5:0728bde67bdb | 576 | * and expects an environmental parameter |
Vkadaba | 5:0728bde67bdb | 577 | */ |
Vkadaba | 5:0728bde67bdb | 578 | bool enableCalibrationParam; |
Vkadaba | 5:0728bde67bdb | 579 | /*!< Allow Calibration_Parameter to be used during calibration of any digital sensor */ |
Vkadaba | 5:0728bde67bdb | 580 | } ADMW1001_DIGITAL_CALIBRATION_COMMAND; |
Vkadaba | 5:0728bde67bdb | 581 | |
Vkadaba | 5:0728bde67bdb | 582 | /*! ADMW1001 digital sensor communication config |
Vkadaba | 5:0728bde67bdb | 583 | * |
Vkadaba | 5:0728bde67bdb | 584 | * @note applicable only to digital sensor channels |
Vkadaba | 5:0728bde67bdb | 585 | */ |
Vkadaba | 5:0728bde67bdb | 586 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 587 | bool useCustomCommsConfig; |
Vkadaba | 5:0728bde67bdb | 588 | /*!< Optional parameter to enable user digital communication settings */ |
Vkadaba | 5:0728bde67bdb | 589 | ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED i2cClockSpeed; |
Vkadaba | 5:0728bde67bdb | 590 | /*!< Optional parameter to configure specific i2c speed for i2c sensor */ |
Vkadaba | 5:0728bde67bdb | 591 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE spiMode; |
Vkadaba | 5:0728bde67bdb | 592 | /*!< Optional parameter to configure specific spi mode for spi sensor */ |
Vkadaba | 5:0728bde67bdb | 593 | ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK spiClock; |
Vkadaba | 5:0728bde67bdb | 594 | /*!< Optional parameter to configure specific spi clock for spi sensor */ |
Vkadaba | 5:0728bde67bdb | 595 | } ADMW1001_DIGITAL_SENSOR_COMMS; |
Vkadaba | 5:0728bde67bdb | 596 | |
Vkadaba | 5:0728bde67bdb | 597 | /*! ADMW1001 I2C digital channel configuration details |
Vkadaba | 5:0728bde67bdb | 598 | * |
Vkadaba | 5:0728bde67bdb | 599 | * @note applicable only to I2C digital sensor channels |
Vkadaba | 5:0728bde67bdb | 600 | */ |
Vkadaba | 5:0728bde67bdb | 601 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 602 | ADMW1001_I2C_SENSOR_TYPE sensor; |
Vkadaba | 5:0728bde67bdb | 603 | /*!< Sensor type selection */ |
Vkadaba | 5:0728bde67bdb | 604 | uint32_t deviceAddress; |
Vkadaba | 5:0728bde67bdb | 605 | /*!< I2C device address (7-bit) */ |
Vkadaba | 5:0728bde67bdb | 606 | ADMW1001_DIGITAL_SENSOR_COMMAND configurationCommand; |
Vkadaba | 5:0728bde67bdb | 607 | /*!< Optional configuration command to send to the device at start-up. |
Vkadaba | 5:0728bde67bdb | 608 | * A default configuration command will be used if this is not specified. |
Vkadaba | 5:0728bde67bdb | 609 | * Applicable only to specific I2C sensor types. |
Vkadaba | 5:0728bde67bdb | 610 | */ |
Vkadaba | 5:0728bde67bdb | 611 | ADMW1001_DIGITAL_SENSOR_COMMAND dataRequestCommand; |
Vkadaba | 5:0728bde67bdb | 612 | /*!< Optional data request command to send to the device for each sample. |
Vkadaba | 5:0728bde67bdb | 613 | * A default data request command will be used if this is not specified. |
Vkadaba | 5:0728bde67bdb | 614 | * Applicable only to specific I2C sensor types. |
Vkadaba | 5:0728bde67bdb | 615 | */ |
Vkadaba | 5:0728bde67bdb | 616 | ADMW1001_DIGITAL_SENSOR_DATA_FORMAT dataFormat; |
Vkadaba | 5:0728bde67bdb | 617 | /*!< Optional data format configuration to parse/extract data from the device. |
Vkadaba | 5:0728bde67bdb | 618 | * A default data format will be used if this is not specified. |
Vkadaba | 5:0728bde67bdb | 619 | * Applicable only to specific I2C sensor types |
Vkadaba | 5:0728bde67bdb | 620 | */ |
Vkadaba | 5:0728bde67bdb | 621 | ADMW1001_DIGITAL_CALIBRATION_COMMAND digitalCalibrationParam; |
Vkadaba | 5:0728bde67bdb | 622 | /*!< This is used to supply an independently established environmental variable |
Vkadaba | 5:0728bde67bdb | 623 | * that must be used during calibration of a [digital] sensor which a) |
Vkadaba | 5:0728bde67bdb | 624 | * supports calibration and b) expects an environmental parameter. |
Vkadaba | 5:0728bde67bdb | 625 | * An example is a CO2 sensor, which may require the CO2 concentration level |
Vkadaba | 5:0728bde67bdb | 626 | * when performing a calibration |
Vkadaba | 5:0728bde67bdb | 627 | */ |
Vkadaba | 5:0728bde67bdb | 628 | ADMW1001_DIGITAL_SENSOR_COMMS configureComms; |
Vkadaba | 5:0728bde67bdb | 629 | /*!< Optional configuration to setup a user communication config. |
Vkadaba | 5:0728bde67bdb | 630 | * A default configuration will be used if this is not specified. |
Vkadaba | 5:0728bde67bdb | 631 | * Applicable only to specific I2C sensor types. |
Vkadaba | 5:0728bde67bdb | 632 | */ |
Vkadaba | 5:0728bde67bdb | 633 | } ADMW1001_I2C_CHANNEL_CONFIG; |
Vkadaba | 5:0728bde67bdb | 634 | |
Vkadaba | 5:0728bde67bdb | 635 | /*! ADMW1001 SPI digital channel configuration details |
Vkadaba | 5:0728bde67bdb | 636 | * |
Vkadaba | 5:0728bde67bdb | 637 | * @note applicable only to SPI digital sensor channels |
Vkadaba | 5:0728bde67bdb | 638 | */ |
Vkadaba | 5:0728bde67bdb | 639 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 640 | ADMW1001_SPI_SENSOR_TYPE sensor; |
Vkadaba | 5:0728bde67bdb | 641 | /*!< Sensor type selection */ |
Vkadaba | 5:0728bde67bdb | 642 | ADMW1001_DIGITAL_SENSOR_COMMAND configurationCommand; |
Vkadaba | 5:0728bde67bdb | 643 | /*!< Optional configuration command to send to the device at start-up. |
Vkadaba | 5:0728bde67bdb | 644 | * A default configuration command will be used if this is not specified. |
Vkadaba | 5:0728bde67bdb | 645 | * Applicable only to specific SPI sensor types. |
Vkadaba | 5:0728bde67bdb | 646 | */ |
Vkadaba | 5:0728bde67bdb | 647 | ADMW1001_DIGITAL_SENSOR_COMMAND dataRequestCommand; |
Vkadaba | 5:0728bde67bdb | 648 | /*!< Optional data request command to send to the device for each sample. |
Vkadaba | 5:0728bde67bdb | 649 | * A default data request command will be used if this is not specified. |
Vkadaba | 5:0728bde67bdb | 650 | * Applicable only to specific SPI sensor types. |
Vkadaba | 5:0728bde67bdb | 651 | */ |
Vkadaba | 5:0728bde67bdb | 652 | ADMW1001_DIGITAL_SENSOR_DATA_FORMAT dataFormat; |
Vkadaba | 5:0728bde67bdb | 653 | /*!< Optional data format configuration to parse/extract data from the device. |
Vkadaba | 5:0728bde67bdb | 654 | * A default data format will be used if this is not specified. |
Vkadaba | 5:0728bde67bdb | 655 | * Applicable only to specific SPI sensor types |
Vkadaba | 5:0728bde67bdb | 656 | */ |
Vkadaba | 5:0728bde67bdb | 657 | ADMW1001_DIGITAL_CALIBRATION_COMMAND digitalCalibrationParam; |
Vkadaba | 5:0728bde67bdb | 658 | /*!< This is used to supply an independently established environmental variable |
Vkadaba | 5:0728bde67bdb | 659 | * that must be used during calibration of a [digital] sensor which a) |
Vkadaba | 5:0728bde67bdb | 660 | * supports calibration and b) expects an environmental parameter. |
Vkadaba | 5:0728bde67bdb | 661 | * An example is a CO2 sensor, which may require the CO2 concentration level |
Vkadaba | 5:0728bde67bdb | 662 | * when performing a calibration |
Vkadaba | 5:0728bde67bdb | 663 | */ |
Vkadaba | 5:0728bde67bdb | 664 | ADMW1001_DIGITAL_SENSOR_COMMS configureComms; |
Vkadaba | 5:0728bde67bdb | 665 | /*!< Optional configuration to setup a user communication config. |
Vkadaba | 5:0728bde67bdb | 666 | * A default configuration will be used if this is not specified. |
Vkadaba | 5:0728bde67bdb | 667 | * Applicable only to specific SPI sensor types. |
Vkadaba | 5:0728bde67bdb | 668 | */ |
Vkadaba | 5:0728bde67bdb | 669 | } ADMW1001_SPI_CHANNEL_CONFIG; |
Vkadaba | 5:0728bde67bdb | 670 | |
Vkadaba | 5:0728bde67bdb | 671 | |
Vkadaba | 5:0728bde67bdb | 672 | /*! ADMW1001 Measurement Channel configuration details */ |
Vkadaba | 5:0728bde67bdb | 673 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 674 | bool enableChannel; |
Vkadaba | 5:0728bde67bdb | 675 | /*!< Option to include this channel in normal measurement cycles */ |
Vkadaba | 5:0728bde67bdb | 676 | bool disablePublishing; |
Vkadaba | 5:0728bde67bdb | 677 | /*!< Option to disable publishing of data samples from this channel. The |
Vkadaba | 5:0728bde67bdb | 678 | * channel may still be included in measurement cycles, but data samples |
Vkadaba | 5:0728bde67bdb | 679 | * obtained from this channel will not be published. This is typically |
Vkadaba | 5:0728bde67bdb | 680 | * used for channels which are required only as a compensation reference |
Vkadaba | 5:0728bde67bdb | 681 | * for another channel (e.g. Cold-Junction Compensation channels). |
Vkadaba | 5:0728bde67bdb | 682 | */ |
Vkadaba | 6:9d393a9677f4 | 683 | ADMW1001_CHANNEL_ID compensationChannel; |
Vkadaba | 5:0728bde67bdb | 684 | /*!< Optional compensation channel. Set to ADMW1001_CHANNEL_ID_NONE if not |
Vkadaba | 5:0728bde67bdb | 685 | * required. Typically used for thermocouple sensors that require a |
Vkadaba | 5:0728bde67bdb | 686 | * separate measurement of the "cold-junction" temperature, which can be |
Vkadaba | 5:0728bde67bdb | 687 | * be provided by an RTD temperature sensor connected on a separate |
Vkadaba | 5:0728bde67bdb | 688 | * "compensation channel" */ |
Vkadaba | 5:0728bde67bdb | 689 | bool enableUnityLut; |
Vkadaba | 5:0728bde67bdb | 690 | /*!< Option to choose the LUT for calculations, this implies that the |
Vkadaba | 5:0728bde67bdb | 691 | * fundamental measurement for the sensor (typically mV or Ohms) |
Vkadaba | 5:0728bde67bdb | 692 | * would be returned as the measurement result. |
Vkadaba | 5:0728bde67bdb | 693 | */ |
Vkadaba | 6:9d393a9677f4 | 694 | ADMW1001_MEASUREMENT_UNIT measurementUnit; |
Vkadaba | 5:0728bde67bdb | 695 | /*!< Optional measurement unit selection for conversion results. Applicable |
Vkadaba | 5:0728bde67bdb | 696 | * only for certain sensor types. Set to |
Vkadaba | 5:0728bde67bdb | 697 | * ADMW1001_MEASUREMENT_UNIT_DEFAULT if not applicable. |
Vkadaba | 5:0728bde67bdb | 698 | */ |
Vkadaba | 5:0728bde67bdb | 699 | float32_t lowThreshold; |
Vkadaba | 5:0728bde67bdb | 700 | /*!< Optional minimum threshold value for each processed sample, to be |
Vkadaba | 5:0728bde67bdb | 701 | * checked prior to publishing. A channel ALERT condition is raised |
Vkadaba | 5:0728bde67bdb | 702 | * if the processed value is lower than this threshold. Set to NaN |
Vkadaba | 5:0728bde67bdb | 703 | * if not required. |
Vkadaba | 5:0728bde67bdb | 704 | */ |
Vkadaba | 5:0728bde67bdb | 705 | float32_t highThreshold; |
Vkadaba | 5:0728bde67bdb | 706 | /*!< Optional maximum threshold value for each processed sample, to be |
Vkadaba | 5:0728bde67bdb | 707 | * checked prior to publishing. A channel ALERT condition is raised |
Vkadaba | 5:0728bde67bdb | 708 | * if the processed value is higher than this threshold. Set to NaN |
Vkadaba | 5:0728bde67bdb | 709 | * if not required. |
Vkadaba | 5:0728bde67bdb | 710 | */ |
Vkadaba | 5:0728bde67bdb | 711 | float32_t offsetAdjustment; |
Vkadaba | 5:0728bde67bdb | 712 | /*!< Optional offset adjustment value applied to each processed sample. |
Vkadaba | 5:0728bde67bdb | 713 | * Set to NaN or 0.0 if not required. |
Vkadaba | 5:0728bde67bdb | 714 | */ |
Vkadaba | 5:0728bde67bdb | 715 | float32_t gainAdjustment; |
Vkadaba | 5:0728bde67bdb | 716 | /*!< Optional gain adjustment value applied to each processed sample. |
Vkadaba | 5:0728bde67bdb | 717 | * Set to NaN or 1.0 if not required. |
Vkadaba | 5:0728bde67bdb | 718 | */ |
Vkadaba | 5:0728bde67bdb | 719 | float32_t sensorParameter; |
Vkadaba | 5:0728bde67bdb | 720 | /*!< Optional sensor parameter adjustment. |
Vkadaba | 5:0728bde67bdb | 721 | * Set to NaN or 0 if not required. |
Vkadaba | 5:0728bde67bdb | 722 | */ |
Vkadaba | 5:0728bde67bdb | 723 | uint32_t measurementsPerCycle; |
Vkadaba | 5:0728bde67bdb | 724 | /*!< The number of measurements to obtain from this channel within each |
Vkadaba | 5:0728bde67bdb | 725 | * cycle. Each enabled channel is measured in turn, until the number of |
Vkadaba | 5:0728bde67bdb | 726 | * measurements requested for the channel has been reached. A different |
Vkadaba | 5:0728bde67bdb | 727 | * number of measurements-per-cycle may be specified for each channel. |
Vkadaba | 5:0728bde67bdb | 728 | */ |
Vkadaba | 5:0728bde67bdb | 729 | uint32_t cycleSkipCount; |
Vkadaba | 5:0728bde67bdb | 730 | /*!< Optional number of cycles to skip, such that this channel is included |
Vkadaba | 5:0728bde67bdb | 731 | * in the sequence in only one of every (cycleSkipCount + 1) cycles that |
Vkadaba | 5:0728bde67bdb | 732 | * occur. If set to 0 (default), this channel is included in every cycle; |
Vkadaba | 5:0728bde67bdb | 733 | * if set to 1, this channel is included in every 2nd cycle; if set to 2, |
Vkadaba | 5:0728bde67bdb | 734 | * this channel is included in every 3rd cycle, and so on. |
Vkadaba | 5:0728bde67bdb | 735 | */ |
Vkadaba | 5:0728bde67bdb | 736 | uint32_t extraSettlingTime; |
Vkadaba | 5:0728bde67bdb | 737 | /*!< A minimum settling time is applied internally for each channel, based |
Vkadaba | 5:0728bde67bdb | 738 | * on the sensor type. However, additional settling time (microseconds) |
Vkadaba | 5:0728bde67bdb | 739 | * can optionally be specified. Set to 0 if not required. |
Vkadaba | 5:0728bde67bdb | 740 | */ |
Vkadaba | 6:9d393a9677f4 | 741 | ADMW1001_CHANNEL_PRIORITY priority; |
Vkadaba | 5:0728bde67bdb | 742 | /*!< By default, channels are arranged in the measurement sequence based on |
Vkadaba | 5:0728bde67bdb | 743 | * ascending order of channel ID. However, a priority-level may be |
Vkadaba | 5:0728bde67bdb | 744 | * specified per channel to force a different ordering of the channels, |
Vkadaba | 5:0728bde67bdb | 745 | * with higher-priority channels appearing before lower-priority channels. |
Vkadaba | 5:0728bde67bdb | 746 | * Channels with equal priority are ordered by ascending order of channel |
Vkadaba | 5:0728bde67bdb | 747 | * ID. Lower numbers indicate higher priority, with 0 being the highest. |
Vkadaba | 5:0728bde67bdb | 748 | * Set to 0 if not required. |
Vkadaba | 5:0728bde67bdb | 749 | */ |
Vkadaba | 5:0728bde67bdb | 750 | union { |
Vkadaba | 5:0728bde67bdb | 751 | ADMW1001_ADC_CHANNEL_CONFIG adcChannelConfig; |
Vkadaba | 5:0728bde67bdb | 752 | /*!< ADC channel configuration - applicable only to ADC channels */ |
Vkadaba | 5:0728bde67bdb | 753 | ADMW1001_I2C_CHANNEL_CONFIG i2cChannelConfig; |
Vkadaba | 5:0728bde67bdb | 754 | /*!< I2C channel configuration - applicable only to I2C channels */ |
Vkadaba | 5:0728bde67bdb | 755 | ADMW1001_SPI_CHANNEL_CONFIG spiChannelConfig; |
Vkadaba | 5:0728bde67bdb | 756 | /*!< SPI channel configuration - applicable only to SPI channels */ |
Vkadaba | 5:0728bde67bdb | 757 | }; |
Vkadaba | 6:9d393a9677f4 | 758 | /*!< Only one of adcChannelConfig, i2cChannelConfig, spiChannelConfig |
Vkadaba | 6:9d393a9677f4 | 759 | * is required, depending on the channel designation |
Vkadaba | 6:9d393a9677f4 | 760 | * (analog, I2C, SPI) |
Vkadaba | 5:0728bde67bdb | 761 | */ |
Vkadaba | 5:0728bde67bdb | 762 | } ADMW1001_CHANNEL_CONFIG; |
Vkadaba | 5:0728bde67bdb | 763 | |
Vkadaba | 5:0728bde67bdb | 764 | /*! ADMW1001 Diagnostics configuration details */ |
Vkadaba | 5:0728bde67bdb | 765 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 766 | bool disableGlobalDiag; |
Vkadaba | 5:0728bde67bdb | 767 | /*!< Option to disable the following diagnostic checks on the ADC: |
Vkadaba | 5:0728bde67bdb | 768 | * - Reference Detection errors |
Vkadaba | 5:0728bde67bdb | 769 | * - Input under-/over-voltage errors |
Vkadaba | 5:0728bde67bdb | 770 | * - Calibration, Conversion and Saturation errors |
Vkadaba | 5:0728bde67bdb | 771 | */ |
Vkadaba | 5:0728bde67bdb | 772 | bool disableMeasurementDiag; |
Vkadaba | 5:0728bde67bdb | 773 | /*!< Option to disable additional checks per measurement channel: |
Vkadaba | 5:0728bde67bdb | 774 | * - High/low threshold limit violation |
Vkadaba | 5:0728bde67bdb | 775 | */ |
Vkadaba | 5:0728bde67bdb | 776 | #ifdef __V2_3_CFG_FMT__ |
Vkadaba | 5:0728bde67bdb | 777 | bool disableCriticalTempAbort; |
Vkadaba | 5:0728bde67bdb | 778 | /*!< Option to disable abort of measurement cycle if the operating |
Vkadaba | 5:0728bde67bdb | 779 | * temperature of the ADMW1001 has exceeded critical limits |
Vkadaba | 5:0728bde67bdb | 780 | */ |
Vkadaba | 5:0728bde67bdb | 781 | #endif |
Vkadaba | 5:0728bde67bdb | 782 | ADMW1001_OPEN_SENSOR_DIAGNOSTICS osdFrequency; |
Vkadaba | 5:0728bde67bdb | 783 | /*!< Option to enable Open-Circuit Detection at a selected cycle interval */ |
Vkadaba | 5:0728bde67bdb | 784 | } ADMW1001_DIAGNOSTICS_CONFIG; |
Vkadaba | 5:0728bde67bdb | 785 | |
Vkadaba | 5:0728bde67bdb | 786 | #ifdef __V2_3_CFG_FMT__ |
Vkadaba | 5:0728bde67bdb | 787 | typedef uint16_t ADMW1001_ADVANCED_ACCESS_KEY; |
Vkadaba | 5:0728bde67bdb | 788 | #endif |
Vkadaba | 5:0728bde67bdb | 789 | |
Vkadaba | 5:0728bde67bdb | 790 | /*! ADMW1001 Device configuration details */ |
Vkadaba | 5:0728bde67bdb | 791 | typedef struct { |
Vkadaba | 5:0728bde67bdb | 792 | ADMW1001_POWER_CONFIG power; |
Vkadaba | 5:0728bde67bdb | 793 | /*!< Power configuration details */ |
Vkadaba | 5:0728bde67bdb | 794 | ADMW1001_MEASUREMENT_CONFIG measurement; |
Vkadaba | 5:0728bde67bdb | 795 | /*!< Measurement configuration details */ |
Vkadaba | 5:0728bde67bdb | 796 | ADMW1001_DIAGNOSTICS_CONFIG diagnostics; |
Vkadaba | 5:0728bde67bdb | 797 | /*!< FFT configuration details */ |
Vkadaba | 5:0728bde67bdb | 798 | ADMW1001_CHANNEL_CONFIG channels[ADMW1001_MAX_CHANNELS]; |
Vkadaba | 5:0728bde67bdb | 799 | /*!< Channel-specific configuration details */ |
Vkadaba | 5:0728bde67bdb | 800 | #ifdef __V2_3_CFG_FMT__ |
Vkadaba | 5:0728bde67bdb | 801 | ADMW1001_ADVANCED_ACCESS_KEY advancedAccessKey; |
Vkadaba | 5:0728bde67bdb | 802 | #endif |
Vkadaba | 5:0728bde67bdb | 803 | /*!< Key to enable access to advanced sensor configuration options */ |
Vkadaba | 5:0728bde67bdb | 804 | } ADMW1001_CONFIG; |
Vkadaba | 5:0728bde67bdb | 805 | |
Vkadaba | 5:0728bde67bdb | 806 | #ifdef __cplusplus |
Vkadaba | 5:0728bde67bdb | 807 | } |
Vkadaba | 5:0728bde67bdb | 808 | #endif |
Vkadaba | 5:0728bde67bdb | 809 | |
Vkadaba | 5:0728bde67bdb | 810 | /*! |
Vkadaba | 5:0728bde67bdb | 811 | * @} |
Vkadaba | 5:0728bde67bdb | 812 | */ |
Vkadaba | 5:0728bde67bdb | 813 | |
Vkadaba | 5:0728bde67bdb | 814 | #endif /* __ADMW1001_CONFIG_H__ */ |