wayne roberts
/
CB-LORA-MR_utility
test sending sensor results over lora radio. Accelerometer and temp/pressure.
Embed:
(wiki syntax)
Show/hide line numbers
x_nucleo_iks01a2_pressure.h
Go to the documentation of this file.
00001 /** 00002 ****************************************************************************** 00003 * @file x_nucleo_iks01a2_pressure.h 00004 * @author MEMS Application Team 00005 * @brief This file contains definitions for x_nucleo_iks01a2_pressure.c 00006 ****************************************************************************** 00007 * @attention 00008 * 00009 * <h2><center>© COPYRIGHT(c) 2018 STMicroelectronics</center></h2> 00010 * 00011 * Redistribution and use in source and binary forms, with or without modification, 00012 * are permitted provided that the following conditions are met: 00013 * 1. Redistributions of source code must retain the above copyright notice, 00014 * this list of conditions and the following disclaimer. 00015 * 2. Redistributions in binary form must reproduce the above copyright notice, 00016 * this list of conditions and the following disclaimer in the documentation 00017 * and/or other materials provided with the distribution. 00018 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00019 * may be used to endorse or promote products derived from this software 00020 * without specific prior written permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00023 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00024 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00025 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00026 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00027 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00028 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00029 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00030 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00031 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00032 * 00033 ****************************************************************************** 00034 */ 00035 00036 /* Define to prevent recursive inclusion -------------------------------------*/ 00037 #ifndef __X_NUCLEO_IKS01A2_PRESSURE_H 00038 #define __X_NUCLEO_IKS01A2_PRESSURE_H 00039 00040 #ifdef __cplusplus 00041 extern "C" { 00042 #endif 00043 00044 00045 00046 /* Includes ------------------------------------------------------------------*/ 00047 //#include "LPS22HB_Driver_HL.h" 00048 #include "LPS22HH_Driver_HL.h" 00049 //#include "LPS33HW_Driver_HL.h" 00050 #include "x_nucleo_iks01a2.h" 00051 00052 00053 /** @addtogroup BSP BSP 00054 * @{ 00055 */ 00056 00057 /** @addtogroup X_NUCLEO_IKS01A2 X_NUCLEO_IKS01A2 00058 * @{ 00059 */ 00060 00061 /** @addtogroup X_NUCLEO_IKS01A2_PRESSURE Pressure 00062 * @{ 00063 */ 00064 00065 /** @addtogroup X_NUCLEO_IKS01A2_PRESSURE_Public_Types Public types 00066 * @{ 00067 */ 00068 00069 typedef enum 00070 { 00071 PRESSURE_SENSORS_AUTO = -1, /* Always first element and equal to -1 */ 00072 //LPS22HB_P_0, /* Default on board. */ 00073 LPS22HH_P_0, /* DIL24 adapter. */ 00074 //LPS33HW_P_0 /* DIL24 adapter. */ 00075 } PRESSURE_ID_t; 00076 00077 /** 00078 * @} 00079 */ 00080 00081 /** @addtogroup X_NUCLEO_IKS01A2_PRESSURE_Public_Defines Public defines 00082 * @{ 00083 */ 00084 00085 #define PRESSURE_SENSORS_MAX_NUM 3 00086 00087 /** 00088 * @} 00089 */ 00090 00091 /** @addtogroup X_NUCLEO_IKS01A2_PRESSURE_Public_Function_Prototypes Public function prototypes 00092 * @{ 00093 */ 00094 00095 /* Sensor Configuration Functions */ 00096 DrvStatusTypeDef BSP_PRESSURE_Init(PRESSURE_ID_t id, void **handle); 00097 DrvStatusTypeDef BSP_PRESSURE_DeInit(void **handle); 00098 DrvStatusTypeDef BSP_PRESSURE_Sensor_Enable(void *handle); 00099 DrvStatusTypeDef BSP_PRESSURE_Sensor_Disable(void *handle); 00100 DrvStatusTypeDef BSP_PRESSURE_IsInitialized(void *handle, uint8_t *status); 00101 DrvStatusTypeDef BSP_PRESSURE_IsEnabled(void *handle, uint8_t *status); 00102 DrvStatusTypeDef BSP_PRESSURE_IsCombo(void *handle, uint8_t *status); 00103 DrvStatusTypeDef BSP_PRESSURE_Get_Instance(void *handle, uint8_t *instance); 00104 DrvStatusTypeDef BSP_PRESSURE_Get_WhoAmI(void *handle, uint8_t *who_am_i); 00105 DrvStatusTypeDef BSP_PRESSURE_Check_WhoAmI(void *handle); 00106 DrvStatusTypeDef BSP_PRESSURE_Get_Press(void *handle, float *pressure); 00107 DrvStatusTypeDef BSP_PRESSURE_Get_ODR(void *handle, float *odr); 00108 DrvStatusTypeDef BSP_PRESSURE_Set_ODR(void *handle, SensorOdr_t odr); 00109 DrvStatusTypeDef BSP_PRESSURE_Set_ODR_Value(void *handle, float odr); 00110 DrvStatusTypeDef BSP_PRESSURE_Read_Reg(void *handle, uint8_t reg, uint8_t *data); 00111 DrvStatusTypeDef BSP_PRESSURE_Write_Reg(void *handle, uint8_t reg, uint8_t data); 00112 DrvStatusTypeDef BSP_PRESSURE_Get_DRDY_Status(void *handle, uint8_t *status); 00113 00114 DrvStatusTypeDef BSP_PRESSURE_FIFO_Get_Full_Status_Ext(void *handle, uint8_t *status); 00115 DrvStatusTypeDef BSP_PRESSURE_FIFO_Get_Fth_Status_Ext(void *handle, uint8_t *status); 00116 DrvStatusTypeDef BSP_PRESSURE_FIFO_Get_Ovr_Status_Ext(void *handle, uint8_t *status); 00117 DrvStatusTypeDef BSP_PRESSURE_FIFO_Get_Data_Ext(void *handle, float *pressure, float *temperature); 00118 DrvStatusTypeDef BSP_PRESSURE_FIFO_Get_Num_Of_Samples_Ext(void *handle, uint8_t *nSamples); 00119 DrvStatusTypeDef BSP_PRESSURE_FIFO_Set_Mode_Ext(void *handle, uint8_t mode); 00120 DrvStatusTypeDef BSP_PRESSURE_FIFO_Set_Interrupt_Ext(void *handle, uint8_t interrupt); 00121 DrvStatusTypeDef BSP_PRESSURE_FIFO_Reset_Interrupt_Ext(void *handle, uint8_t interrupt); 00122 DrvStatusTypeDef BSP_PRESSURE_FIFO_Set_Watermark_Level_Ext(void *handle, uint8_t watermark); 00123 DrvStatusTypeDef BSP_PRESSURE_FIFO_Stop_On_Fth_Ext(void *handle, uint8_t status); 00124 DrvStatusTypeDef BSP_PRESSURE_FIFO_Usage_Ext(void *handle, uint8_t status); 00125 00126 /** 00127 * @} 00128 */ 00129 00130 /** 00131 * @} 00132 */ 00133 00134 /** 00135 * @} 00136 */ 00137 00138 /** 00139 * @} 00140 */ 00141 00142 #ifdef __cplusplus 00143 } 00144 #endif 00145 00146 #endif /* __X_NUCLEO_IKS01A2_PRESSURE_H */ 00147 00148 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 16:29:50 by 1.7.2