Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: inc/admw1001/admw1001_host_comms.h
- Revision:
- 51:f4ee8b27e600
- Parent:
- 50:d84305e5e1c0
diff -r d84305e5e1c0 -r f4ee8b27e600 inc/admw1001/admw1001_host_comms.h --- a/inc/admw1001/admw1001_host_comms.h Mon Feb 17 11:23:39 2020 +0000 +++ b/inc/admw1001/admw1001_host_comms.h Fri Mar 06 07:00:50 2020 +0000 @@ -80,18 +80,21 @@ */ #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_t; +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; #endif /* __ADMW1001_HOST_COMMS_H__ */