Vybhav Kadaba / Mbed OS EV-PRO-MW1001_jan7
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers admw1001_config.h Source File

admw1001_config.h

Go to the documentation of this file.
00001 /*
00002 Copyright 2019 (c) Analog Devices, Inc.
00003 
00004 All rights reserved.
00005 
00006 Redistribution and use in source and binary forms, with or without
00007 modification, are permitted provided that the following conditions are met:
00008   - Redistributions of source code must retain the above copyright
00009     notice, this list of conditions and the following disclaimer.
00010   - Redistributions in binary form must reproduce the above copyright
00011     notice, this list of conditions and the following disclaimer in
00012     the documentation and/or other materials provided with the
00013     distribution.
00014   - Neither the name of Analog Devices, Inc. nor the names of its
00015     contributors may be used to endorse or promote products derived
00016     from this software without specific prior written permission.
00017   - The use of this software may or may not infringe the patent rights
00018     of one or more patent holders. This license does not release you
00019     from the requirement that you obtain separate licenses from these
00020     patent holders to use this software.
00021   - Use of the software either in source or binary form, must be run
00022     on or directly connected to an Analog Devices Inc. component.
00023 
00024 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
00025 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
00026 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00027 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
00028 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00029 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
00030 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00031 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00032 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00033 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00034  */
00035 
00036 /*!
00037  ******************************************************************************
00038  * @file:   admw1001_config.h
00039  * @brief:  Configuration type definitions for ADMW1001.
00040  *-----------------------------------------------------------------------------
00041  */
00042 
00043 #ifndef __ADMW1001_CONFIG_H__
00044 #define __ADMW1001_CONFIG_H__
00045 
00046 #include "admw_platform.h"
00047 #include "admw1001_sensor_types.h"
00048 
00049 /*! @addtogroup ADMW1001_Api
00050  *  @{
00051  */
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00057 /*! Maximum length allowed for a digital sensor command */
00058 #define ADMW1001_SENSOR_COMMAND_MAX_LENGTH 7
00059 
00060 /*! ADMW1001 channel priority options */
00061 typedef enum
00062 {
00063     ADMW1001_CHANNEL_PRIORITY_0 = 0,
00064     ADMW1001_CHANNEL_PRIORITY_1,
00065     ADMW1001_CHANNEL_PRIORITY_2,
00066     ADMW1001_CHANNEL_PRIORITY_3,
00067     ADMW1001_CHANNEL_PRIORITY_4,
00068     ADMW1001_CHANNEL_PRIORITY_5,
00069     ADMW1001_CHANNEL_PRIORITY_6,
00070     ADMW1001_CHANNEL_PRIORITY_7,
00071     ADMW1001_CHANNEL_PRIORITY_8,
00072     ADMW1001_CHANNEL_PRIORITY_9,
00073     ADMW1001_CHANNEL_PRIORITY_10,
00074     ADMW1001_CHANNEL_PRIORITY_11,
00075     ADMW1001_CHANNEL_PRIORITY_12,
00076 
00077     ADMW1001_CHANNEL_PRIORITY_HIGHEST = ADMW1001_CHANNEL_PRIORITY_0,
00078     ADMW1001_CHANNEL_PRIORITY_LOWEST  = ADMW1001_CHANNEL_PRIORITY_12,
00079 
00080 }   ADMW1001_CHANNEL_PRIORITY ;
00081 
00082 /*! ADMW1001 operating mode options */
00083 typedef enum
00084 {
00085     ADMW1001_OPERATING_MODE_SINGLECYCLE  = 0,
00086     /*!< Executes a single measurement cycle and stops */
00087     ADMW1001_OPERATING_MODE_CONTINUOUS ,
00088     /*!< Continuously executes measurement cycles */
00089     ADMW1001_OPERATING_MODE_MULTICYCLE ,
00090     /*!< Executes a burst of measurement cycles, repeated at defined intervals */
00091 
00092 }   ADMW1001_OPERATING_MODE ;
00093 
00094 /*! ADMW1001 data ready mode options */
00095 typedef enum
00096 {
00097     ADMW1001_DATAREADY_PER_CONVERSION  = 0,
00098     /*!< The DATAREADY signal is asserted after completion of each conversion
00099      *   - a single data sample only from the latest completed conversion is
00100      *     stored in this mode
00101      */
00102     ADMW1001_DATAREADY_PER_CYCLE ,
00103     /*!< The DATAREADY signal is asserted after completion of each measurement
00104      *   cycle
00105      *   - data samples only from the lastest completed measurement cycle are
00106      *     stored in this mode
00107      */
00108     ADMW1001_DATAREADY_PER_FIFO_FILL ,
00109     /*!< The DATAREADY signal is asserted after each fill of the data FIFO
00110      *   - applicable only when @ref ADMW1001_OPERATING_MODE_CONTINUOUS or
00111      *     @ref ADMW1001_OPERATING_MODE_MULTICYCLE is also selected
00112      */
00113 
00114 }   ADMW1001_DATAREADY_MODE ;
00115 
00116 /*! ADMW1001 power mode options */
00117 typedef enum
00118 {
00119     ADMW1001_POWER_MODE_HIBERNATION  = 0,
00120     /*!< module has entede hibernation mode. All analog circuitry is disabled. All peripherals disabled apart from the Wake-up pin functionality. */
00121     ADMW1001_POWER_MODE_ACTIVE ,
00122     /*!< Part is fully powered up and either cycling through a sequence or awaiting a configuration */
00123 
00124 }   ADMW1001_POWER_MODE ;
00125 
00126 /*! ADMW1001 measurement analog filter settling options */
00127 typedef enum
00128 {
00129     ADMW1001_FILTER_SETTLING_ALWAYS  = 0,
00130     /*!< Allow full settling time to elapse between every measurement from an analog sensor */
00131     ADMW1001_FILTER_SETTLING_FAST ,
00132     /*!< Skip settling time between consecutive measurements from an analog sensor */
00133 
00134 }   ADMW1001_FILTER_SETTLING ;
00135 
00136 /*! ADMW1001 measurement unit options
00137  *
00138  *  Optionally select a measurement unit for final conversion results.
00139  *  Currently applicable only to specific temperature sensor types.
00140  */
00141 typedef enum
00142 {
00143     ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED  = 0,
00144     /*!< No measurement unit specified */
00145     ADMW1001_MEASUREMENT_UNIT_CELSIUS ,
00146     /*!< Celsius temperature unit - applicable to temperature sensors only */
00147     ADMW1001_MEASUREMENT_UNIT_FAHRENHEIT ,
00148     /*!< Fahrenheit temperature unit - applicable to temperature sensors only */
00149 
00150 }   ADMW1001_MEASUREMENT_UNIT ;
00151 
00152 typedef enum
00153 {
00154     ADMW1001_BUFFER_BYPASSS_DISABLED  = 0,
00155     /*!< Buffer Bypass Disabled */
00156     ADMW1001_BUFFER_BYPASSS_ENABLED ,
00157     /*!< Buffer Bypass Enabled */
00158 
00159 }   ADMW1001_BUFFER_BYPASSS ;
00160 
00161 /*! ADMW1001 analog input signal amplification gain options
00162  *
00163  *  @note applicable only to ADC analog sensor channels
00164  */
00165 typedef enum
00166 {
00167     ADMW1001_ADC_RTD_CURVE_EUROPEAN  = 0,
00168     /*!< EUROPEAN RTD curve used. */
00169     ADMW1001_ADC_RTD_CURVE_AMERICAN ,
00170     /*!< AMERICAN RTD curve used. */
00171     ADMW1001_ADC_RTD_CURVE_JAPANESE ,
00172     /*!< JAPANESE RTD curve used. */
00173     ADMW1001_ADC_RTD_CURVE_ITS90 ,
00174     /*!< ITS90 RTD curve used. */
00175 
00176 }   ADMW1001_ADC_RTD_CURVE ;
00177 /*! ADMW1001 analog input signal amplification gain options
00178  *
00179  *  @note applicable only to ADC analog sensor channels
00180  */
00181 typedef enum
00182 {
00183     ADMW1001_ADC_GAIN_1X  = 0,
00184     /*!< no amplification gain */
00185     ADMW1001_ADC_GAIN_2X ,
00186     /*!< x2 amplification gain */
00187     ADMW1001_ADC_GAIN_4X ,
00188     /*!< x4 amplification gain */
00189     ADMW1001_ADC_GAIN_8X ,
00190     /*!< x8 amplification gain */
00191     ADMW1001_ADC_GAIN_16X ,
00192     /*!< x16 amplification gain */
00193     ADMW1001_ADC_GAIN_32X ,
00194     /*!< x32 amplification gain */
00195     ADMW1001_ADC_GAIN_64X ,
00196     /*!< x64 amplification gain */
00197     ADMW1001_ADC_GAIN_128X ,
00198     /*!< x128 amplification gain */
00199 
00200 }   ADMW1001_ADC_GAIN ;
00201 
00202 /*! ADMW1001 analog sensor excitation state options
00203  *
00204  *  @note applicable only to ADC analog sensor channels, and
00205  *        specific sensor types
00206  */
00207 typedef enum
00208 {
00209     ADMW1001_ADC_EXC_STATE_CYCLE_POWER  = 0,
00210     /*!< Excitation for measurement is active only during measurement */
00211     ADMW1001_ADC_EXC_STATE_ALWAYS_ON ,
00212     /*!< Excitation for measurement is always on */
00213 
00214 }   ADMW1001_ADC_EXC_STATE ;
00215 
00216 /*! ADMW1001 analog sensor excitation current output level options
00217  *
00218  *  @note applicable only to ADC analog sensor channels, and
00219  *        specific sensor types
00220  */
00221 typedef enum
00222 {
00223     ADMW1001_ADC_NO_EXTERNAL_EXC_CURRENT  = -1,
00224     /*!< NO External excitation is provided */
00225     ADMW1001_ADC_EXC_CURRENT_EXTERNAL  = 0,
00226     /*!< External excitation is provided */
00227     ADMW1001_ADC_EXC_CURRENT_50uA ,
00228     /*!< 50uA excitation current enabled */
00229     ADMW1001_ADC_EXC_CURRENT_100uA ,
00230     /*!< 100uA excitation current  */
00231     ADMW1001_ADC_EXC_CURRENT_250uA ,
00232     /*!< 250uA excitation current enabled */
00233     ADMW1001_ADC_EXC_CURRENT_500uA ,
00234     /*!< 500uA excitation current enabled */
00235     ADMW1001_ADC_EXC_CURRENT_1000uA ,
00236     /*!< 1mA excitation current enabled */
00237 
00238 }   ADMW1001_ADC_EXC_CURRENT ;
00239 
00240 /*! ADMW1001 analog sensor excitation current ratios used for diode sensor
00241  *
00242  *  @note applicable only to a diode sensor
00243  */
00244 typedef enum
00245 {
00246     ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_10UA_100UA = 0,
00247     /**< 2 Current measurement 10uA 100uA        */
00248     ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_20UA_160UA,
00249     /**< 2 Current measurement 20uA 160uA        */
00250     ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_50UA_300UA,
00251     /**< 2 Current measurement 50uA 300uA        */
00252     ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_100UA_600UA,
00253     /**< 2 Current measurement 100uA 600uA       */
00254     ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_10UA_50UA_100UA,
00255     /**< 3 current measuremetn 10uA 50uA 100uA   */
00256     ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_20UA_100UA_160UA,
00257     /**< 3 current measuremetn 20uA 100uA 160uA  */
00258     ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_50UA_150UA_300UA,
00259     /**< 3 current measuremetn 50uA 150uA 300uA  */
00260     ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_100UA_300UA_600UA,
00261     /**< 3 current measuremetn 100uA 300uA 600uA */
00262 
00263 }   ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO ;
00264 
00265 /*! ADMW1001 analog reference selection options
00266  *
00267  *  @note applicable only to ADC analog sensor channels, and
00268  *        specific sensor types
00269  */
00270 typedef enum
00271 {
00272     ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL  = 0,
00273     /*!< Internal VRef - 1.2V */
00274     ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_1 ,
00275     /*!< External reference voltage #1 */
00276     ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_2 ,
00277     /*!< External reference voltage #2 */
00278     ADMW1001_ADC_REFERENCE_VOLTAGE_AVDD ,
00279     /*!< Analag Supply Voltage AVDD reference (typically 3.3V) is selected */
00280 
00281 }   ADMW1001_ADC_REFERENCE_TYPE ;
00282 
00283 /*! ADMW1001 ADC Reference configuration
00284  *
00285  *  @note applicable only to ADC analog sensor channels
00286  */
00287 typedef enum
00288 {
00289     ADMW1001_ADC_GND_SW_OPEN  = 0,
00290     /*!< Ground switch not enabled for measurement. */
00291     ADMW1001_ADC_GND_SW_CLOSED ,
00292     /*!< Ground switch enabled for measurement. */
00293 
00294 }   ADMW1001_ADC_GND_SW ;
00295 
00296 /*! ADMW1001 analog filter chop mode
00297  *
00298  *  @note applicable only to ADC analog sensor channels
00299  */
00300 typedef enum
00301 {
00302     ADMW1001_CHOP_MD_NONE  = 0,
00303     /*!< No chop performed. */
00304     ADMW1001_CHOP_MD_HW ,
00305     /*!< Hardware only chop performed. */
00306     ADMW1001_CHOP_MD_SW ,
00307     /*!< Software only chop performed. */
00308     ADMW1001_CHOP_MD_HWSW ,
00309     /*!< Hardware and software chop performed. */
00310 
00311 }   ADMW1001_CHOP_MD ;
00312 
00313 /*! ADMW1001 analog filter selection options
00314  *
00315  *  @note applicable only to ADC analog sensor channels
00316  */
00317 typedef enum
00318 {
00319     ADMW1001_ADC_FILTER_SINC4  = 0,
00320     /*!< SINC4 - 4th order sinc response filter */
00321     ADMW1001_ADC_FILTER_SINC3 ,
00322     /*!< SINC3 - 3rd order sinc response filter */
00323 
00324 }   ADMW1001_ADC_FILTER_TYPE ;
00325 
00326 /*! ADMW1001 Sinc Filter range (SF)
00327  *
00328  *  @note applicable only to ADC analog sensor channels
00329  *  @note SF must be set in conjunction with chop mode
00330  *  and sinc filter type to achieve the desired sampling rate.
00331  */
00332 typedef enum
00333 {
00334     ADMW1001_SF_976HZ   = 0,
00335     /*!< SF setting for 976Hz sample rate. */
00336     ADMW1001_SF_488HZ   = 1,
00337     /*!< SF setting for 488Hz sample rate. */
00338     ADMW1001_SF_244HZ   = 3,
00339     /*!< SF setting for 244Hz sample rate. */
00340     ADMW1001_SF_122HZ   = 7,
00341     /*!< SF setting for 122Hz sample rate. */
00342     ADMW1001_SF_61HZ    = 31,
00343     /*!< SF setting for 61Hz sample rate. */
00344     ADMW1001_SF_30P5HZ  = 51,
00345     /*!< SF setting for 61Hz sample rate. */
00346     ADMW1001_SF_10HZ    = 124,
00347     /*!< SF setting for 10Hz sample rate. */
00348     ADMW1001_SF_8P24HZ  = 125,
00349     /*!< SF setting for 8.24Hz sample rate. */
00350     ADMW1001_SF_5HZ     = 127,
00351     /*!< SF setting for 5Hz sample rate. */
00352 
00353 }   ADMW1001_SINC_FILTER_RANGE ;
00354 
00355 /*! ADMW1001 I2C clock speed options
00356  *
00357  *  @note applicable only for I2C sensors
00358  */
00359 typedef enum
00360 {
00361     ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K  = 0,
00362     /*!< 100kHz I2C clock speed */
00363     ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K ,
00364     /*!< 400kHz I2C clock speed */
00365 
00366 }   ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED ;
00367 
00368 /*! ADMW1001 SPI mode options
00369  *
00370  *  @note applicable only for SPI sensors
00371  */
00372 typedef enum
00373 {
00374     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_0  = 0,
00375     /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 0 */
00376     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_1 ,
00377     /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 1 */
00378     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_2 ,
00379     /*!< SPI mode 0 Clock Polarity = 1 Clock Phase = 0 */
00380     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_3 ,
00381     /*!< SPI mode 0 Clock Polarity = 1 Clock Phase = 1 */
00382 
00383 }   ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE ;
00384 
00385 /*! ADMW1001 SPI clock speed options
00386  *
00387  *  @note applicable only for SPI sensors
00388  */
00389 typedef enum
00390 {
00391     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_8MHZ  = 0,
00392     /*!< SPI Clock Speed configured to 8MHz */
00393     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_4MHZ ,
00394     /*!< SPI Clock Speed configured to 4MHz */
00395     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_2MHZ ,
00396     /*!< SPI Clock Speed configured to 2MHz */
00397     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1MHZ ,
00398     /*!< SPI Clock Speed configured to 1MHz */
00399     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_500KHZ ,
00400     /*!< SPI Clock Speed configured to 500kHz */
00401     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_250KHZ ,
00402     /*!< SPI Clock Speed configured to 250kHz */
00403     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_125KHZ ,
00404     /*!< SPI Clock Speed configured to 125kHz */
00405     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_62P5KHZ ,
00406     /*!< SPI Clock Speed configured to 62.5kHz */
00407     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_31P3KHZ ,
00408     /*!< SPI Clock Speed configured to 31.3kHz */
00409     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_15P6KHZ ,
00410     /*!< SPI Clock Speed configured to 15.6kHz */
00411     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_7P8KHZ ,
00412     /*!< SPI Clock Speed configured to 7.8kHz */
00413     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_3P9KHZ ,
00414     /*!< SPI Clock Speed configured to 3.9kHz */
00415     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_1P9KHZ ,
00416     /*!< SPI Clock Speed configured to 1.9kHz */
00417     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_977HZ ,
00418     /*!< SPI Clock Speed configured to 977Hz */
00419     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_488HZ ,
00420     /*!< SPI Clock Speed configured to 488Hz */
00421     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_244HZ ,
00422     /*!< SPI Clock Speed configured to 244Hz */
00423 
00424 }   ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK ;
00425 
00426 /*! ADMW1001 Power Configuration options */
00427 typedef struct
00428 {
00429     ADMW1001_POWER_MODE         powerMode;
00430     /*!< Power mode selection */
00431 
00432 }   ADMW1001_POWER_CONFIG ;
00433 
00434 /*! ADMW1001 Multi-Cycle Configuration options
00435  *
00436  * @note required only when ADMW1001_OPERATING_MODE_MULTICYCLE is selected
00437  *       as the operatingMode (@ref ADMW1001_MEASUREMENT_CONFIG)
00438  */
00439 typedef struct
00440 {
00441     uint32_t    cyclesPerBurst;
00442     /*!< Number of cycles to complete for a single burst */
00443     uint32_t    burstInterval;
00444     /*!< Interval, in seconds, between each successive burst of cycles */
00445 
00446 }   ADMW1001_MULTICYCLE_CONFIG ;
00447 
00448 /*! ADMW1001 Measurement Configuration options */
00449 typedef struct
00450 {
00451     ADMW1001_OPERATING_MODE     operatingMode;
00452     /*!< Operating mode - specifies how measurement cycles are scheduled */
00453     ADMW1001_DATAREADY_MODE     dataReadyMode;
00454     /*!< Data read mode - specifies how output samples are stored for reading */
00455     ADMW1001_MULTICYCLE_CONFIG  multiCycleConfig;
00456     /*!< Multi-Cycle configuration - specifies how bursts of measurement cycles
00457      *   are scheduled.  Applicable only when operatingMode is
00458      *   ADMW1001_OPERATING_MODE_MULTICYCLE
00459      */
00460     ADMW1001_FILTER_SETTLING    filterSettling;
00461     /*!< Analog filter settling - specifies the policy for settling time
00462      *   between consecutive measurements from an analog channel in a multi-
00463      *   channel configuration.  Note that, in single analog channel
00464      *   configurations, settling time is always skipped between consecutive
00465      *   measurements in a measurement cycle.
00466      */
00467     uint8_t                      excitationState;
00468     /*!< Excitation current state */
00469     uint8_t                         groundSwitch;
00470     /*!< Option to open or close sensor ground switch */
00471     uint8_t                     reserved0;
00472     /*!< Reserved for future use and ensure word alignment.
00473      */
00474     uint32_t                    cycleInterval;
00475     /*!< Cycle interval - specifies the time interval between the start of each
00476      *   successive measurement cycle.  Applicable only when operatingMode is
00477      *   not ADMW1001_OPERATING_MODE_SINGLECYCLE
00478      */
00479     bool                        vBiasEnable;
00480     /*!< Enable voltage Bias output of ADC
00481      */
00482     float32_t                   externalRef1Value;
00483     /*!< Voltage value connected to external reference input #1.
00484      *   Applicable only if the selected reference type is
00485      *   voltage.
00486      *   (see @ref ADMW1001_ADC_REFERENCE_TYPE)
00487      */
00488     float32_t                   RSenseValue;
00489     /*!< Sense resistor value in Ohms. */
00490     float32_t                   externalRefVoltage;
00491     /*!< External Reference Voltage.
00492      */
00493     float32_t                   AVDDVoltage;
00494     /*!< AVDD Voltage.
00495      */
00496     uint32_t                    reserved1[1];
00497     /*!< Reserved for future use and ensure word alignment.
00498      */
00499 
00500 }   ADMW1001_MEASUREMENT_CONFIG ;
00501 
00502 /*! ADMW1001 ADC Excitation Current output configuration
00503  *
00504  *  @note applicable only to ADC analog sensor channels, and
00505  *        specific sensor types
00506  */
00507 typedef struct
00508 {
00509     ADMW1001_ADC_EXC_CURRENT               outputLevel;
00510     /*!< Excitation current output level */
00511     ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO   diodeRatio;
00512     /*!< Excitation current output diode ratio */
00513     float32_t                             idealityRatio;
00514 
00515 }   ADMW1001_ADC_EXC_CURRENT_CONFIG ;
00516 
00517 /*! ADMW1001 ADC Filter configuration
00518  *
00519  *  @note applicable only to ADC analog sensor channels
00520  */
00521 typedef struct
00522 {
00523     ADMW1001_ADC_FILTER_TYPE     type;
00524     /*!< Filter type selection */
00525     ADMW1001_SINC_FILTER_RANGE   sf;
00526     /*!< SF value used along with filter type and chop mode to determine speed */
00527     ADMW1001_CHOP_MD             chopMode;
00528     /*!< Enable filter chop */
00529     bool                        notch1p2;
00530     /*!< Enable Notch 2 Filter Mode */
00531 
00532 }   ADMW1001_ADC_FILTER_CONFIG ;
00533 
00534 /*! ADMW1001 ADC analog channel configuration details
00535  *
00536  *  @note applicable only to ADC analog sensor channels
00537  */
00538 typedef struct
00539 {
00540     ADMW1001_ADC_SENSOR_TYPE         sensor;
00541     /*!< Sensor type selection */
00542     ADMW1001_ADC_RTD_CURVE           rtdCurve;
00543     /*!< Rtd curve selection */
00544     ADMW1001_ADC_GAIN                gain;
00545     /*!< ADC Gain selection */
00546     ADMW1001_ADC_EXC_CURRENT_CONFIG  current;
00547     /*!< ADC Excitation Current configuration */
00548     ADMW1001_ADC_FILTER_CONFIG       filter;
00549     /*!< ADC Filter configuration */
00550     ADMW1001_ADC_REFERENCE_TYPE      reference;
00551     /*!< ADC Reference configuration */
00552     uint8_t                         bufferBypass;
00553      /*!< Buffer Bypass configuration */
00554     uint8_t                         reserved0[2];
00555     /*!< Reserved for future use and ensure word alignment. */
00556     uint32_t                        reserved1[6];
00557     /*!< Reserved for future use and ensure word alignment. */
00558 
00559 }   ADMW1001_ADC_CHANNEL_CONFIG ;
00560 
00561 /*! ADMW1001 look-up table selection
00562  *  Select table used to linearise the measurement.
00563  */
00564 typedef enum
00565 {
00566     ADMW1001_LUT_DEFAULT   = 0,
00567     /*!< Default LUT */
00568     ADMW1001_LUT_CUSTOM    = 1,
00569     /*!< User defined custom LUT */
00570     ADMW1001_LUT_RESERVED  = 2,
00571     /*!< Reserved for future use */
00572 
00573 }   ADMW1001_LUT_SELECT ;
00574 
00575 /*! ADMW1001 digital sensor data encoding
00576  *
00577  *  @note applicable only to SPI and I2C digital sensor channels
00578  */
00579 typedef enum
00580 {
00581     ADMW1001_DIGITAL_SENSOR_DATA_CODING_NONE = 0,
00582     /**< None/Invalid - data format is ignored if coding is set to this value */
00583     ADMW1001_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR,
00584     /**< Unipolar - unsigned integer values */
00585     ADMW1001_DIGITAL_SENSOR_DATA_CODING_TWOS_COMPLEMENT,
00586     /**< Twos-complement - signed integer values */
00587     ADMW1001_DIGITAL_SENSOR_DATA_CODING_OFFSET_BINARY,
00588     /**< Offset Binary - used to represent signed values with unsigned integers,
00589      *   with the mid-range value representing 0 */
00590 
00591 }   ADMW1001_DIGITAL_SENSOR_DATA_CODING ;
00592 
00593 /*! ADMW1001 digital sensor data format configuration
00594  *
00595  *  @note applicable only to SPI and I2C digital sensor channels
00596  */
00597 typedef struct
00598 {
00599     ADMW1001_DIGITAL_SENSOR_DATA_CODING  coding;
00600     /**< Data Encoding of Sensor Result */
00601     bool littleEndian;
00602     /**< Set as true if data format is little-endian, false otherwise */
00603     bool leftJustified;
00604     /**< Set as true if data is left-justified in the data frame, false otherwise */
00605     uint8_t frameLength;
00606     /**< Data frame length (number of bytes to read from the sensor) */
00607     uint8_t numDataBits;
00608     /**< Number of relevant data bits to extract from the data frame */
00609     uint8_t bitOffset;
00610     /**< Data bit offset, relative to data alignment within the data frame */
00611     uint8_t reserved[2];
00612     /*!< Reserved for future use and ensure word alignment. */
00613 
00614 }   ADMW1001_DIGITAL_SENSOR_DATA_FORMAT ;
00615 
00616 /*! ADMW1001 digital sensor command
00617  *
00618  *  @note applicable only to SPI and I2C digital sensor channels
00619  */
00620 typedef struct
00621 {
00622     uint8_t command[ADMW1001_SENSOR_COMMAND_MAX_LENGTH];
00623     /*!< Optional command bytes to send to the device */
00624     uint8_t commandLength;
00625     /*!< Number of valid command bytes.  Set to 0 if unused */
00626 
00627 }   ADMW1001_DIGITAL_SENSOR_COMMAND ;
00628 
00629 /*! ADMW1001 digital sensor calibration param
00630  *
00631  *  @note applicable only to digital sensor channels
00632  */
00633 typedef struct
00634 {
00635     uint32_t calibrationParam;
00636     /*!< Independently established environmental variable used during calibration
00637      *   of a digital sensor. Used only if the sensor supports calibration
00638      *   and expects an environmental parameter
00639      */
00640     bool enableCalibrationParam;
00641     /*!< Allow Calibration_Parameter to be used during calibration of any digital sensor */
00642     uint8_t                         reserved[3];
00643     /*!< Reserved for future use and ensure word alignment. */
00644 
00645 }   ADMW1001_DIGITAL_CALIBRATION_COMMAND ;
00646 
00647 /*! ADMW1001 digital sensor communication config
00648  *
00649  *  @note applicable only to digital sensor channels
00650  */
00651 typedef struct
00652 {
00653     bool                                            useCustomCommsConfig;
00654     /*!< Optional parameter to enable user digital communication settings */
00655     ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED    i2cClockSpeed;
00656     /*!< Optional parameter to configure specific i2c speed for i2c sensor */
00657     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE           spiMode;
00658     /*!< Optional parameter to configure specific spi mode for spi sensor */
00659     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK          spiClock;
00660     /*!< Optional parameter to configure specific spi clock for spi sensor */
00661 
00662 }   ADMW1001_DIGITAL_SENSOR_COMMS ;
00663 
00664 /*! ADMW1001 I2C digital channel configuration details
00665  *
00666  *  @note applicable only to I2C digital sensor channels
00667  */
00668 typedef struct
00669 {
00670     ADMW1001_I2C_SENSOR_TYPE                 sensor;
00671     /*!< Sensor type selection */
00672     uint8_t                                 deviceAddress;
00673     /*!< I2C device address (7-bit) */
00674     uint8_t                                 reserved;
00675     /*!< Reserved for future use and ensure word alignment. */
00676     ADMW1001_DIGITAL_SENSOR_COMMAND          configurationCommand;
00677     /*!< Optional configuration command to send to the device at start-up.
00678      *   A default configuration command will be used if this is not specified.
00679      *   Applicable only to specific I2C sensor types.
00680      */
00681     ADMW1001_DIGITAL_SENSOR_COMMAND          dataRequestCommand;
00682     /*!< Optional data request command to send to the device for each sample.
00683      *   A default data request command will be used if this is not specified.
00684      *   Applicable only to specific I2C sensor types.
00685      */
00686     ADMW1001_DIGITAL_SENSOR_DATA_FORMAT      dataFormat;
00687     /*!< Optional data format configuration to parse/extract data from the device.
00688      *   A default data format will be used if this is not specified.
00689      *   Applicable only to specific I2C sensor types
00690      */
00691     ADMW1001_DIGITAL_CALIBRATION_COMMAND     digitalCalibrationParam;
00692     /*!< This is used to supply an independently established environmental variable
00693      *   that must be used during calibration of a [digital] sensor which a)
00694      *   supports calibration and b) expects an environmental parameter.
00695      *   An example is a CO2 sensor, which may require the CO2 concentration level
00696      *   when performing a calibration
00697      */
00698     ADMW1001_DIGITAL_SENSOR_COMMS            configureComms;
00699     /*!< Optional configuration to setup a user communication config.
00700      *   A default configuration  will be used if this is not specified.
00701      *   Applicable only to specific I2C sensor types.
00702      */
00703 
00704 }   ADMW1001_I2C_CHANNEL_CONFIG ;
00705 
00706 /*! ADMW1001 SPI digital channel configuration details
00707  *
00708  *  @note applicable only to SPI digital sensor channels
00709  */
00710 typedef struct
00711 {
00712     ADMW1001_SPI_SENSOR_TYPE         sensor;
00713     /*!< Sensor type selection */
00714     uint8_t                         reserved[2];
00715     /*!< Reserved for future use and ensure word alignment. */
00716     ADMW1001_DIGITAL_SENSOR_COMMAND  configurationCommand;
00717     /*!< Optional configuration command to send to the device at start-up.
00718      *   A default configuration command will be used if this is not specified.
00719      *   Applicable only to specific SPI sensor types.
00720      */
00721     ADMW1001_DIGITAL_SENSOR_COMMAND  dataRequestCommand;
00722     /*!< Optional data request command to send to the device for each sample.
00723      *   A default data request command will be used if this is not specified.
00724      *   Applicable only to specific SPI sensor types.
00725      */
00726     ADMW1001_DIGITAL_SENSOR_DATA_FORMAT  dataFormat;
00727     /*!< Optional data format configuration to parse/extract data from the device.
00728      *   A default data format will be used if this is not specified.
00729      *   Applicable only to specific SPI sensor types
00730      */
00731     ADMW1001_DIGITAL_CALIBRATION_COMMAND  digitalCalibrationParam;
00732     /*!< This is used to supply an independently established environmental variable
00733      *   that must be used during calibration of a [digital] sensor which a)
00734      *   supports calibration and b) expects an environmental parameter.
00735      *   An example is a CO2 sensor, which may require the CO2 concentration level
00736      *   when performing a calibration
00737      */
00738     ADMW1001_DIGITAL_SENSOR_COMMS        configureComms;
00739     /*!< Optional configuration to setup a user communication config.
00740      *   A default configuration  will be used if this is not specified.
00741      *   Applicable only to specific SPI sensor types.
00742      */
00743 
00744 }   ADMW1001_SPI_CHANNEL_CONFIG ;
00745 
00746 /*! ADMW1001 Measurement Channel configuration details */
00747 typedef struct
00748 {
00749     bool                                enableChannel;
00750     /*!< Option to include this channel in normal measurement cycles */
00751     bool                                disablePublishing;
00752     /*!< Option to disable publishing of data samples from this channel.  The
00753      *   channel may still be included in measurement cycles, but data samples
00754      *   obtained from this channel will not be published.  This is typically
00755      *   used for channels which are required only as a compensation reference
00756      *   for another channel (e.g. Cold-Junction Compensation channels).
00757      */
00758     ADMW1001_CH_ID                       compensationChannel;
00759     /*!< Optional compensation channel.  Set to ADMW1001_CH_ID_NONE if not
00760      *   required.  Typically used for thermocouple sensors that require a
00761      *   separate measurement of the "cold-junction" temperature, which can be
00762      *   be provided by an RTD temperature sensor connected on a separate
00763      *   "compensation channel" */
00764     ADMW1001_LUT_SELECT                  lutSelect;
00765     /*!<Select Look Up Table LUT for calculations, this implies that the
00766      * fundamental measurement for the sensor (typically mV or Ohms)
00767      * 0 = default, 1= unity, 2 = custom
00768      */
00769     ADMW1001_MEASUREMENT_UNIT            measurementUnit;
00770     /*!< Optional measurement unit selection for conversion results.  Applicable
00771      *   only for certain sensor types.  Set to
00772      *   ADMW1001_MEASUREMENT_UNIT_DEFAULT if not applicable.
00773      */
00774     float32_t                           lowThreshold;
00775     /*!< Optional minimum threshold value for each processed sample, to be
00776      *   checked prior to publishing.  A channel ALERT condition is raised
00777      *   if the processed value is lower than this threshold.  Set to NaN
00778      *   if not required.
00779      */
00780     float32_t                           highThreshold;
00781     /*!< Optional maximum threshold value for each processed sample, to be
00782      *   checked prior to publishing.  A channel ALERT condition is raised
00783      *   if the processed value is higher than this threshold.  Set to NaN
00784      *   if not required.
00785      */
00786     float32_t                           offsetAdjustment;
00787     /*!< Optional offset adjustment value applied to each processed sample.
00788      *   Set to NaN or 0.0 if not required.
00789      */
00790     float32_t                           gainAdjustment;
00791     /*!< Optional gain adjustment value applied to each processed sample.
00792      *   Set to NaN or 1.0 if not required.
00793      */
00794     float32_t                           sensorParameter;
00795     /*!< Optional sensor parameter adjustment.
00796      *   Set to NaN or 0 if not required.
00797      */
00798     uint32_t                            measurementsPerCycle;
00799     /*!< The number of measurements to obtain from this channel within each
00800      *   cycle.  Each enabled channel is measured in turn, until the number of
00801      *   measurements requested for the channel has been reached.  A different
00802      *   number of measurements-per-cycle may be specified for each channel.
00803      */
00804     uint32_t                            cycleSkipCount;
00805     /*!< Optional number of cycles to skip, such that this channel is included
00806      *   in the sequence in only one of every (cycleSkipCount + 1) cycles that
00807      *   occur.  If set to 0 (default), this channel is included in every cycle;
00808      *   if set to 1, this channel is included in every 2nd cycle; if set to 2,
00809      *   this channel is included in every 3rd cycle, and so on.
00810      */
00811     uint32_t                            extraSettlingTime;
00812     /*!< A minimum settling time is applied internally for each channel, based
00813      *   on the sensor type.  However, additional settling time (milliseconds)
00814      *   can optionally be specified.  Set to 0 if not required.
00815      */
00816     ADMW1001_CHANNEL_PRIORITY            priority;
00817     /*!< By default, channels are arranged in the measurement sequence based on
00818      *   ascending order of channel ID.  However, a priority-level may be
00819      *   specified per channel to force a different ordering of the channels,
00820      *   with higher-priority channels appearing before lower-priority channels.
00821      *   Channels with equal priority are ordered by ascending order of channel
00822      *   ID.  Lower numbers indicate higher priority, with 0 being the highest.
00823      *   Set to 0 if not required.
00824      */
00825     union
00826     {
00827         ADMW1001_ADC_CHANNEL_CONFIG      adcChannelConfig;
00828         /*!< ADC channel configuration - applicable only to ADC channels */
00829         ADMW1001_I2C_CHANNEL_CONFIG      i2cChannelConfig;
00830         /*!< I2C channel configuration - applicable only to I2C channels */
00831         ADMW1001_SPI_CHANNEL_CONFIG      spiChannelConfig;
00832         /*!< SPI channel configuration - applicable only to SPI channels */
00833     };
00834     /*!< Only one of adcChannelConfig, i2cChannelConfig, spiChannelConfig
00835      *  is required, depending on the channel designation
00836      *   (analog, I2C, SPI)
00837      */
00838 
00839 }   ADMW1001_CHANNEL_CONFIG ;
00840 
00841 /*! ADMW1001 Diagnostics configuration details */
00842 typedef struct
00843 {
00844     bool                                disableGlobalDiag;
00845     /*!< Option to disable the following diagnostic checks on the ADC:
00846      *   - Reference Detection errors
00847      *   - Input under-/over-voltage errors
00848      *   - Calibration, Conversion and Saturation errors
00849      */
00850     bool                                disableMeasurementDiag;
00851     /*!< Option to disable additional checks per measurement channel:
00852      *   - High/low threshold limit violation
00853      */
00854 
00855     bool                                disableCriticalTempAbort;
00856     /*!< Option to disable abort of measurement cycle if the operating
00857      *   temperature of the ADMW1001 has exceeded critical limits
00858      */
00859 
00860     uint8_t    osdFrequency;
00861     /*!< Option to enable Open-Circuit Detection at a selected cycle interval */
00862 
00863 }   ADMW1001_DIAGNOSTICS_CONFIG ;
00864 
00865 typedef uint16_t ADMW1001_ADVANCED_ACCESS_KEY;
00866 
00867 /*! ADMW1001 Device configuration details */
00868 typedef struct
00869 {
00870     ADMW1001_POWER_CONFIG            power;
00871     /*!< Power configuration details */
00872     ADMW1001_MEASUREMENT_CONFIG      measurement;
00873     /*!< Measurement configuration details */
00874     ADMW1001_DIAGNOSTICS_CONFIG      diagnostics;
00875     /*!< FFT configuration details */
00876     ADMW1001_CHANNEL_CONFIG          channels[ADMW1001_MAX_CHANNELS ];
00877     /*!< Channel-specific configuration details */
00878     ADMW1001_ADVANCED_ACCESS_KEY    advancedAccessKey;
00879     /*!< Key to enable access to advanced sensor configuration options */
00880 
00881 }   ADMW1001_CONFIG ;
00882 
00883 #ifdef __cplusplus
00884 }
00885 #endif
00886 
00887 /*!
00888  * @}
00889  */
00890 
00891 #endif /* __ADMW1001_CONFIG_H__ */