Motion and Environmental sensor reader application connected via BLE to ST BlueMS iOS/Android application.
Dependencies: HTS221 LIS3MDL LPS22HB LSM303AGR LSM6DSL
Fork of MOTENV_Mbed by
MotionFX_Manager.h
00001 /** 00002 ****************************************************************************** 00003 * @file MotionFA_Manager.h 00004 * @author MEMS Application Team 00005 * @version V2.0.0 00006 * @date 01-May-2017 00007 * @brief Header for MotionCP_Manager.c module 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> 00012 * 00013 * Redistribution and use in source and binary forms, with or without modification, 00014 * are permitted provided that the following conditions are met: 00015 * 1. Redistributions of source code must retain the above copyright notice, 00016 * this list of conditions and the following disclaimer. 00017 * 2. Redistributions in binary form must reproduce the above copyright notice, 00018 * this list of conditions and the following disclaimer in the documentation 00019 * and/or other materials provided with the distribution. 00020 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00021 * may be used to endorse or promote products derived from this software 00022 * without specific prior written permission. 00023 * 00024 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00025 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00026 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00027 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00028 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00029 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00030 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00031 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00032 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00033 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 * 00035 ****************************************************************************** 00036 */ 00037 00038 /* Define to prevent recursive inclusion -------------------------------------*/ 00039 #ifndef _MOTIONFA_MANAGER_H_ 00040 #define _MOTIONFA_MANAGER_H_ 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00046 /* Includes ------------------------------------------------------------------*/ 00047 #include "string.h" 00048 #include "motion_fx.h" 00049 00050 #define USE_IKS01A2 00051 00052 #define LSM6DSL_G_0 0 00053 #define LSM6DS3_G_0 1 00054 #define LSM6DS0_G_0 2 00055 00056 typedef struct 00057 { 00058 signed short magOffX; /* X axis Offset */ 00059 signed short magOffY; /* Y axis Offset */ 00060 signed short magOffZ; /* Z axis Offset */ 00061 } osxMFX_calibFactor; 00062 00063 /** @addtogroup MOTION_FA_Applications 00064 * @{ 00065 */ 00066 00067 /** @addtogroup FITNESS_ACTIVITIES 00068 * @{ 00069 */ 00070 00071 /* Extern Variables ----------------------------------------------------------*/ 00072 /* Exported Macros -----------------------------------------------------------*/ 00073 /* Exported Types ------------------------------------------------------------*/ 00074 /* Imported Variables --------------------------------------------------------*/ 00075 /* Exported Functions Prototypes ---------------------------------------------*/ 00076 //void MotionFX_manager_init(void *handle); 00077 void MotionFX_manager_init(unsigned char instance); 00078 void MotionFX_manager_run(MFX_input_t *data_in, MFX_output_t *data_out, float delta_time); 00079 void MotionFX_manager_start_6X(void); 00080 void MotionFX_manager_stop_6X(void); 00081 void MotionFX_manager_start_9X(void); 00082 void MotionFX_manager_stop_9X(void); 00083 00084 void MotionFX_manager_MagCal_run(MFX_MagCal_input_t *data_in, MFX_MagCal_output_t *data_out); 00085 void MotionFX_manager_MagCal_start(int sampletime); 00086 void MotionFX_manager_MagCal_stop(int sampletime); 00087 00088 char MotionFX_LoadMagCalFromNVM(unsigned short int dataSize, unsigned int *data); 00089 char MotionFX_SaveMagCalInNVM(unsigned short int dataSize, unsigned int *data); 00090 00091 /** 00092 * @} 00093 */ 00094 00095 /** 00096 * @} 00097 */ 00098 00099 #ifdef __cplusplus 00100 } 00101 #endif 00102 00103 #endif /* _MOTIONFA_MANAGER_H_ */ 00104 00105 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00106
Generated on Tue Jul 12 2022 21:01:59 by
1.7.2
