MEMS digital output motion sensor: high-performance ultra-low-power 3-axis accelerometer for industrial applications

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Revision:
2:28ad92a16a36
Parent:
1:7b1fcb1bb23d
--- a/iis2dlpc_reg.h	Mon Nov 19 14:28:06 2018 +0000
+++ b/iis2dlpc_reg.h	Wed Nov 21 15:51:50 2018 +0000
@@ -33,6 +33,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
+ ******************************************************************************
  */
  
 /* Define to prevent recursive inclusion -------------------------------------*/
@@ -60,43 +61,44 @@
 #ifndef MEMS_SHARED_TYPES
 #define MEMS_SHARED_TYPES
 
-/** @defgroup ST_MEMS_common_types
+/**
+  * @defgroup axisXbitXX_t
+  * @brief    These unions are useful to represent different sensors data type.
+  *           These unions are not need by the driver.
+  *
+  *           REMOVING the unions you are compliant with:
+  *           MISRA-C 2012 [Rule 19.2] -> " Union are not allowed "
+  *
   * @{
+  *
   */
 
-/**
-  * Float typedef definition for compliance with:
-  * MISRA-C 2012 [Dir 4.6a] -> " Basic type used without typedef "
-  *
-  */
-typedef float float32_t;
-
-typedef union
-{
+typedef union{
   int16_t i16bit[3];
   uint8_t u8bit[6];
 } axis3bit16_t;
 
-typedef union
-{
+typedef union{
   int16_t i16bit;
   uint8_t u8bit[2];
 } axis1bit16_t;
 
-typedef union
-{
+typedef union{
   int32_t i32bit[3];
   uint8_t u8bit[12];
 } axis3bit32_t;
 
-typedef union
-{
+typedef union{
   int32_t i32bit;
   uint8_t u8bit[4];
 } axis1bit32_t;
 
-typedef struct
-{
+/**
+  * @}
+  *
+  */
+
+typedef struct{
   uint8_t bit0       : 1;
   uint8_t bit1       : 1;
   uint8_t bit2       : 1;
@@ -107,10 +109,10 @@
   uint8_t bit7       : 1;
 } bitwise_t;
 
-#define PROPERTY_DISABLE                (0)
-#define PROPERTY_ENABLE                 (1)
+#define PROPERTY_DISABLE                (0U)
+#define PROPERTY_ENABLE                 (1U)
 
-#endif /* MEMS_SHARED_TYPES*/
+#endif /* MEMS_SHARED_TYPES */
 
 /**
   * @}