added wait_us(31) in admw_spi.cpp to support hibernation mode

Revision:
50:d84305e5e1c0
Parent:
48:5731f1aa2c5a
--- a/inc/admw1001/admw1001_host_comms.h	Thu Feb 06 11:04:31 2020 +0000
+++ b/inc/admw1001/admw1001_host_comms.h	Mon Feb 17 11:23:39 2020 +0000
@@ -73,28 +73,25 @@
  * The following minimum delay, in microseconds, must be inserted after each SPI
  * transfer to allow time for it to be processed by the device
  */
-#define ADMW1001_HOST_COMMS_XFER_DELAY (40)
+#define ADMW1001_HOST_COMMS_XFER_DELAY (60)
 
 /*
  * The following defines the maximum number of retries before aborting a transfer.
  */
 #define ADMW1001_HOST_COMMS_MAX_RETRIES (10)
 
+/*! ADMW1001 Sensor Result bit field structure */
+typedef struct _ADMW1001_Sensor_Result_t
+{
+    float32_t   Sensor_Result;      /**< Linearized and compensated sensor result */
+    uint32_t    Channel_ID :  4;    /**< Indicates which channel this result corresponds to */
+    uint32_t    Ch_Error   :  1;    /**< Indicates Error on channel */
+    uint32_t    Ch_Alert   :  1;    /**< Indicates Alert on channel */
+    uint32_t    Ch_Raw     :  1;    /**< Indicates if Raw sensor data field is valid */
+    uint32_t    Ch_Valid   :  1;    /**< Indicates if this Result structure is valid */
+    uint32_t    Status     : 24;    /**< Reserved for future use */
+    float32_t   Raw_Sample;         /**< Raw sensor data value */
 
-/*! ADMW1001 Sensor Result bit field structure */
-typedef struct ADMW1001_Sensor_Result_t {
-    union {
-        struct {
-            float32_t Sensor_Result;      /**< Linearized and compensated sensor result */
-            uint32_t Channel_ID    :  4;  /**< Indicates which channel this result corresponds to */
-            uint32_t Ch_Error      :  1;  /**< Indicates Error on channel */
-            uint32_t Ch_Alert      :  1;  /**< Indicates Alert on channel */
-            uint32_t Ch_Raw        :  1;  /**< Indicates if Raw sensor data field is valid */
-            uint32_t Ch_Valid      :  1;  /**< Indicates if this Result structure is valid */
-            uint32_t Raw_Sample    : 24;  /**< Raw sensor data value */
-        };
-        uint64_t VALUE64;
-   };
-} ADMW1001_Sensor_Result_t;
+}   ADMW1001_Sensor_Result_t;
 
 #endif /* __ADMW1001_HOST_COMMS_H__ */