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