Beta

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_IKS01A2 by ST

Files at this revision

API Documentation at this revision

Comitter:
cparata
Date:
Thu Dec 15 14:03:46 2016 +0000
Parent:
4:bddefe5a3b82
Child:
6:671fd10a51b7
Commit message:
Update LSM6DSL library

Changed in this revision

Components/LSM6DSLSensor/LSM6DSLSensor.cpp Show annotated file Show diff for this revision Revisions of this file
Components/LSM6DSLSensor/LSM6DSLSensor.h Show annotated file Show diff for this revision Revisions of this file
--- a/Components/LSM6DSLSensor/LSM6DSLSensor.cpp	Mon Dec 05 12:18:43 2016 +0000
+++ b/Components/LSM6DSLSensor/LSM6DSLSensor.cpp	Thu Dec 15 14:03:46 2016 +0000
@@ -856,16 +856,6 @@
 
 /**
  * @brief  Enable free fall detection
- * @note  This function sets the LSM6DSL accelerometer ODR to 416Hz and the LSM6DSL accelerometer full scale to 2g
- * @retval 0 in case of success, an error code otherwise
-*/
-int LSM6DSLSensor::Enable_Free_Fall_Detection(void)
-{
-  return Enable_Free_Fall_Detection(LSM6DSL_INT1_PIN);
-}
-
-/**
- * @brief  Enable free fall detection
  * @param pin the interrupt pin to be used
  * @note  This function sets the LSM6DSL accelerometer ODR to 416Hz and the LSM6DSL accelerometer full scale to 2g
  * @retval 0 in case of success, an error code otherwise
@@ -1132,16 +1122,6 @@
 
 /**
  * @brief Enable the tilt detection for LSM6DSL accelerometer sensor
- * @note  This function sets the LSM6DSL accelerometer ODR to 26Hz and the LSM6DSL accelerometer full scale to 2g
- * @retval 0 in case of success, an error code otherwise
- */
-int LSM6DSLSensor::Enable_Tilt_Detection(void)
-{ 
-  return Enable_Tilt_Detection(LSM6DSL_INT1_PIN);
-}
-
-/**
- * @brief Enable the tilt detection for LSM6DSL accelerometer sensor
  * @param pin the interrupt pin to be used
  * @note  This function sets the LSM6DSL accelerometer ODR to 26Hz and the LSM6DSL accelerometer full scale to 2g
  * @retval 0 in case of success, an error code otherwise
@@ -1231,16 +1211,6 @@
 
 /**
  * @brief Enable the wake up detection for LSM6DSL accelerometer sensor
- * @note  This function sets the LSM6DSL accelerometer ODR to 416Hz and the LSM6DSL accelerometer full scale to 2g
- * @retval 0 in case of success, an error code otherwise
- */
-int LSM6DSLSensor::Enable_Wake_Up_Detection(void)
-{
-  return Enable_Wake_Up_Detection(LSM6DSL_INT2_PIN);
-}
-
-/**
- * @brief Enable the wake up detection for LSM6DSL accelerometer sensor
  * @param pin the interrupt pin to be used
  * @note  This function sets the LSM6DSL accelerometer ODR to 416Hz and the LSM6DSL accelerometer full scale to 2g
  * @retval 0 in case of success, an error code otherwise
@@ -1357,16 +1327,6 @@
 
 /**
  * @brief Enable the single tap detection for LSM6DSL accelerometer sensor
- * @note  This function sets the LSM6DSL accelerometer ODR to 416Hz and the LSM6DSL accelerometer full scale to 2g
- * @retval 0 in case of success, an error code otherwise
- */
-int LSM6DSLSensor::Enable_Single_Tap_Detection(void)
-{
-  return Enable_Single_Tap_Detection(LSM6DSL_INT1_PIN);
-}
-
-/**
- * @brief Enable the single tap detection for LSM6DSL accelerometer sensor
  * @param pin the interrupt pin to be used
  * @note  This function sets the LSM6DSL accelerometer ODR to 416Hz and the LSM6DSL accelerometer full scale to 2g
  * @retval 0 in case of success, an error code otherwise
@@ -1524,16 +1484,6 @@
 
 /**
  * @brief Enable the double tap detection for LSM6DSL accelerometer sensor
- * @note  This function sets the LSM6DSL accelerometer ODR to 416Hz and the LSM6DSL accelerometer full scale to 2g
- * @retval 0 in case of success, an error code otherwise
- */
-int LSM6DSLSensor::Enable_Double_Tap_Detection(void)
-{
-  return Enable_Double_Tap_Detection(LSM6DSL_INT1_PIN);
-}
-
-/**
- * @brief Enable the double tap detection for LSM6DSL accelerometer sensor
  * @param pin the interrupt pin to be used
  * @note  This function sets the LSM6DSL accelerometer ODR to 416Hz and the LSM6DSL accelerometer full scale to 2g
  * @retval 0 in case of success, an error code otherwise
@@ -1767,16 +1717,6 @@
 
 /**
  * @brief Enable the 6D orientation detection for LSM6DSL accelerometer sensor
- * @note  This function sets the LSM6DSL accelerometer ODR to 416Hz and the LSM6DSL accelerometer full scale to 2g
- * @retval 0 in case of success, an error code otherwise
- */
-int LSM6DSLSensor::Enable_6D_Orientation(void)
-{
-  return Enable_6D_Orientation(LSM6DSL_INT1_PIN);
-}
-
-/**
- * @brief Enable the 6D orientation detection for LSM6DSL accelerometer sensor
  * @param pin the interrupt pin to be used
  * @note  This function sets the LSM6DSL accelerometer ODR to 416Hz and the LSM6DSL accelerometer full scale to 2g
  * @retval 0 in case of success, an error code otherwise
--- a/Components/LSM6DSLSensor/LSM6DSLSensor.h	Mon Dec 05 12:18:43 2016 +0000
+++ b/Components/LSM6DSLSensor/LSM6DSLSensor.h	Thu Dec 15 14:03:46 2016 +0000
@@ -147,8 +147,7 @@
     int Enable_G(void);
     int Disable_X(void);
     int Disable_G(void);
-    int Enable_Free_Fall_Detection(void);
-    int Enable_Free_Fall_Detection(LSM6DSL_Interrupt_Pin_t pin);
+    int Enable_Free_Fall_Detection(LSM6DSL_Interrupt_Pin_t pin = LSM6DSL_INT1_PIN);
     int Disable_Free_Fall_Detection(void);
     int Set_Free_Fall_Threshold(uint8_t thr);
     int Enable_Pedometer(void);
@@ -156,25 +155,20 @@
     int Get_Step_Counter(uint16_t *step_count);
     int Reset_Step_Counter(void);
     int Set_Pedometer_Threshold(uint8_t thr);
-    int Enable_Tilt_Detection(void);
-    int Enable_Tilt_Detection(LSM6DSL_Interrupt_Pin_t pin);
+    int Enable_Tilt_Detection(LSM6DSL_Interrupt_Pin_t pin = LSM6DSL_INT1_PIN);
     int Disable_Tilt_Detection(void);
-    int Enable_Wake_Up_Detection(void);
-    int Enable_Wake_Up_Detection(LSM6DSL_Interrupt_Pin_t pin);
+    int Enable_Wake_Up_Detection(LSM6DSL_Interrupt_Pin_t pin = LSM6DSL_INT2_PIN);
     int Disable_Wake_Up_Detection(void);
     int Set_Wake_Up_Threshold(uint8_t thr);
-    int Enable_Single_Tap_Detection(void);
-    int Enable_Single_Tap_Detection(LSM6DSL_Interrupt_Pin_t pin);
+    int Enable_Single_Tap_Detection(LSM6DSL_Interrupt_Pin_t pin = LSM6DSL_INT1_PIN);
     int Disable_Single_Tap_Detection(void);
-    int Enable_Double_Tap_Detection(void);
-    int Enable_Double_Tap_Detection(LSM6DSL_Interrupt_Pin_t pin);
+    int Enable_Double_Tap_Detection(LSM6DSL_Interrupt_Pin_t pin = LSM6DSL_INT1_PIN);
     int Disable_Double_Tap_Detection(void);
     int Set_Tap_Threshold(uint8_t thr);
     int Set_Tap_Shock_Time(uint8_t time);
     int Set_Tap_Quiet_Time(uint8_t time);
     int Set_Tap_Duration_Time(uint8_t time);
-    int Enable_6D_Orientation(void);
-    int Enable_6D_Orientation(LSM6DSL_Interrupt_Pin_t pin);
+    int Enable_6D_Orientation(LSM6DSL_Interrupt_Pin_t pin = LSM6DSL_INT1_PIN);
     int Disable_6D_Orientation(void);
     int Get_6D_Orientation_XL(uint8_t *xl);
     int Get_6D_Orientation_XH(uint8_t *xh);