Sean Wilson / Mbed OS AdiSense1000_V21

Fork of AdiSense1000 by PoC_Team

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers adi_sense_1000_config.h Source File

adi_sense_1000_config.h

Go to the documentation of this file.
00001 /*
00002 CONFIDENTIAL AND PROPRIETARY INFORMATION
00003 
00004 Copyright (c) 2018 Emutex Ltd. All rights reserved.
00005 This software and documentation contain confidential and
00006 proprietary information that is the property of
00007 Emutex Ltd. The software and documentation are
00008 furnished under a license agreement and may be used
00009 or copied only in accordance with the terms of the license
00010 agreement. No part of the software and documentation
00011 may be reproduced, transmitted, or translated, in any
00012 form or by any means, electronic, mechanical, manual,
00013 optical, or otherwise, without prior written permission
00014 of Emutex Ltd., or as expressly provided by the license agreement.
00015 Reverse engineering is prohibited, and reproduction,
00016 disclosure or use without specific written authorization
00017 of Emutex Ltd. is strictly forbidden.
00018  */
00019 
00020 /*
00021 Copyright (c) 2017 Analog Devices, Inc.
00022 
00023 All rights reserved.
00024 
00025 Redistribution and use in source and binary forms, with or without modification,
00026 are permitted provided that the following conditions are met:
00027   - Redistributions of source code must retain the above copyright notice,
00028     this list of conditions and the following disclaimer.
00029   - Redistributions in binary form must reproduce the above copyright notice,
00030     this list of conditions and the following disclaimer in the documentation
00031     and/or other materials provided with the distribution.
00032   - Modified versions of the software must be conspicuously marked as such.
00033   - This software is licensed solely and exclusively for use with processors
00034     manufactured by or for Analog Devices, Inc.
00035   - This software may not be combined or merged with other code in any manner
00036     that would cause the software to become subject to terms and conditions
00037     which differ from those listed here.
00038   - Neither the name of Analog Devices, Inc. nor the names of its
00039     contributors may be used to endorse or promote products derived
00040     from this software without specific prior written permission.
00041   - The use of this software may or may not infringe the patent rights of one
00042     or more patent holders.  This license does not release you from the
00043     requirement that you obtain separate licenses from these patent holders
00044     to use this software.
00045 
00046 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY
00047 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
00048 TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
00049 NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
00050 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES
00051 (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL
00052 PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00053 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00054 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00055 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00056 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00057 */
00058 
00059 /*!
00060  ******************************************************************************
00061  * @file:   adi_sense_1000_config.h
00062  * @brief:  Configuration type definitions for ADSNS1000.
00063  *-----------------------------------------------------------------------------
00064  */
00065 
00066 #ifndef __ADI_SENSE_1000_CONFIG_H__
00067 #define __ADI_SENSE_1000_CONFIG_H__
00068 
00069 #include "adi_sense_platform.h"
00070 #include "adi_sense_1000_sensor_types.h"
00071 
00072 /*! @addtogroup ADSNS1000_Api
00073  *  @{
00074  */
00075 
00076 #ifdef __cplusplus
00077 extern "C" {
00078 #endif
00079 
00080 /*! Maximum length allowed for a digital sensor command */
00081 #define ADI_SENSE_1000_SENSOR_COMMAND_MAX_LENGTH 7
00082 
00083 /*! ADSNS1000 channel priority options */
00084 typedef enum {
00085     ADI_SENSE_1000_CHANNEL_PRIORITY_0 = 0,
00086     ADI_SENSE_1000_CHANNEL_PRIORITY_1,
00087     ADI_SENSE_1000_CHANNEL_PRIORITY_2,
00088     ADI_SENSE_1000_CHANNEL_PRIORITY_3,
00089     ADI_SENSE_1000_CHANNEL_PRIORITY_4,
00090     ADI_SENSE_1000_CHANNEL_PRIORITY_5,
00091     ADI_SENSE_1000_CHANNEL_PRIORITY_6,
00092     ADI_SENSE_1000_CHANNEL_PRIORITY_7,
00093     ADI_SENSE_1000_CHANNEL_PRIORITY_8,
00094     ADI_SENSE_1000_CHANNEL_PRIORITY_9,
00095     ADI_SENSE_1000_CHANNEL_PRIORITY_10,
00096     ADI_SENSE_1000_CHANNEL_PRIORITY_11,
00097     ADI_SENSE_1000_CHANNEL_PRIORITY_12,
00098     ADI_SENSE_1000_CHANNEL_PRIORITY_13,
00099     ADI_SENSE_1000_CHANNEL_PRIORITY_14,
00100     ADI_SENSE_1000_CHANNEL_PRIORITY_15,
00101 
00102     ADI_SENSE_1000_CHANNEL_PRIORITY_HIGHEST = ADI_SENSE_1000_CHANNEL_PRIORITY_0,
00103     ADI_SENSE_1000_CHANNEL_PRIORITY_LOWEST  = ADI_SENSE_1000_CHANNEL_PRIORITY_15,
00104 } ADI_SENSE_1000_CHANNEL_PRIORITY ;
00105 
00106 /*! ADSNS1000 operating mode options */
00107 typedef enum {
00108     ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE  = 1,
00109     /*!< Executes a single measurement cycle and stops */
00110     ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS ,
00111     /*!< Continuously executes measurement cycles */
00112     ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE ,
00113     /*!< Executes a burst of measurement cycles, repeated at defined intervals */
00114 } ADI_SENSE_1000_OPERATING_MODE ;
00115 
00116 /*! ADSNS1000 data ready mode options */
00117 typedef enum {
00118     ADI_SENSE_1000_DATAREADY_PER_CONVERSION  = 1,
00119     /*!< The DATAREADY signal is asserted after completion of each conversion
00120      *   - a single data sample only from the latest completed conversion is
00121      *     stored in this mode
00122      */
00123     ADI_SENSE_1000_DATAREADY_PER_CYCLE ,
00124     /*!< The DATAREADY signal is asserted after completion of each measurement
00125      *   cycle
00126      *   - data samples only from the lastest completed measurement cycle are
00127      *     stored in this mode
00128      */
00129     ADI_SENSE_1000_DATAREADY_PER_MULTICYCLE_BURST ,
00130     /*!< The DATAREADY signal is asserted after completion of each burst of
00131      *   measurement cycles
00132      *   - applicable only when @ref ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE
00133      *     is also selected
00134      *   - data samples only from the lastest completed burst of measurement
00135      *     cycles are stored in this mode
00136      */
00137 } ADI_SENSE_1000_DATAREADY_MODE ;
00138 
00139 /*! ADSNS1000 calibration mode options */
00140 typedef enum {
00141     ADI_SENSE_1000_NO_CALIBRATION  = 0,
00142     /*!< No full scale ADC calibration is performed after a latch command is sent.
00143      */
00144     ADI_SENSE_1000_DO_CALIBRATION ,
00145     /*!< Full scale ADC Calibration is performed after a latch command is sent.
00146      */
00147 } ADI_SENSE_1000_CALIBRATION_MODE ;
00148 
00149 /*! ADSNS1000 power mode options */
00150 typedef enum {
00151     ADI_SENSE_1000_POWER_MODE_LOW  = 1,
00152     /*!< Lowest ADC power consumption mode, with lowest conversion rate */
00153     ADI_SENSE_1000_POWER_MODE_MID ,
00154     /*!< Medium ADC power consumption mode, with medium conversion rate */
00155     ADI_SENSE_1000_POWER_MODE_FULL ,
00156     /*!< Highest ADC power consumption mode, with highest conversion rate */
00157 } ADI_SENSE_1000_POWER_MODE ;
00158 
00159 /*! ADSNS1000 measurement cycle types */
00160 typedef enum
00161 {
00162     ADI_SENSE_1000_CYCLE_TYPE_SWITCH  = 0,
00163     /*!< Switch channels after every conversion */
00164     ADI_SENSE_1000_CYCLE_TYPE_FULL    = 1
00165     /*!< Perform full number of requested conversions on a channel
00166      *   consecutively before switching to the next channel */
00167 } ADI_SENSE_1000_CYCLE_TYPE ;
00168 
00169 /*! ADSNS1000 measurement unit options
00170  *
00171  *  Optionally select a measurement unit for final conversion results.
00172  *  Currently applicable only to specific temperature sensor types.
00173  */
00174 typedef enum {
00175     ADI_SENSE_1000_MEASUREMENT_UNIT_UNSPECIFIED  = 0,
00176     /*!< No measurement unit specified */
00177     ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS ,
00178     /*!< Celsius temperature unit - applicable to temperature sensors only */
00179     ADI_SENSE_1000_MEASUREMENT_UNIT_FAHRENHEIT ,
00180     /*!< Fahrenheit temperature unit - applicable to temperature sensors only */
00181 } ADI_SENSE_1000_MEASUREMENT_UNIT ;
00182 
00183 /*! ADSNS1000 Open-Sensor Diagnostics frequency
00184  *
00185  *  Select the per-cycle frequency at which open-sensor diagnostic
00186  *  checks should be performed.  Open-sensor diagnostic checks typically require
00187  *  specific or time-consuming processing which cannot be executed while a
00188  *  measurement cycle is running.
00189  *
00190  *  @note Open-sensor diagnostic checks, when performed, will add a delay to the
00191  *        start of the next measurement cycle.
00192  */
00193 typedef enum {
00194     ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_DISABLED  = 0,
00195     /*!< No Open-Sensor Detection is performed */
00196     ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_PER_CYCLE ,
00197     /*!< No Open-Sensor Detection is performed prior to each cycle */
00198     ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_PER_100_CYCLES ,
00199     /*!< No Open-Sensor Detection is performed at intervals of 100 cycles */
00200     ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS_PER_1000_CYCLES ,
00201     /*!< No Open-Sensor Detection is performed at intervals of 1000 cycles */
00202 } ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS ;
00203 
00204 /*! ADSNS1000 analog input signal amplification gain options
00205  *
00206  *  @note applicable only to ADC analog sensor channels
00207  */
00208 typedef enum {
00209     ADI_SENSE_1000_ADC_GAIN_1X  = 0,
00210     /*!< no amplification gain */
00211     ADI_SENSE_1000_ADC_GAIN_2X ,
00212     /*!< x2 amplification gain */
00213     ADI_SENSE_1000_ADC_GAIN_4X ,
00214     /*!< x4 amplification gain */
00215     ADI_SENSE_1000_ADC_GAIN_8X ,
00216     /*!< x8 amplification gain */
00217     ADI_SENSE_1000_ADC_GAIN_16X ,
00218     /*!< x16 amplification gain */
00219     ADI_SENSE_1000_ADC_GAIN_32X ,
00220     /*!< x32 amplification gain */
00221     ADI_SENSE_1000_ADC_GAIN_64X ,
00222     /*!< x64 amplification gain */
00223     ADI_SENSE_1000_ADC_GAIN_128X ,
00224     /*!< x128 amplification gain */
00225 } ADI_SENSE_1000_ADC_GAIN ;
00226 
00227 /*! ADSNS1000 analog sensor excitation current output level options
00228  *
00229  *  @note applicable only to ADC analog sensor channels, and
00230  *        specific sensor types
00231  */
00232 typedef enum {
00233     ADI_SENSE_1000_ADC_EXC_CURRENT_NONE  = 0,
00234     /*!< Excitation current disabled */
00235     ADI_SENSE_1000_ADC_EXC_CURRENT_50uA ,
00236     /*!< 50uA excitation current enabled */
00237     ADI_SENSE_1000_ADC_EXC_CURRENT_100uA ,
00238     /*!< 100uA excitation current  */
00239     ADI_SENSE_1000_ADC_EXC_CURRENT_250uA ,
00240     /*!< 250uA excitation current enabled */
00241     ADI_SENSE_1000_ADC_EXC_CURRENT_500uA ,
00242     /*!< 500uA excitation current enabled */
00243     ADI_SENSE_1000_ADC_EXC_CURRENT_750uA ,
00244     /*!< 750uA excitation current enabled */
00245     ADI_SENSE_1000_ADC_EXC_CURRENT_1000uA ,
00246     /*!< 1mA excitation current enabled */
00247 } ADI_SENSE_1000_ADC_EXC_CURRENT ;
00248 
00249 /*! ADSNS1000 analog sensor excitation current ratios used for diode sensor
00250  *
00251  *  @note applicable only to a diode sensor
00252  */
00253 typedef enum {
00254     ADI_SENSE_1000_ADC_EXC_CURRENT_IOUT_DIODE_DEFAULT = 0,
00255     ADI_SENSE_1000_ADC_EXC_CURRENT_IOUT_DIODE_MAX,
00256 } ADI_SENSE_1000_ADC_EXC_CURRENT_DIODE_RATIO ;
00257 
00258 /*! ADSNS1000 analog reference selection options
00259  *
00260  *  @note applicable only to ADC analog sensor channels, and
00261  *        specific sensor types
00262  */
00263 typedef enum {
00264     ADI_SENSE_1000_ADC_REFERENCE_NONE  = 0,
00265     /*!< No reference is selected */
00266 
00267     ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1 ,
00268     /*!< Internal reference resistor #1 (4320 ohms) is selected */
00269     ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_2 ,
00270     /*!< Internal reference resistor #2 (10000 ohms) is selected */
00271     ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_INTERNAL ,
00272     /*!< Internal ADC voltage reference (2.5V) is selected */
00273     ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_AVDD ,
00274     /*!< Analag Supply Voltage AVDD reference (typically 3.3V) is selected */
00275 
00276     ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_EXTERNAL_1 ,
00277     /*!< External user-supplied reference resistor #1 is selected
00278      *
00279      * @note reference resistor value externalRef1Value must be specified
00280      * (see @ref ADI_SENSE_1000_MEASUREMENT_CONFIG) */
00281     ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_EXTERNAL_2 ,
00282     /*!< External user-supplied reference resistor #2 is selected
00283      *
00284      * @note reference resistor value externalRef2Value must be specified
00285      * (see @ref ADI_SENSE_1000_MEASUREMENT_CONFIG) */
00286     ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_EXTERNAL_1 ,
00287     /*!< External user-supplied reference voltage #1 is selected
00288      *
00289      * @note reference voltage value externalRef1Value must be specified
00290      * (see @ref ADI_SENSE_1000_MEASUREMENT_CONFIG) */
00291     ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_EXTERNAL_2 ,
00292     /*!< External user-supplied reference voltage #2 is selected
00293      *
00294      * @note reference voltage value externalRef2Value must be specified
00295      * (see @ref ADI_SENSE_1000_MEASUREMENT_CONFIG) */
00296     ADI_SENSE_1000_ADC_REFERENCE_BRIDGE_EXCITATION ,
00297     /*!< Bridge Excition Voltage is selected as reference
00298      *
00299      * @note this reference MUST be selected for 4/6-wire bridge sensor types
00300      * (see @ref ADI_SENSE_1000_ADC_SENSOR_TYPE) */
00301 } ADI_SENSE_1000_ADC_REFERENCE_TYPE ;
00302 
00303 /*! ADSNS1000 analog filter selection options
00304  *
00305  *  @note applicable only to ADC analog sensor channels
00306  */
00307 typedef enum {
00308     ADI_SENSE_1000_ADC_FILTER_SINC4  = 1,
00309     /*!< SINC4 filter
00310      *
00311      * @note The number of input samples to be averaged by the filter
00312      *       must be specified by fs (see @ref ADI_SENSE_1000_ADC_FILTER_CONFIG).
00313      *       The fs value affects the output sample rate and settling times
00314      *       of the ADC */
00315     ADI_SENSE_1000_ADC_FILTER_FIR_20SPS ,
00316     /*!< FIR post filter, producing a 20sps output sample rate */
00317     ADI_SENSE_1000_ADC_FILTER_FIR_25SPS ,
00318     /*!< FIR post filter, producing a 25sps output sample rate */
00319 } ADI_SENSE_1000_ADC_FILTER_TYPE ;
00320 
00321 /*! ADSNS1000 FFT sequence mode options
00322  *
00323  *  @note applicable only for FFT measurement modes
00324  */
00325 typedef enum {
00326     ADI_SENSE_1000_FFT_MODE_SINGLE  = 0,
00327     /*!< Performs a single sequence of FFTs on selected channels and stops */
00328     ADI_SENSE_1000_FFT_MODE_CONTINUOUS ,
00329     /*!< Performs continuous sequences of FFTs on selected channels */
00330 } ADI_SENSE_1000_FFT_MODE ;
00331 
00332 /*! ADSNS1000 FFT size options (number of bins)
00333  *
00334  *  @note applicable only for FFT measurement modes
00335  */
00336 typedef enum {
00337     ADI_SENSE_1000_FFT_SIZE_256  = 0,
00338     /*!< 256 bins */
00339     ADI_SENSE_1000_FFT_SIZE_512 ,
00340     /*!< 512 bins */
00341     ADI_SENSE_1000_FFT_SIZE_1024 ,
00342     /*!< 1024 bins */
00343     ADI_SENSE_1000_FFT_SIZE_2048 ,
00344     /*!< 2048 bins */
00345 } ADI_SENSE_1000_FFT_SIZE ;
00346 
00347 /*! ADSNS1000 FFT window type options
00348  *
00349  *  @note applicable only for FFT measurement modes
00350  */
00351 typedef enum {
00352     ADI_SENSE_1000_FFT_WINDOW_NONE  = 0,
00353     /*!< No Window */
00354     ADI_SENSE_1000_FFT_WINDOW_HANN ,
00355     /*!< Hann Window */
00356     ADI_SENSE_1000_FFT_WINDOW_BLACKMAN_HARRIS ,
00357     /*!< Blackman-Harris Window */
00358 } ADI_SENSE_1000_FFT_WINDOW ;
00359 
00360 /*! ADSNS1000 FFT output format options
00361  *
00362  *  @note applicable only for FFT measurement modes
00363  */
00364 typedef enum {
00365     ADI_SENSE_1000_FFT_OUTPUT_FULL  = 0,
00366     /*!< N/2-Term Amplitude Response */
00367     ADI_SENSE_1000_FFT_OUTPUT_FULL_WITH_RAW,
00368     /**< N/2-Term Amplitude Response Plus N Raw ADC Samples */
00369     ADI_SENSE_1000_FFT_OUTPUT_MAX16 ,
00370     /*!< Bin-Number and Amplitude of 16 Highest Peaks of Amplitude Response */
00371 } ADI_SENSE_1000_FFT_OUTPUT ;
00372 
00373 /*! ADSNS1000 I2C clock speed options
00374  *
00375  *  @note applicable only for I2C sensors
00376  */
00377 typedef enum
00378 {
00379   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K  = 0,
00380     /*!< 100kHz I2C clock speed */
00381   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K ,
00382     /*!< 400kHz I2C clock speed */
00383 } ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED ;
00384 
00385 /*! ADSNS1000 UART baud rate options
00386  *
00387  *  @note applicable only for UART sensors
00388  */
00389 typedef enum
00390 {
00391   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_115200  = 0,
00392     /*!< 115200 UART baud rate */
00393   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_57600 ,
00394     /*!< 57600 UART baud rate */
00395   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_38400 ,
00396     /*!< 38400 UART baud rate */
00397   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_19200 ,
00398     /*!< 19200 UART baud rate */
00399   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_9600 ,
00400     /*!< 9600 UART baud rate */
00401   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_4800 ,
00402     /*!< 4800 UART baud rate */
00403   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_2400 ,
00404     /*!< 2400 UART baud rate */
00405   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE_1200 ,
00406     /*!< 1200 UART baud rate */
00407 } ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE ;
00408 
00409 /*! ADSNS1000 UART line config options
00410  *
00411  *  @note applicable only for UART sensors
00412  */
00413 typedef enum
00414 {
00415   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N1  = 0,
00416     /*!< UART line control 8 data bits / no parity / 1 stop bit  */
00417   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N2 ,
00418     /*!< UART line control 8 data bits / no parity / 2 stop bits  */
00419   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8N3 ,
00420     /*!< UART line control 8 data bits / no parity / 3 stop bits  */
00421   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E1 ,
00422     /*!< UART line control 8 data bits / even parity / 1 stop bit  */
00423   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E2 ,
00424     /*!< UART line control 8 data bits / even parity / 2 stop bits  */
00425   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8E3 ,
00426     /*!< UART line control 8 data bits / even parity / 3 stop bits  */
00427   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O1 ,
00428     /*!< UART line control 8 data bits / odd parity / 1 stop bit  */
00429   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O2 ,
00430     /*!< UART line control 8 data bits / odd parity / 2 stop bits  */
00431   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG_8O3 ,
00432     /*!< UART line control 8 data bits / odd parity / 3 stop bits  */
00433 } ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG ;
00434 
00435 /*! ADSNS1000 SPI mode options
00436  *
00437  *  @note applicable only for SPI sensors
00438  */
00439 typedef enum
00440 {
00441   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_0  = 0,
00442     /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 0 */
00443   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_1 ,
00444     /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 1 */
00445   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_2 ,
00446     /*!< SPI mode 0 Clock Polarity = 1 Clock Phase = 0 */
00447   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE_3 ,
00448     /*!< SPI mode 0 Clock Polarity = 1 Clock Phase = 1 */
00449 } ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE ;
00450 
00451 /*! ADSNS1000 SPI clock speed options
00452  *
00453  *  @note applicable only for SPI sensors
00454  */
00455 typedef enum
00456 {
00457   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_13MHZ  = 0,
00458     /*!< SPI Clock Speed configured to 13MHz */
00459   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6_5MHZ ,
00460     /*!< SPI Clock Speed configured to 6.5MHz */
00461   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3_25MHZ ,
00462     /*!< SPI Clock Speed configured to 3.25MHz */
00463   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_625MHZ ,
00464     /*!< SPI Clock Speed configured to 1.625MHz */
00465   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_812KHZ ,
00466     /*!< SPI Clock Speed configured to 812kHz */
00467   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_406KHZ ,
00468     /*!< SPI Clock Speed configured to 406kHz */
00469   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_203KHZ ,
00470     /*!< SPI Clock Speed configured to 203kHz */
00471   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_101KHZ ,
00472     /*!< SPI Clock Speed configured to 101kHz */
00473   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_50KHZ ,
00474     /*!< SPI Clock Speed configured to 50kHz */
00475   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_25KHZ ,
00476     /*!< SPI Clock Speed configured to 25kHz */
00477   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_12KHZ ,
00478     /*!< SPI Clock Speed configured to 12kHz */
00479   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_6KHZ ,
00480     /*!< SPI Clock Speed configured to 6kHz */
00481   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3KHZ ,
00482     /*!< SPI Clock Speed configured to 3kHz */
00483   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1_5KHZ ,
00484     /*!< SPI Clock Speed configured to 1.5kHz */
00485   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_793HZ ,
00486     /*!< SPI Clock Speed configured to 793hz */
00487   ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK_396HZ ,
00488     /*!< SPI Clock Speed configured to 396hz */
00489 } ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK ;
00490 
00491 /*! ADSNS1000 Power Configuration options */
00492 typedef struct {
00493     ADI_SENSE_1000_POWER_MODE         powerMode;
00494     /*!< Power mode selection */
00495 } ADI_SENSE_1000_POWER_CONFIG ;
00496 
00497 /*! ADSNS1000 Multi-Cycle Configuration options
00498  *
00499  * @note required only when ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE is selected
00500  *       as the operatingMode (@ref ADI_SENSE_1000_MEASUREMENT_CONFIG)
00501  */
00502 typedef struct {
00503     uint32_t                         cyclesPerBurst;
00504     /*!< Number of cycles to complete for a single burst */
00505     uint32_t                         burstInterval;
00506     /*!< Interval, in seconds, between each successive burst of cycles */
00507 } ADI_SENSE_1000_MULTICYCLE_CONFIG ;
00508 
00509 /*! ADSNS1000 Measurement Configuration options */
00510 typedef struct {
00511     ADI_SENSE_1000_OPERATING_MODE     operatingMode;
00512     /*!< Operating mode - specifies how measurement cycles are scheduled */
00513     ADI_SENSE_1000_DATAREADY_MODE     dataReadyMode;
00514     /*!< Data read mode - specifies how output samples are stored for reading */
00515     ADI_SENSE_1000_CALIBRATION_MODE  calibrationMode;
00516     /*!< Calibration mode - specifies if adc calibration is performed after a latch command */
00517     ADI_SENSE_1000_MULTICYCLE_CONFIG  multiCycleConfig;
00518     /*!< Multi-Cycle configuration - specifies how bursts of measurement cycles
00519      *   are scheduled.  Applicable only when operatingMode is
00520      *   ADI_SENSE_1000_OPERATING_MODE_MULTICYCLE
00521      */
00522     uint32_t                         cycleInterval;
00523     /*!< Cycle interval - specifies the time interval between the start of each
00524      *   successive measurement cycle.  Applicable only when operatingMode is
00525      *   not ADI_SENSE_1000_OPERATING_MODE_SINGLECYCLE
00526      */
00527     ADI_SENSE_1000_CYCLE_TYPE         cycleType;
00528     /*!< Cycle type - specifies how the channel list is traversed with each
00529      *   conversion during the cycle.
00530      */
00531     float32_t                        externalRef1Value;
00532     /*!< Resistance/voltage value connected to external reference input #1.
00533      *   Applicable only if the selected reference type is
00534      *   ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_EXTERNAL_1 or
00535      *   ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_EXTERNAL_1
00536      *   (see @ref ADI_SENSE_1000_ADC_REFERENCE_TYPE)
00537      */
00538     float32_t                        externalRef2Value;
00539     /*!< Resistance/voltage value connected to external reference input #2.
00540      *   Applicable only if the selected reference type is
00541      *   ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_EXTERNAL_2 or
00542      *   ADI_SENSE_1000_ADC_REFERENCE_VOLTAGE_EXTERNAL_2
00543      *   (see @ref ADI_SENSE_1000_ADC_REFERENCE_TYPE)
00544      */    
00545     bool                             enableExternalFlash;
00546     /*!< Enable the use of external flash memory for storage of samples.
00547      */
00548 } ADI_SENSE_1000_MEASUREMENT_CONFIG ;
00549 
00550 /*! ADSNS1000 ADC Excitation Current output configuration
00551  *
00552  *  @note applicable only to ADC analog sensor channels, and
00553  *        specific sensor types
00554  */
00555 typedef struct {
00556     ADI_SENSE_1000_ADC_EXC_CURRENT               outputLevel;
00557     /*!< Excitation current output level */
00558     ADI_SENSE_1000_ADC_EXC_CURRENT_DIODE_RATIO   diodeRatio;
00559     /*!< Excitation current output diode ratio */
00560 } ADI_SENSE_1000_ADC_EXC_CURRENT_CONFIG ;
00561 
00562 /*! ADSNS1000 ADC Filter configuration
00563  *
00564  *  @note applicable only to ADC analog sensor channels
00565  */
00566 typedef struct {
00567     ADI_SENSE_1000_ADC_FILTER_TYPE    type;
00568     /*!< Filter type selection */
00569     uint32_t                         fs;
00570     /*!< Number of input samples to accumulate and average in the filter.
00571      *   Applicable only when type is ADI_SENSE_1000_ADC_FILTER_SINC4 */
00572 } ADI_SENSE_1000_ADC_FILTER_CONFIG ;
00573 
00574 /*! ADSNS1000 ADC Referemce configuration
00575  *
00576  *  @note applicable only to ADC analog sensor channels
00577  */
00578 typedef struct {
00579     ADI_SENSE_1000_ADC_REFERENCE_TYPE  type;
00580     /*!< Filter type selection */
00581     bool_t                            disableBuffer;
00582     /*!< Option to disable internal ADC reference buffer */
00583 } ADI_SENSE_1000_ADC_REFERENCE_CONFIG ;
00584 
00585 /*! ADSNS1000 ADC analog channel configuration details
00586  *
00587  *  @note applicable only to ADC analog sensor channels
00588  */
00589 typedef struct {
00590     ADI_SENSE_1000_ADC_SENSOR_TYPE         sensor;
00591     /*!< Sensor type selection */
00592     ADI_SENSE_1000_ADC_GAIN                gain;
00593     /*!< ADC Gain selection */
00594     ADI_SENSE_1000_ADC_EXC_CURRENT_CONFIG  current;
00595     /*!< ADC Excitation Current configuration */
00596     ADI_SENSE_1000_ADC_FILTER_CONFIG       filter;
00597     /*!< ADC Filter configuration */
00598     ADI_SENSE_1000_ADC_REFERENCE_CONFIG    reference;
00599     /*!< ADC Reference configuration */
00600     bool_t                                enableVbias;
00601     /*!< Option to enable internal ADC voltage bias */
00602 } ADI_SENSE_1000_ADC_CHANNEL_CONFIG ;
00603 
00604 /*! ADSNS1000 digital sensor data encoding
00605  *
00606  *  @note applicable only to SPI and I2C digital sensor channels
00607  */
00608 typedef enum
00609 {
00610     ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_NONE,
00611     /**< None/Invalid - data format is ignored if coding is set to this value */
00612     ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR,
00613     /**< Unipolar - unsigned integer values */
00614     ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_TWOS_COMPLEMENT,
00615     /**< Twos-complement - signed integer values */
00616     ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING_OFFSET_BINARY,
00617     /**< Offset Binary - used to represent signed values with unsigned integers,
00618      *   with the mid-range value representing 0 */
00619 } ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING ;
00620 
00621 /*! ADSNS1000 digital sensor data format configuration
00622  *
00623  *  @note applicable only to SPI and I2C digital sensor channels
00624  */
00625 typedef struct {
00626     ADI_SENSE_1000_DIGITAL_SENSOR_DATA_CODING  coding;
00627     /**< Data Encoding of Sensor Result */
00628     bool_t littleEndian;
00629     /**< Set as true if data format is little-endian, false otherwise */
00630     bool_t leftJustified;
00631     /**< Set as true if data is left-justified in the data frame, false otherwise */
00632     uint8_t frameLength;
00633     /**< Data frame length (number of bytes to read from the sensor) */
00634     uint8_t numDataBits;
00635     /**< Number of relevant data bits to extract from the data frame */
00636     uint8_t bitOffset;
00637     /**< Data bit offset, relative to data alignment within the data frame */
00638 } ADI_SENSE_1000_DIGITAL_SENSOR_DATA_FORMAT ;
00639 
00640 /*! ADSNS1000 digital sensor command
00641  *
00642  *  @note applicable only to SPI and I2C digital sensor channels
00643  */
00644 typedef struct {
00645     uint8_t command[ADI_SENSE_1000_SENSOR_COMMAND_MAX_LENGTH];
00646     /*!< Optional command bytes to send to the device */
00647     uint8_t commandLength;
00648     /*!< Number of valid command bytes.  Set to 0 if unused */
00649 } ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND ;
00650 
00651 /*! ADSNS1000 digital sensor calibration param
00652  *
00653  *  @note applicable only to digital sensor channels
00654  */
00655 typedef struct {
00656     uint32_t calibrationParam;
00657     /*!< Independently established environmental variable used during calibration
00658      *   of a digital sensor. Used only if the sensor supports calibration
00659      *   and expects an environmental parameter
00660      */
00661     bool_t enableCalibrationParam;
00662     /*!< Allow Calibration_Parameter to be used during calibration of any digital sensor */
00663 } ADI_SENSE_1000_DIGITAL_CALIBRATION_COMMAND ;
00664 
00665 /*! ADSNS1000 digital sensor communication config
00666  *
00667  *  @note applicable only to digital sensor channels
00668  */
00669 typedef struct {
00670     bool_t  useCustomCommsConfig;
00671     /*!< Optional parameter to enable user digital communication settings */
00672     ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED      i2cClockSpeed;
00673     /*!< Optional parameter to configure specific i2c speed for i2c sensor */
00674     ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_MODE             spiMode;
00675     /*!< Optional parameter to configure specific spi mode for spi sensor */
00676     ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_SPI_CLOCK            spiClock;
00677     /*!< Optional parameter to configure specific spi clock for spi sensor */
00678     ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_BAUD_RATE       uartBaudRate;
00679     /*!< Optional parameter to configure specific uart baud rate for uart sensor */
00680     ADI_SENSE_1000_DIGITAL_SENSOR_COMMS_UART_LINE_CONFIG     uartLineConfig;
00681     /*!< Optional parameter to configure specific uart line control for uart sensor */
00682 } ADI_SENSE_1000_DIGITAL_SENSOR_COMMS ;
00683 
00684 /*! ADSNS1000 I2C digital channel configuration details
00685  *
00686  *  @note applicable only to I2C digital sensor channels
00687  */
00688 typedef struct {
00689     ADI_SENSE_1000_I2C_SENSOR_TYPE         sensor;
00690     /*!< Sensor type selection */
00691     uint32_t                              deviceAddress;
00692     /*!< I2C device address (7-bit) */
00693     ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND  configurationCommand;
00694     /*!< Optional configuration command to send to the device at start-up.
00695      *   A default configuration command will be used if this is not specified.
00696      *   Applicable only to specific I2C sensor types.
00697      */
00698     ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND  dataRequestCommand;
00699     /*!< Optional data request command to send to the device for each sample.
00700      *   A default data request command will be used if this is not specified.
00701      *   Applicable only to specific I2C sensor types.
00702      */
00703     ADI_SENSE_1000_DIGITAL_SENSOR_DATA_FORMAT  dataFormat;
00704     /*!< Optional data format configuration to parse/extract data from the device.
00705      *   A default data format will be used if this is not specified.
00706      *   Applicable only to specific I2C sensor types
00707      */
00708     ADI_SENSE_1000_DIGITAL_CALIBRATION_COMMAND  digitalCalibrationParam;
00709     /*!< This is used to supply an independently established environmental variable
00710      *   that must be used during calibration of a [digital] sensor which a)
00711      *   supports calibration and b) expects an environmental parameter.
00712      *   An example is a CO2 sensor, which may require the CO2 concentration level
00713      *   when performing a calibration
00714      */
00715     ADI_SENSE_1000_DIGITAL_SENSOR_COMMS  configureComms;
00716     /*!< Optional configuration to setup a user communication config.
00717      *   A default configuration  will be used if this is not specified.
00718      *   Applicable only to specific I2C sensor types.
00719      */
00720 } ADI_SENSE_1000_I2C_CHANNEL_CONFIG ;
00721 
00722 /*! ADSNS1000 SPI digital channel configuration details
00723  *
00724  *  @note applicable only to SPI digital sensor channels
00725  */
00726 typedef struct {
00727     ADI_SENSE_1000_SPI_SENSOR_TYPE         sensor;
00728     /*!< Sensor type selection */
00729     ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND  configurationCommand;
00730     /*!< Optional configuration command to send to the device at start-up.
00731      *   A default configuration command will be used if this is not specified.
00732      *   Applicable only to specific SPI sensor types.
00733      */
00734     ADI_SENSE_1000_DIGITAL_SENSOR_COMMAND  dataRequestCommand;
00735     /*!< Optional data request command to send to the device for each sample.
00736      *   A default data request command will be used if this is not specified.
00737      *   Applicable only to specific SPI sensor types.
00738      */
00739     ADI_SENSE_1000_DIGITAL_SENSOR_DATA_FORMAT  dataFormat;
00740     /*!< Optional data format configuration to parse/extract data from the device.
00741      *   A default data format will be used if this is not specified.
00742      *   Applicable only to specific SPI sensor types
00743      */
00744     ADI_SENSE_1000_DIGITAL_CALIBRATION_COMMAND  digitalCalibrationParam;
00745     /*!< This is used to supply an independently established environmental variable
00746      *   that must be used during calibration of a [digital] sensor which a)
00747      *   supports calibration and b) expects an environmental parameter.
00748      *   An example is a CO2 sensor, which may require the CO2 concentration level
00749      *   when performing a calibration
00750      */
00751     ADI_SENSE_1000_DIGITAL_SENSOR_COMMS  configureComms;
00752     /*!< Optional configuration to setup a user communication config.
00753      *   A default configuration  will be used if this is not specified.
00754      *   Applicable only to specific SPI sensor types.
00755      */
00756 } ADI_SENSE_1000_SPI_CHANNEL_CONFIG ;
00757 
00758 /*! ADSNS1000 UART digital channel configuration details
00759  *
00760  *  @note applicable only to UART digital sensor channels
00761  */
00762 typedef struct {
00763     ADI_SENSE_1000_UART_SENSOR_TYPE         sensor;
00764     /*!< Sensor type selection */
00765     ADI_SENSE_1000_DIGITAL_CALIBRATION_COMMAND  digitalCalibrationParam;
00766     /*!< This is used to supply an independently established environmental variable
00767      *   that must be used during calibration of a [digital] sensor which a)
00768      *   supports calibration and b) expects an environmental parameter.
00769      *   An example is a CO2 sensor, which may require the CO2 concentration level
00770      *   when performing a calibration
00771      */
00772     ADI_SENSE_1000_DIGITAL_SENSOR_COMMS  configureComms;
00773     /*!< Optional configuration to setup a user communication config.
00774      *   A default configuration  will be used if this is not specified.
00775      *   Applicable only to specific UART sensor types.
00776      */
00777 } ADI_SENSE_1000_UART_CHANNEL_CONFIG ;
00778 
00779 /*! ADSNS1000 Measurement Channel configuration details */
00780 typedef struct {
00781     bool_t                               enableChannel;
00782     /*!< Option to enable this channel.  If set to false, all other fields
00783      *   are ignored and this channel will be omitted from measurement cycles
00784      */
00785     bool_t                               enableFFT;
00786     /*!< Option to include this channel in FFT mode measurements */
00787     bool_t                               disablePublishing;
00788     /*!< Option to disable publishing of data samples from this channel.  The
00789      *   channel may still be included in measurement cycles, but data samples
00790      *   obtained from this channel will not be published.  This is typically
00791      *   used for channels which are required only as a compensation reference
00792      *   for another channel (e.g. Cold-Junction Compensation channels).
00793      */
00794     ADI_SENSE_1000_CHANNEL_ID             compensationChannel;
00795     /*!< Optional compensation channel.  Set to ADI_SENSE_1000_CHANNEL_ID_NONE if not
00796      *   required.  Typically used for thermocouple sensors that require a
00797      *   separate measurement of the "cold-junction" temperature, which can be
00798      *   be provided by an RTD temperature sensor connected on a separate
00799      *   "compensation channel" */
00800     bool_t                               enableUnityLut;
00801     /*!< Option to choose the LUT for calculations, this implies that the
00802      * fundamental measurement for the sensor (typically mV or Ohms)
00803      * would be returned as the measurement result.
00804      */
00805     ADI_SENSE_1000_MEASUREMENT_UNIT       measurementUnit;
00806     /*!< Optional measurement unit selection for conversion results.  Applicable
00807      *   only for certain sensor types.  Set to
00808      *   ADI_SENSE_1000_MEASUREMENT_UNIT_DEFAULT if not applicable.
00809      */
00810     float32_t                            lowThreshold;
00811     /*!< Optional minimum threshold value for each processed sample, to be
00812      *   checked prior to publishing.  A channel ALERT condition is raised
00813      *   if the processed value is lower than this threshold.  Set to NaN
00814      *   if not required.
00815      */
00816     float32_t                            highThreshold;
00817     /*!< Optional maximum threshold value for each processed sample, to be
00818      *   checked prior to publishing.  A channel ALERT condition is raised
00819      *   if the processed value is higher than this threshold.  Set to NaN
00820      *   if not required.
00821      */
00822     float32_t                            offsetAdjustment;
00823     /*!< Optional offset adjustment value applied to each processed sample.
00824      *   Set to NaN or 0.0 if not required.
00825      */
00826     float32_t                            gainAdjustment;
00827     /*!< Optional gain adjustment value applied to each processed sample.
00828      *   Set to NaN or 1.0 if not required.
00829      */
00830     float32_t                            sensorParameter;
00831     /*!< Optional sensor parameter adjustment.
00832      *   Set to NaN or 0 if not required.
00833      */
00834     uint32_t                             measurementsPerCycle;
00835     /*!< The number of measurements to obtain from this channel within each
00836      *   cycle.  Each enabled channel is measured in turn, until the number of
00837      *   measurements requested for the channel has been reached.  A different
00838      *   number of measurements-per-cycle may be specified for each channel.
00839      */
00840     uint32_t                             cycleSkipCount;
00841     /*!< Optional number of cycles to skip, such that this channel is included
00842      *   in the sequence in only one of every (cycleSkipCount + 1) cycles that
00843      *   occur.  If set to 0 (default), this channel is included in every cycle;
00844      *   if set to 1, this channel is included in every 2nd cycle; if set to 2,
00845      *   this channel is included in every 3rd cycle, and so on.
00846      */
00847     uint32_t                             extraSettlingTime;
00848     /*!< A minimum settling time is applied internally for each channel, based
00849      *   on the sensor type.  However, additional settling time (microseconds)
00850      *   can optionally be specified.  Set to 0 if not required.
00851      */
00852     ADI_SENSE_1000_CHANNEL_PRIORITY       priority;
00853     /*!< By default, channels are arranged in the measurement sequence based on
00854      *   ascending order of channel ID.  However, a priority-level may be
00855      *   specified per channel to force a different ordering of the channels,
00856      *   with higher-priority channels appearing before lower-priority channels.
00857      *   Channels with equal priority are ordered by ascending order of channel
00858      *   ID.  Lower numbers indicate higher priority, with 0 being the highest.
00859      *   Set to 0 if not required.
00860      */
00861     union {
00862         ADI_SENSE_1000_ADC_CHANNEL_CONFIG  adcChannelConfig;
00863         /*!< ADC channel configuration - applicable only to ADC channels */
00864         ADI_SENSE_1000_I2C_CHANNEL_CONFIG  i2cChannelConfig;
00865         /*!< I2C channel configuration - applicable only to I2C channels */
00866         ADI_SENSE_1000_SPI_CHANNEL_CONFIG  spiChannelConfig;
00867         /*!< SPI channel configuration - applicable only to SPI channels */
00868         ADI_SENSE_1000_UART_CHANNEL_CONFIG  uartChannelConfig;
00869         /*!< UART channel configuration - applicable only to UART channels */
00870     };
00871     /*!< Only one of adcChannelConfig, i2cChannelConfig, spiChannelConfig or
00872      *   uartChannelConfig is required, depending on the channel designation
00873      *   (analog, I2C, SPI or UART)
00874      */
00875 } ADI_SENSE_1000_CHANNEL_CONFIG ;
00876 
00877 /*! ADSNS1000 Diagnostics configuration details */
00878 typedef struct {
00879     bool_t                                 disableGlobalDiag;
00880     /*!< Option to disable the following diagnostic checks on the ADC:
00881      *   - Reference Detection errors
00882      *   - Input under-/over-voltage errors
00883      *   - Calibration, Conversion and Saturation errors
00884      */
00885     bool_t                                 disableMeasurementDiag;
00886     /*!< Option to disable additional checks per measurement channel:
00887      *   - High/low threshold limit violation
00888      */
00889     ADI_SENSE_1000_OPEN_SENSOR_DIAGNOSTICS  osdFrequency;
00890     /*!< Option to enable Open-Circuit Detection at a selected cycle interval */
00891 } ADI_SENSE_1000_DIAGNOSTICS_CONFIG ;
00892 
00893 /*! ADSNS1000 FFT Measurement Mode configuration options */
00894 typedef struct {
00895     ADI_SENSE_1000_FFT_MODE                mode;
00896     /*!< FFT sequence mode */
00897     ADI_SENSE_1000_FFT_SIZE                size;
00898     /*!< FFT size selection */
00899     ADI_SENSE_1000_FFT_WINDOW              window;
00900     /*!< FFT window type selection */
00901     ADI_SENSE_1000_FFT_OUTPUT              output;
00902     /*!< FFT output type selection */
00903 } ADI_SENSE_1000_FFT_CONFIG ;
00904 
00905 /*! ADSNS1000 Device configuration details */
00906 typedef struct {
00907     ADI_SENSE_1000_POWER_CONFIG            power;
00908     /*!< Power configuration details */
00909     ADI_SENSE_1000_MEASUREMENT_CONFIG      measurement;
00910     /*!< Measurement configuration details */
00911     ADI_SENSE_1000_DIAGNOSTICS_CONFIG      diagnostics;
00912     /*!< Diagnostics configuration details */
00913     ADI_SENSE_1000_FFT_CONFIG              fft;
00914     /*!< FFT configuration details */
00915     ADI_SENSE_1000_CHANNEL_CONFIG          channels[ADI_SENSE_1000_MAX_CHANNELS ];
00916     /*!< Channel-specific configuration details */
00917 } ADI_SENSE_1000_CONFIG ;
00918 
00919 #ifdef __cplusplus
00920 }
00921 #endif
00922 
00923 /*!
00924  * @}
00925  */
00926 
00927 #endif /* __ADI_SENSE_1000_CONFIG_H__ */