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