brolan-juul commented on a change in pull request #1024: lis2dw12: Support 
sleep change event for notifications
URL: https://github.com/apache/mynewt-core/pull/1024#discussion_r181595405
 
 

 ##########
 File path: hw/drivers/sensors/lis2dw12/include/lis2dw12/lis2dw12.h
 ##########
 @@ -131,85 +130,99 @@ enum lis2dw12_fifo_mode {
     LIS2DW12_FIFO_M_BYPASS_TO_CONTINUOUS = 4,
     LIS2DW12_FIFO_M_CONTINUOUS           = 6
 };
-    
+
 enum lis2dw12_read_mode {
     LIS2DW12_READ_M_POLL = 0,
     LIS2DW12_READ_M_STREAM = 1,
 };
-    
+
 struct lis2dw12_tap_settings {
-    uint8_t en_x;
-    uint8_t en_y; 
-    uint8_t en_z;
-    
-    uint8_t en_4d;
-    enum lis2dw12_ths_6d ths_6d;
+    uint8_t en_x  : 1;
+    uint8_t en_y  : 1;
+    uint8_t en_z  : 1;
+    uint8_t en_4d : 1;
     enum lis2dw12_tap_priority tap_priority;
 
     /* ths data is 5 bits, fs = +-2g */
     int8_t tap_ths_x;
     int8_t tap_ths_y;
     int8_t tap_ths_z;
 
+    enum lis2dw12_ths_6d ths_6d;
+
     /* latency is time between taps in double tap, 0 = 16 *1/ODR, LSB = 
32*1/ODR */
     uint8_t latency;
-    /* quiet is time after tap data bust be below threshold
+    /* quiet is time after tap data is just below threshold
        0 = 2*1/ODR, LSB = 4*1/ODR */
     uint8_t quiet;
     /* shock is maximum time data can be over threshold to register as tap
        0 = 2*1/ODR, LSB = 4*1/ODR */
     uint8_t shock;
-    
+
+};
+
+/* Read mode configuration */
+struct lis2dw12_read_mode_cfg {
+    enum lis2dw12_read_mode mode;
+    uint8_t int_num:1;
 
 Review comment:
   I am a bit unclear what this is used for given that lis2dw12_cfg struct 
contains int1_pin_cfg and int2_pin_cfg.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to