Minor changes to support ADMW FWv1.17.75

Revision:
45:f5f553b8c0d5
Parent:
43:e1789b7214cf
Child:
50:d84305e5e1c0
--- a/inc/admw1001/admw1001_config.h	Thu Jan 16 06:52:27 2020 +0000
+++ b/inc/admw1001/admw1001_config.h	Mon Jan 20 10:40:06 2020 +0000
@@ -58,7 +58,8 @@
 #define ADMW1001_SENSOR_COMMAND_MAX_LENGTH 7
 
 /*! ADMW1001 channel priority options */
-typedef enum {
+typedef enum
+{
     ADMW1001_CHANNEL_PRIORITY_0 = 0,
     ADMW1001_CHANNEL_PRIORITY_1,
     ADMW1001_CHANNEL_PRIORITY_2,
@@ -79,7 +80,8 @@
 }   ADMW1001_CHANNEL_PRIORITY;
 
 /*! ADMW1001 operating mode options */
-typedef enum {
+typedef enum
+{
     ADMW1001_OPERATING_MODE_SINGLECYCLE = 0,
     /*!< Executes a single measurement cycle and stops */
     ADMW1001_OPERATING_MODE_CONTINUOUS,
@@ -90,7 +92,8 @@
 }   ADMW1001_OPERATING_MODE;
 
 /*! ADMW1001 data ready mode options */
-typedef enum {
+typedef enum
+{
     ADMW1001_DATAREADY_PER_CONVERSION = 0,
     /*!< The DATAREADY signal is asserted after completion of each conversion
      *   - a single data sample only from the latest completed conversion is
@@ -111,7 +114,8 @@
 }   ADMW1001_DATAREADY_MODE;
 
 /*! ADMW1001 power mode options */
-typedef enum {
+typedef enum
+{
     ADMW1001_POWER_MODE_HIBERNATION = 0,
     /*!< module has entede hibernation mode. All analog circuitry is disabled. All peripherals disabled apart from the Wake-up pin functionality. */
     ADMW1001_POWER_MODE_ACTIVE,
@@ -120,7 +124,8 @@
 }   ADMW1001_POWER_MODE;
 
 /*! ADMW1001 measurement analog filter settling options */
-typedef enum {
+typedef enum
+{
     ADMW1001_FILTER_SETTLING_ALWAYS = 0,
     /*!< Allow full settling time to elapse between every measurement from an analog sensor */
     ADMW1001_FILTER_SETTLING_FAST,
@@ -133,7 +138,8 @@
  *  Optionally select a measurement unit for final conversion results.
  *  Currently applicable only to specific temperature sensor types.
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED = 0,
     /*!< No measurement unit specified */
     ADMW1001_MEASUREMENT_UNIT_CELSIUS,
@@ -143,30 +149,8 @@
 
 }   ADMW1001_MEASUREMENT_UNIT;
 
-/*! ADMW1001 Open-Sensor Diagnostics frequency
- *
- *  Select the per-cycle frequency at which open-sensor diagnostic
- *  checks should be performed.  Open-sensor diagnostic checks typically require
- *  specific or time-consuming processing which cannot be executed while a
- *  measurement cycle is running.
- *
- *  @note Open-sensor diagnostic checks, when performed, will add a delay to the
- *        start of the next measurement cycle.
- */
-typedef enum {
-    ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED = 0,
-    /*!< No Open-Sensor Detection is performed */
-    ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_CYCLE,
-    /*!< No Open-Sensor Detection is performed prior to each cycle */
-    ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_100_CYCLES,
-    /*!< No Open-Sensor Detection is performed at intervals of 100 cycles */
-    ADMW1001_OPEN_SENSOR_DIAGNOSTICS_PER_1000_CYCLES,
-    /*!< No Open-Sensor Detection is performed at intervals of 1001 cycles */
-
-}   ADMW1001_OPEN_SENSOR_DIAGNOSTICS;
-
-
-typedef enum {
+typedef enum
+{
     ADMW1001_BUFFER_BYPASSS_DISABLED = 0,
     /*!< Buffer Bypass Disabled */
     ADMW1001_BUFFER_BYPASSS_ENABLED,
@@ -178,7 +162,8 @@
  *
  *  @note applicable only to ADC analog sensor channels
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_ADC_RTD_CURVE_EUROPEAN = 0,
     /*!< EUROPEAN RTD curve used. */
     ADMW1001_ADC_RTD_CURVE_AMERICAN,
@@ -193,7 +178,8 @@
  *
  *  @note applicable only to ADC analog sensor channels
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_ADC_GAIN_1X = 0,
     /*!< no amplification gain */
     ADMW1001_ADC_GAIN_2X,
@@ -218,11 +204,13 @@
  *  @note applicable only to ADC analog sensor channels, and
  *        specific sensor types
  */
-typedef enum {
-    ADMW1001_ADC_EXC_STATE_CYCLE_POWER=0,
+typedef enum
+{
+    ADMW1001_ADC_EXC_STATE_CYCLE_POWER = 0,
     /*!< Excitation for measurement is active only during measurement */
     ADMW1001_ADC_EXC_STATE_ALWAYS_ON,
     /*!< Excitation for measurement is always on */
+
 }   ADMW1001_ADC_EXC_STATE;
 
 /*! ADMW1001 analog sensor excitation current output level options
@@ -230,7 +218,8 @@
  *  @note applicable only to ADC analog sensor channels, and
  *        specific sensor types
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_ADC_NO_EXTERNAL_EXC_CURRENT = -1,
     /*!< NO External excitation is provided */
     ADMW1001_ADC_EXC_CURRENT_EXTERNAL = 0,
@@ -252,7 +241,8 @@
  *
  *  @note applicable only to a diode sensor
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_10UA_100UA = 0,
     /**< 2 Current measurement 10uA 100uA        */
     ADMW1001_ADC_EXC_CURRENT_IOUT_DIODE_20UA_160UA,
@@ -277,7 +267,8 @@
  *  @note applicable only to ADC analog sensor channels, and
  *        specific sensor types
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL = 0,
     /*!< Internal VRef - 1.2V */
     ADMW1001_ADC_REFERENCE_VOLTAGE_EXTERNAL_1,
@@ -293,7 +284,8 @@
  *
  *  @note applicable only to ADC analog sensor channels
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_ADC_GND_SW_OPEN = 0,
     /*!< Ground switch not enabled for measurement. */
     ADMW1001_ADC_GND_SW_CLOSED,
@@ -305,7 +297,8 @@
  *
  *  @note applicable only to ADC analog sensor channels
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_CHOP_MD_NONE = 0,
     /*!< No chop performed. */
     ADMW1001_CHOP_MD_HW,
@@ -321,7 +314,8 @@
  *
  *  @note applicable only to ADC analog sensor channels
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_ADC_FILTER_SINC4 = 0,
     /*!< SINC4 - 4th order sinc response filter */
     ADMW1001_ADC_FILTER_SINC3,
@@ -335,7 +329,8 @@
  *  @note SF must be set in conjunction with chop mode
  *  and sinc filter type to achieve the desired sampling rate.
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_SF_976HZ  = 0,
     /*!< SF setting for 976Hz sample rate. */
     ADMW1001_SF_488HZ  = 1,
@@ -361,7 +356,8 @@
  *
  *  @note applicable only for I2C sensors
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_100K = 0,
     /*!< 100kHz I2C clock speed */
     ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED_400K,
@@ -373,7 +369,8 @@
  *
  *  @note applicable only for SPI sensors
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_0 = 0,
     /*!< SPI mode 0 Clock Polarity = 0 Clock Phase = 0 */
     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_MODE_1,
@@ -389,7 +386,8 @@
  *
  *  @note applicable only for SPI sensors
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_8MHZ = 0,
     /*!< SPI Clock Speed configured to 8MHz */
     ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK_4MHZ,
@@ -426,7 +424,8 @@
 }   ADMW1001_DIGITAL_SENSOR_COMMS_SPI_CLOCK;
 
 /*! ADMW1001 Power Configuration options */
-typedef struct {
+typedef struct
+{
     ADMW1001_POWER_MODE        powerMode;
     /*!< Power mode selection */
 
@@ -437,7 +436,8 @@
  * @note required only when ADMW1001_OPERATING_MODE_MULTICYCLE is selected
  *       as the operatingMode (@ref ADMW1001_MEASUREMENT_CONFIG)
  */
-typedef struct {
+typedef struct
+{
     uint32_t    cyclesPerBurst;
     /*!< Number of cycles to complete for a single burst */
     uint32_t    burstInterval;
@@ -446,7 +446,8 @@
 }   ADMW1001_MULTICYCLE_CONFIG;
 
 /*! ADMW1001 Measurement Configuration options */
-typedef struct {
+typedef struct
+{
     ADMW1001_OPERATING_MODE    operatingMode;
     /*!< Operating mode - specifies how measurement cycles are scheduled */
     ADMW1001_DATAREADY_MODE    dataReadyMode;
@@ -463,10 +464,10 @@
      *   configurations, settling time is always skipped between consecutive
      *   measurements in a measurement cycle.
      */
-    ADMW1001_ADC_EXC_STATE                excitationState;
+    uint8_t                      excitationState;
     /*!< Excitation current state */
-    ADMW1001_ADC_GND_SW                         groundSwitch;
-    /*!< Option to open or close sensor ground switch */         
+    uint8_t                         groundSwitch;
+    /*!< Option to open or close sensor ground switch */
     uint8_t                     reserved0;
     /*!< Reserved for future use and ensure word alignment.
      */
@@ -489,7 +490,12 @@
     float32_t                   externalRefVoltage;
     /*!< External Reference Voltage.
      */
-    uint32_t                    reserved1[2];
+    float32_t                   AVDDVoltage;
+    /*!< AVDD Voltage.
+     */
+    uint32_t                    reserved1[1];
+    /*!< Reserved for future use and ensure word alignment.
+     */
 
 }   ADMW1001_MEASUREMENT_CONFIG;
 
@@ -498,11 +504,13 @@
  *  @note applicable only to ADC analog sensor channels, and
  *        specific sensor types
  */
-typedef struct {
+typedef struct
+{
     ADMW1001_ADC_EXC_CURRENT              outputLevel;
     /*!< Excitation current output level */
     ADMW1001_ADC_EXC_CURRENT_DIODE_RATIO  diodeRatio;
     /*!< Excitation current output diode ratio */
+    float32_t                             idealityRatio;
 
 }   ADMW1001_ADC_EXC_CURRENT_CONFIG;
 
@@ -510,7 +518,8 @@
  *
  *  @note applicable only to ADC analog sensor channels
  */
-typedef struct {
+typedef struct
+{
     ADMW1001_ADC_FILTER_TYPE    type;
     /*!< Filter type selection */
     ADMW1001_SINC_FILTER_RANGE  sf;
@@ -519,13 +528,15 @@
     /*!< Enable filter chop */
     bool                        notch1p2;
     /*!< Enable Notch 2 Filter Mode */
+
 }   ADMW1001_ADC_FILTER_CONFIG;
 
 /*! ADMW1001 ADC analog channel configuration details
  *
  *  @note applicable only to ADC analog sensor channels
  */
-typedef struct {
+typedef struct
+{
     ADMW1001_ADC_SENSOR_TYPE        sensor;
     /*!< Sensor type selection */
     ADMW1001_ADC_RTD_CURVE          rtdCurve;
@@ -537,10 +548,9 @@
     ADMW1001_ADC_FILTER_CONFIG      filter;
     /*!< ADC Filter configuration */
     ADMW1001_ADC_REFERENCE_TYPE     reference;
-    bool                        vBiasEnable;
     /*!< ADC Reference configuration */
     uint8_t                         bufferBypass;
-    /*!< Buffer Bypass configuration */
+     /*!< Buffer Bypass configuration */
     uint8_t                         reserved0[2];
     /*!< Reserved for future use and ensure word alignment. */
     uint32_t                        reserved1[6];
@@ -551,14 +561,13 @@
 /*! ADMW1001 look-up table selection
  *  Select table used to linearise the measurement.
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_LUT_DEFAULT  = 0,
     /*!< Default LUT */
-    ADMW1001_LUT_UNITY    = 1,
-    /*!< Unity LUT */
-    ADMW1001_LUT_CUSTOM   = 2,
+    ADMW1001_LUT_CUSTOM   = 1,
     /*!< User defined custom LUT */
-    ADMW1001_LUT_RESERVED = 3,
+    ADMW1001_LUT_RESERVED = 2,
     /*!< Reserved for future use */
 
 }   ADMW1001_LUT_SELECT;
@@ -567,7 +576,8 @@
  *
  *  @note applicable only to SPI and I2C digital sensor channels
  */
-typedef enum {
+typedef enum
+{
     ADMW1001_DIGITAL_SENSOR_DATA_CODING_NONE = 0,
     /**< None/Invalid - data format is ignored if coding is set to this value */
     ADMW1001_DIGITAL_SENSOR_DATA_CODING_UNIPOLAR,
@@ -584,7 +594,8 @@
  *
  *  @note applicable only to SPI and I2C digital sensor channels
  */
-typedef struct {
+typedef struct
+{
     ADMW1001_DIGITAL_SENSOR_DATA_CODING coding;
     /**< Data Encoding of Sensor Result */
     bool littleEndian;
@@ -606,7 +617,8 @@
  *
  *  @note applicable only to SPI and I2C digital sensor channels
  */
-typedef struct {
+typedef struct
+{
     uint8_t command[ADMW1001_SENSOR_COMMAND_MAX_LENGTH];
     /*!< Optional command bytes to send to the device */
     uint8_t commandLength;
@@ -618,7 +630,8 @@
  *
  *  @note applicable only to digital sensor channels
  */
-typedef struct {
+typedef struct
+{
     uint32_t calibrationParam;
     /*!< Independently established environmental variable used during calibration
      *   of a digital sensor. Used only if the sensor supports calibration
@@ -635,7 +648,8 @@
  *
  *  @note applicable only to digital sensor channels
  */
-typedef struct {
+typedef struct
+{
     bool                                            useCustomCommsConfig;
     /*!< Optional parameter to enable user digital communication settings */
     ADMW1001_DIGITAL_SENSOR_COMMS_I2C_CLOCK_SPEED   i2cClockSpeed;
@@ -651,7 +665,8 @@
  *
  *  @note applicable only to I2C digital sensor channels
  */
-typedef struct {
+typedef struct
+{
     ADMW1001_I2C_SENSOR_TYPE                sensor;
     /*!< Sensor type selection */
     uint8_t                                 deviceAddress;
@@ -692,7 +707,8 @@
  *
  *  @note applicable only to SPI digital sensor channels
  */
-typedef struct {
+typedef struct
+{
     ADMW1001_SPI_SENSOR_TYPE        sensor;
     /*!< Sensor type selection */
     uint8_t                         reserved[2];
@@ -728,7 +744,8 @@
 }   ADMW1001_SPI_CHANNEL_CONFIG;
 
 /*! ADMW1001 Measurement Channel configuration details */
-typedef struct {
+typedef struct
+{
     bool                                enableChannel;
     /*!< Option to include this channel in normal measurement cycles */
     bool                                disablePublishing;
@@ -793,7 +810,7 @@
      */
     uint32_t                            extraSettlingTime;
     /*!< A minimum settling time is applied internally for each channel, based
-     *   on the sensor type.  However, additional settling time (microseconds)
+     *   on the sensor type.  However, additional settling time (milliseconds)
      *   can optionally be specified.  Set to 0 if not required.
      */
     ADMW1001_CHANNEL_PRIORITY           priority;
@@ -805,7 +822,8 @@
      *   ID.  Lower numbers indicate higher priority, with 0 being the highest.
      *   Set to 0 if not required.
      */
-    union {
+    union
+    {
         ADMW1001_ADC_CHANNEL_CONFIG     adcChannelConfig;
         /*!< ADC channel configuration - applicable only to ADC channels */
         ADMW1001_I2C_CHANNEL_CONFIG     i2cChannelConfig;
@@ -821,7 +839,8 @@
 }   ADMW1001_CHANNEL_CONFIG;
 
 /*! ADMW1001 Diagnostics configuration details */
-typedef struct {
+typedef struct
+{
     bool                                disableGlobalDiag;
     /*!< Option to disable the following diagnostic checks on the ADC:
      *   - Reference Detection errors
@@ -838,7 +857,7 @@
      *   temperature of the ADMW1001 has exceeded critical limits
      */
 
-    ADMW1001_OPEN_SENSOR_DIAGNOSTICS    osdFrequency;
+    uint8_t    osdFrequency;
     /*!< Option to enable Open-Circuit Detection at a selected cycle interval */
 
 }   ADMW1001_DIAGNOSTICS_CONFIG;
@@ -846,7 +865,8 @@
 typedef uint16_t ADMW1001_ADVANCED_ACCESS_KEY;
 
 /*! ADMW1001 Device configuration details */
-typedef struct {
+typedef struct
+{
     ADMW1001_POWER_CONFIG           power;
     /*!< Power configuration details */
     ADMW1001_MEASUREMENT_CONFIG     measurement;