test sending sensor results over lora radio. Accelerometer and temp/pressure.

Dependencies:   SX127x

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers x_nucleo_iks01a2_temperature.h Source File

x_nucleo_iks01a2_temperature.h

Go to the documentation of this file.
00001 /**
00002  ******************************************************************************
00003  * @file    x_nucleo_iks01a2_temperature.h
00004  * @author  MEMS Application Team
00005  * @brief   This file contains definitions for x_nucleo_iks01a2_temperature.c
00006  ******************************************************************************
00007  * @attention
00008  *
00009  * <h2><center>&copy; 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_TEMPERATURE_H
00038 #define __X_NUCLEO_IKS01A2_TEMPERATURE_H
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043 
00044 
00045 
00046 /* Includes ------------------------------------------------------------------*/
00047 #include "LPS22HH_Driver_HL.h"
00048 #include "x_nucleo_iks01a2.h"
00049 
00050 
00051 
00052 /** @addtogroup BSP BSP
00053  * @{
00054  */
00055 
00056 /** @addtogroup X_NUCLEO_IKS01A2 X_NUCLEO_IKS01A2
00057  * @{
00058  */
00059 
00060 /** @addtogroup X_NUCLEO_IKS01A2_TEMPERATURE Temperature
00061  * @{
00062  */
00063 
00064 /** @addtogroup X_NUCLEO_IKS01A2_TEMPERATURE_Public_Types Public types
00065   * @{
00066   */
00067 
00068 typedef enum
00069 {
00070   TEMPERATURE_SENSORS_AUTO = -1, /* Always first element and equal to -1 */
00071   LPS22HH_T_0,                   /* DIL24 adapter. */
00072 } TEMPERATURE_ID_t;
00073 
00074 /**
00075  * @}
00076  */
00077 
00078 /** @addtogroup X_NUCLEO_IKS01A2_TEMPERATURE_Public_Defines Public defines
00079   * @{
00080   */
00081 
00082 #define TEMPERATURE_SENSORS_MAX_NUM 2
00083 
00084 /**
00085  * @}
00086  */
00087 
00088 /** @addtogroup X_NUCLEO_IKS01A2_TEMPERATURE_Public_Function_Prototypes Public function prototypes
00089  * @{
00090  */
00091 
00092 /* Sensor Configuration Functions */
00093 DrvStatusTypeDef BSP_TEMPERATURE_Init(TEMPERATURE_ID_t id, void **handle);
00094 DrvStatusTypeDef BSP_TEMPERATURE_DeInit(void **handle);
00095 DrvStatusTypeDef BSP_TEMPERATURE_Sensor_Enable(void *handle);
00096 DrvStatusTypeDef BSP_TEMPERATURE_Sensor_Disable(void *handle);
00097 DrvStatusTypeDef BSP_TEMPERATURE_IsInitialized(void *handle, uint8_t *status);
00098 DrvStatusTypeDef BSP_TEMPERATURE_IsEnabled(void *handle, uint8_t *status);
00099 DrvStatusTypeDef BSP_TEMPERATURE_IsCombo(void *handle, uint8_t *status);
00100 DrvStatusTypeDef BSP_TEMPERATURE_Get_Instance(void *handle, uint8_t *instance);
00101 DrvStatusTypeDef BSP_TEMPERATURE_Get_WhoAmI(void *handle, uint8_t *who_am_i);
00102 DrvStatusTypeDef BSP_TEMPERATURE_Check_WhoAmI(void *handle);
00103 DrvStatusTypeDef BSP_TEMPERATURE_Get_Temp(void *handle, float *temperature);
00104 DrvStatusTypeDef BSP_TEMPERATURE_Get_ODR(void *handle, float *odr);
00105 DrvStatusTypeDef BSP_TEMPERATURE_Set_ODR(void *handle, SensorOdr_t odr);
00106 DrvStatusTypeDef BSP_TEMPERATURE_Set_ODR_Value(void *handle, float odr);
00107 DrvStatusTypeDef BSP_TEMPERATURE_Read_Reg(void *handle, uint8_t reg, uint8_t *data);
00108 DrvStatusTypeDef BSP_TEMPERATURE_Write_Reg(void *handle, uint8_t reg, uint8_t data);
00109 DrvStatusTypeDef BSP_TEMPERATURE_Get_DRDY_Status(void *handle, uint8_t *status);
00110 
00111 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Get_Full_Status_Ext(void *handle, uint8_t *status);
00112 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Get_Fth_Status_Ext(void *handle, uint8_t *status);
00113 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Get_Ovr_Status_Ext(void *handle, uint8_t *status);
00114 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Get_Data_Ext(void *handle, float *pressure, float *temperature);
00115 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Get_Num_Of_Samples_Ext(void *handle, uint8_t *nSamples);
00116 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Set_Mode_Ext(void *handle, uint8_t mode);
00117 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Set_Interrupt_Ext(void *handle, uint8_t interrupt);
00118 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Reset_Interrupt_Ext(void *handle, uint8_t interrupt);
00119 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Set_Watermark_Level_Ext(void *handle, uint8_t watermark);
00120 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Stop_On_Fth_Ext(void *handle, uint8_t status);
00121 DrvStatusTypeDef BSP_TEMPERATURE_FIFO_Usage_Ext(void *handle, uint8_t status);
00122 
00123 /**
00124  * @}
00125  */
00126 
00127 /**
00128  * @}
00129  */
00130 
00131 /**
00132  * @}
00133  */
00134 
00135 /**
00136  * @}
00137  */
00138 
00139 #ifdef __cplusplus
00140 }
00141 #endif
00142 
00143 #endif /* __X_NUCLEO_IKS01A2_TEMPERATURE_H */
00144 
00145 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/