Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/STM32WB5MM-DK/Applications/BLE/BLE_Sensor/STM32_WPAN/App/motenv_server_app.h')
-rw-r--r--Projects/STM32WB5MM-DK/Applications/BLE/BLE_Sensor/STM32_WPAN/App/motenv_server_app.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/Projects/STM32WB5MM-DK/Applications/BLE/BLE_Sensor/STM32_WPAN/App/motenv_server_app.h b/Projects/STM32WB5MM-DK/Applications/BLE/BLE_Sensor/STM32_WPAN/App/motenv_server_app.h
new file mode 100644
index 000000000..35d67cb70
--- /dev/null
+++ b/Projects/STM32WB5MM-DK/Applications/BLE/BLE_Sensor/STM32_WPAN/App/motenv_server_app.h
@@ -0,0 +1,85 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * File Name : motenv_server_app.h
+ * Description : MOTENV Server Application
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
+ * All rights reserved.</center></h2>
+ *
+ * This software component is licensed by ST under Ultimate Liberty license
+ * SLA0044, the "License"; You may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at:
+ * www.st.com/SLA0044
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* USER CODE BEGIN UserCode */
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __MOTENV_SERVER_APP_H
+#define __MOTENV_SERVER_APP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* External variables --------------------------------------------------------*/
+/* Exported macros -----------------------------------------------------------*/
+/* Feature mask for Sensor fusion short precision */
+#define FEATURE_MASK_SENSORFUSION_SHORT 0x00000100
+
+/* Feature mask for e-compass */
+#define FEATURE_MASK_ECOMPASS 0x00000040
+
+/* Feature mask for Accelerometer events */
+#define FEATURE_MASK_ACC_EVENTS 0x00000400
+
+/* W2ST command for asking the calibration status */
+#define W2ST_COMMAND_CAL_STATUS 0xFF
+/* W2ST command for resetting the calibration */
+#define W2ST_COMMAND_CAL_RESET 0x00
+/* W2ST command for stopping the calibration process */
+#define W2ST_COMMAND_CAL_STOP 0x01
+
+/* Store Value into a buffer in Little Endian Format */
+#define STORE_LE_16(buf, val) ( ((buf)[0] = (uint8_t) (val) ) , \
+ ((buf)[1] = (uint8_t) (val>>8) ) )
+
+#define STORE_LE_32(buf, val) ( ((buf)[0] = (uint8_t) (val) ) , \
+ ((buf)[1] = (uint8_t) (val>>8) ) , \
+ ((buf)[2] = (uint8_t) (val>>16) ) , \
+ ((buf)[3] = (uint8_t) (val>>24) ) )
+
+#define STORE_BE_32(buf, val) ( ((buf)[3] = (uint8_t) (val) ) , \
+ ((buf)[2] = (uint8_t) (val>>8) ) , \
+ ((buf)[1] = (uint8_t) (val>>16) ) , \
+ ((buf)[0] = (uint8_t) (val>>24) ) )
+
+#define MCR_BLUEMS_F2I_1D(in, out_int, out_dec) {out_int = (int32_t)in; out_dec= (int32_t)((in-out_int)*10);};
+#define MCR_BLUEMS_F2I_2D(in, out_int, out_dec) {out_int = (int32_t)in; out_dec= (int32_t)((in-out_int)*100);};
+
+#define FROM_MG_TO_G 0.001f
+#define FROM_G_TO_MG 1000.0f
+#define FROM_MDPS_TO_DPS 0.001f
+#define FROM_DPS_TO_MDPS 1000.0f
+#define FROM_MGAUSS_TO_UT50 (0.1f/50.0f)
+#define FROM_UT50_TO_MGAUSS 500.0f
+
+/* Exported functions ------------------------------------------------------- */
+void MOTENV_APP_Init( void );
+void MOTENV_APP_HandleDisconnection( void );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*__MOTENV_SERVER_APP_H */
+
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
+/* USER CODE END UserCode*/