Environmental Shield API

Committer:
Deepti
Date:
Tue Aug 19 07:13:15 2014 +0000
Revision:
0:9e645e6ed2ce
Environment Shield API

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Deepti 0:9e645e6ed2ce 1 /**
Deepti 0:9e645e6ed2ce 2 ******************************************************************************
Deepti 0:9e645e6ed2ce 3 * @file lps25h.h
Deepti 0:9e645e6ed2ce 4 * @author AST Robotics Team
Deepti 0:9e645e6ed2ce 5 * @version V0.0.1
Deepti 0:9e645e6ed2ce 6 * @date 18-February-2014
Deepti 0:9e645e6ed2ce 7 * @brief This file contains definitions lps25h.c
Deepti 0:9e645e6ed2ce 8 * firmware driver.
Deepti 0:9e645e6ed2ce 9 ******************************************************************************
Deepti 0:9e645e6ed2ce 10 * @attention
Deepti 0:9e645e6ed2ce 11 *
Deepti 0:9e645e6ed2ce 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
Deepti 0:9e645e6ed2ce 13 *
Deepti 0:9e645e6ed2ce 14 * Redistribution and use in source and binary forms, with or without modification,
Deepti 0:9e645e6ed2ce 15 * are permitted provided that the following conditions are met:
Deepti 0:9e645e6ed2ce 16 * 1. Redistributions of source code must retain the above copyright notice,
Deepti 0:9e645e6ed2ce 17 * this list of conditions and the following disclaimer.
Deepti 0:9e645e6ed2ce 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
Deepti 0:9e645e6ed2ce 19 * this list of conditions and the following disclaimer in the documentation
Deepti 0:9e645e6ed2ce 20 * and/or other materials provided with the distribution.
Deepti 0:9e645e6ed2ce 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Deepti 0:9e645e6ed2ce 22 * may be used to endorse or promote products derived from this software
Deepti 0:9e645e6ed2ce 23 * without specific prior written permission.
Deepti 0:9e645e6ed2ce 24 *
Deepti 0:9e645e6ed2ce 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Deepti 0:9e645e6ed2ce 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Deepti 0:9e645e6ed2ce 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Deepti 0:9e645e6ed2ce 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Deepti 0:9e645e6ed2ce 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Deepti 0:9e645e6ed2ce 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Deepti 0:9e645e6ed2ce 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Deepti 0:9e645e6ed2ce 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Deepti 0:9e645e6ed2ce 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Deepti 0:9e645e6ed2ce 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Deepti 0:9e645e6ed2ce 35 *
Deepti 0:9e645e6ed2ce 36 ******************************************************************************
Deepti 0:9e645e6ed2ce 37 */
Deepti 0:9e645e6ed2ce 38
Deepti 0:9e645e6ed2ce 39 /* Define to prevent recursive inclusion -------------------------------------*/
Deepti 0:9e645e6ed2ce 40 #ifndef __LPS25H_H
Deepti 0:9e645e6ed2ce 41 #define __LPS25H_H
Deepti 0:9e645e6ed2ce 42
Deepti 0:9e645e6ed2ce 43 #ifdef __cplusplus
Deepti 0:9e645e6ed2ce 44 extern "C" {
Deepti 0:9e645e6ed2ce 45 #endif
Deepti 0:9e645e6ed2ce 46
Deepti 0:9e645e6ed2ce 47 /* Includes ------------------------------------------------------------------*/
Deepti 0:9e645e6ed2ce 48 #include "../Common/pressure.h"
Deepti 0:9e645e6ed2ce 49
Deepti 0:9e645e6ed2ce 50 /** @addtogroup BSP
Deepti 0:9e645e6ed2ce 51 * @{
Deepti 0:9e645e6ed2ce 52 */
Deepti 0:9e645e6ed2ce 53
Deepti 0:9e645e6ed2ce 54 /** @addtogroup LPS25H
Deepti 0:9e645e6ed2ce 55 * @{
Deepti 0:9e645e6ed2ce 56 */
Deepti 0:9e645e6ed2ce 57
Deepti 0:9e645e6ed2ce 58 /** @defgroup LPS25H_Exported_Constants
Deepti 0:9e645e6ed2ce 59 * @{
Deepti 0:9e645e6ed2ce 60 */
Deepti 0:9e645e6ed2ce 61
Deepti 0:9e645e6ed2ce 62 /******************************************************************************/
Deepti 0:9e645e6ed2ce 63 /*************************** START REGISTER MAPPING **************************/
Deepti 0:9e645e6ed2ce 64 /******************************************************************************/
Deepti 0:9e645e6ed2ce 65
Deepti 0:9e645e6ed2ce 66
Deepti 0:9e645e6ed2ce 67 /**
Deepti 0:9e645e6ed2ce 68 * @brief Reference pressure (LSB data)
Deepti 0:9e645e6ed2ce 69 * \code
Deepti 0:9e645e6ed2ce 70 * Read/write
Deepti 0:9e645e6ed2ce 71 * Default value: 0x00
Deepti 0:9e645e6ed2ce 72 * 7:0 REF7-ODR0: Lower part of the reference pressure that
Deepti 0:9e645e6ed2ce 73 * is sum to the sensor output pressure.
Deepti 0:9e645e6ed2ce 74 * \endcode
Deepti 0:9e645e6ed2ce 75 */
Deepti 0:9e645e6ed2ce 76 #define LPS25H_REF_P_XL_ADDR 0x08
Deepti 0:9e645e6ed2ce 77
Deepti 0:9e645e6ed2ce 78 /**
Deepti 0:9e645e6ed2ce 79 * @brief Reference pressure (middle part)
Deepti 0:9e645e6ed2ce 80 * \code
Deepti 0:9e645e6ed2ce 81 * Read/write
Deepti 0:9e645e6ed2ce 82 * Default value: 0x00
Deepti 0:9e645e6ed2ce 83 * 7:0 REF15-ODR8: Middle part of the reference pressure that
Deepti 0:9e645e6ed2ce 84 * is sum to the sensor output pressure.
Deepti 0:9e645e6ed2ce 85 * \endcode
Deepti 0:9e645e6ed2ce 86 */
Deepti 0:9e645e6ed2ce 87 #define LPS25H_REF_P_L_ADDR 0x09
Deepti 0:9e645e6ed2ce 88
Deepti 0:9e645e6ed2ce 89 /**
Deepti 0:9e645e6ed2ce 90 * @brief Reference pressure (MSB part)
Deepti 0:9e645e6ed2ce 91 * \code
Deepti 0:9e645e6ed2ce 92 * Read/write
Deepti 0:9e645e6ed2ce 93 * Default value: 0x00
Deepti 0:9e645e6ed2ce 94 * 7:0 REF15-ODR8: Higher part of the reference pressure that
Deepti 0:9e645e6ed2ce 95 * is sum to the sensor output pressure.
Deepti 0:9e645e6ed2ce 96 * \endcode
Deepti 0:9e645e6ed2ce 97 */
Deepti 0:9e645e6ed2ce 98 #define LPS25H_REF_P_H_ADDR 0x0A
Deepti 0:9e645e6ed2ce 99
Deepti 0:9e645e6ed2ce 100 /**
Deepti 0:9e645e6ed2ce 101 * @brief Device identifier register.
Deepti 0:9e645e6ed2ce 102 * \code
Deepti 0:9e645e6ed2ce 103 * Read
Deepti 0:9e645e6ed2ce 104 * Default value: 0xBD
Deepti 0:9e645e6ed2ce 105 * 7:0 This read-only register contains the device identifier that,
Deepti 0:9e645e6ed2ce 106 for LPS25H, is set to 0xCA.
Deepti 0:9e645e6ed2ce 107 * \endcode
Deepti 0:9e645e6ed2ce 108 */
Deepti 0:9e645e6ed2ce 109 #define LPS25H_WHO_AM_I_ADDR 0x0F
Deepti 0:9e645e6ed2ce 110
Deepti 0:9e645e6ed2ce 111 /**
Deepti 0:9e645e6ed2ce 112 * @brief Pressure and temperature resolution mode register.
Deepti 0:9e645e6ed2ce 113 * \code
Deepti 0:9e645e6ed2ce 114 * Read
Deepti 0:9e645e6ed2ce 115 * Default value: 0x05
Deepti 0:9e645e6ed2ce 116 * [7:4] Reserved
Deepti 0:9e645e6ed2ce 117 * [3:2] AVGP1-0: select the pressure internal average.
Deepti 0:9e645e6ed2ce 118 * [1:0] AVGT1-0: select the temperature internal average.
Deepti 0:9e645e6ed2ce 119 * \endcode
Deepti 0:9e645e6ed2ce 120 */
Deepti 0:9e645e6ed2ce 121 #define LPS25H_RES_CONF_ADDR 0x10
Deepti 0:9e645e6ed2ce 122
Deepti 0:9e645e6ed2ce 123 /**
Deepti 0:9e645e6ed2ce 124 * @brief Pressure sensor control register 1
Deepti 0:9e645e6ed2ce 125 * \code
Deepti 0:9e645e6ed2ce 126 * Read/write
Deepti 0:9e645e6ed2ce 127 * Default value: 0x00
Deepti 0:9e645e6ed2ce 128 * 7 PD: power down control. 0 - disable; 1 - enable
Deepti 0:9e645e6ed2ce 129 * 6:4 ODR2, ODR1, ODR0: output data rate selection.
Deepti 0:9e645e6ed2ce 130 * ODR2 | ODR1 | ODR0 | Pressure output data-rate(Hz) | Temperature output data-rate(Hz)
Deepti 0:9e645e6ed2ce 131 * ----------------------------------------------------------------------------------
Deepti 0:9e645e6ed2ce 132 * 0 | 0 | 0 | one shot | one shot
Deepti 0:9e645e6ed2ce 133 * 0 | 0 | 1 | 1 | 1
Deepti 0:9e645e6ed2ce 134 * 0 | 1 | 0 | 7 | 7
Deepti 0:9e645e6ed2ce 135 * 0 | 1 | 1 | 12.5 | 12.5
Deepti 0:9e645e6ed2ce 136 * 1 | 0 | 0 | 25 | 25
Deepti 0:9e645e6ed2ce 137 * 1 | 0 | 1 | Reserved | Reserved
Deepti 0:9e645e6ed2ce 138 * 1 | 1 | 0 | Reserved | Reserved
Deepti 0:9e645e6ed2ce 139 * 1 | 1 | 1 | Reserved | Reserved
Deepti 0:9e645e6ed2ce 140 *
Deepti 0:9e645e6ed2ce 141 * 3 DIFF_EN: Interrupt circuit. 0 - disable; 1 - enable
Deepti 0:9e645e6ed2ce 142 * 2 BDU: block data update. 0 - disable; 1 - enable
Deepti 0:9e645e6ed2ce 143 * 1 DELTA_EN: delta pressure. 0 - disable; 1 - enable
Deepti 0:9e645e6ed2ce 144 * 1 RESET_AZ: reset AutoZero. 0 - disable; 1 - enable ///////ALE REVIEW
Deepti 0:9e645e6ed2ce 145 * 0 SIM: SPI Serial Interface Mode selection. 0 - SPI 4-wire; 1 - SPI 3-wire ///////ALE REVIEW
Deepti 0:9e645e6ed2ce 146 * \endcode
Deepti 0:9e645e6ed2ce 147 */
Deepti 0:9e645e6ed2ce 148 #define LPS25H_CTRL_REG1_ADDR 0x20
Deepti 0:9e645e6ed2ce 149
Deepti 0:9e645e6ed2ce 150 /**
Deepti 0:9e645e6ed2ce 151 * @brief Pressure sensor control register 2
Deepti 0:9e645e6ed2ce 152 * \code
Deepti 0:9e645e6ed2ce 153 * Read/write
Deepti 0:9e645e6ed2ce 154 * Default value: 0x00
Deepti 0:9e645e6ed2ce 155 * 7 BOOT: Reboot memory content. 0: normal mode; 1: reboot memory content
Deepti 0:9e645e6ed2ce 156 * 6 FIFO_EN: FIFO. 0: disable; 1: enable
Deepti 0:9e645e6ed2ce 157 * 5 WTM_EN: FIFO Watermark level use. 0: disable; 1: enable
Deepti 0:9e645e6ed2ce 158 * 4:3 Reserved. keep these bits at 0
Deepti 0:9e645e6ed2ce 159 * 2 SWRESET: Software reset. 0: normal mode; 1: SW reset.
Deepti 0:9e645e6ed2ce 160 * 1 AUTO_ZERO: Autozero enable. 0: normal mode; 1: autozero enable.
Deepti 0:9e645e6ed2ce 161 * 0 ONE_SHOT: One shot enable. 0: waiting for start of conversion; 1: start for a new dataset
Deepti 0:9e645e6ed2ce 162 * \endcode
Deepti 0:9e645e6ed2ce 163 */
Deepti 0:9e645e6ed2ce 164 #define LPS25H_CTRL_REG2_ADDR 0x21
Deepti 0:9e645e6ed2ce 165
Deepti 0:9e645e6ed2ce 166 /**
Deepti 0:9e645e6ed2ce 167 * @brief Pressure sensor control register 3
Deepti 0:9e645e6ed2ce 168 * \code
Deepti 0:9e645e6ed2ce 169 * Read/write
Deepti 0:9e645e6ed2ce 170 * Default value: 0x00
Deepti 0:9e645e6ed2ce 171 * 7 INT_H_L: Interrupt. 0:active high; 1: active low.
Deepti 0:9e645e6ed2ce 172 * 6 PP_OD: Push-Pull/OpenDrain selection on interrupt pads. 0: Push-pull; 1: open drain.
Deepti 0:9e645e6ed2ce 173 * 5 Reserved
Deepti 0:9e645e6ed2ce 174 * 4:3 INT2_S2, INT2_S1: INT2 output signal selection control bits. // TO DO
Deepti 0:9e645e6ed2ce 175 * 1:0 INT1_S2, INT1_S1: data signal on INT1 pad control bits.
Deepti 0:9e645e6ed2ce 176 * INT1(2)_S2 | INT1(2)_S1 | INT1(2) pin
Deepti 0:9e645e6ed2ce 177 * ------------------------------------------------------
Deepti 0:9e645e6ed2ce 178 * 0 | 0 | Data signal
Deepti 0:9e645e6ed2ce 179 * 0 | 1 | Pressure high (P_high)
Deepti 0:9e645e6ed2ce 180 * 1 | 0 | Pressure low (P_low)
Deepti 0:9e645e6ed2ce 181 * 1 | 1 | P_low OR P_high
Deepti 0:9e645e6ed2ce 182
Deepti 0:9e645e6ed2ce 183
Deepti 0:9e645e6ed2ce 184 * \endcode
Deepti 0:9e645e6ed2ce 185 */
Deepti 0:9e645e6ed2ce 186 #define LPS25H_CTRL_REG3_ADDR 0x22
Deepti 0:9e645e6ed2ce 187
Deepti 0:9e645e6ed2ce 188 /**
Deepti 0:9e645e6ed2ce 189 * @brief Pressure sensor control register 4
Deepti 0:9e645e6ed2ce 190 * \code
Deepti 0:9e645e6ed2ce 191 * Read/write
Deepti 0:9e645e6ed2ce 192 * Default value: 0x00
Deepti 0:9e645e6ed2ce 193 * 7 P2_EMPTY: Empty Signal on INT2 pin.
Deepti 0:9e645e6ed2ce 194 * 6 P2_WTM: Watermark Signal on INT2 pin.
Deepti 0:9e645e6ed2ce 195 * 5 P2_Overrun:Overrun Signal on INT2 pin.
Deepti 0:9e645e6ed2ce 196 * 4 P2_DRDY: Data Ready Signal on INT2 pin.
Deepti 0:9e645e6ed2ce 197 * 3 P1_EMPTY: Empty Signal on INT1 pin.
Deepti 0:9e645e6ed2ce 198 * 2 P1_WTM: Watermark Signal on INT1 pin.
Deepti 0:9e645e6ed2ce 199 * 1 P1_Overrunn:Overrun Signal on INT1 pin.
Deepti 0:9e645e6ed2ce 200 * 0 P1_DRDY: Data Ready Signal on INT1 pin.
Deepti 0:9e645e6ed2ce 201 * \endcode
Deepti 0:9e645e6ed2ce 202 */
Deepti 0:9e645e6ed2ce 203 #define LPS25H_CTRL_REG4_ADDR 0x23
Deepti 0:9e645e6ed2ce 204
Deepti 0:9e645e6ed2ce 205 /**
Deepti 0:9e645e6ed2ce 206 * @brief Interrupt configuration Register
Deepti 0:9e645e6ed2ce 207 * \code
Deepti 0:9e645e6ed2ce 208 * Read/write
Deepti 0:9e645e6ed2ce 209 * Default value: 0x00.
Deepti 0:9e645e6ed2ce 210 * 7:3 Reserved.
Deepti 0:9e645e6ed2ce 211 * 2 LIR: Latch Interrupt request into INT_SOURCE register. 0 - disable; 1 - enable
Deepti 0:9e645e6ed2ce 212 * 1 PL_E: Enable interrupt generation on differential pressure low event. 0 - disable; 1 - enable
Deepti 0:9e645e6ed2ce 213 * 0 PH_E: Enable interrupt generation on differential pressure high event. 0 - disable; 1 - enable
Deepti 0:9e645e6ed2ce 214 * \endcode
Deepti 0:9e645e6ed2ce 215 */
Deepti 0:9e645e6ed2ce 216 #define LPS25H_INT_CFG_REG_ADDR 0x24
Deepti 0:9e645e6ed2ce 217
Deepti 0:9e645e6ed2ce 218 /**
Deepti 0:9e645e6ed2ce 219 * @brief Interrupt source Register
Deepti 0:9e645e6ed2ce 220 * \code
Deepti 0:9e645e6ed2ce 221 * Read
Deepti 0:9e645e6ed2ce 222 * Default value: 0x00.
Deepti 0:9e645e6ed2ce 223 * 7:3 0.
Deepti 0:9e645e6ed2ce 224 * 2 IA: Interrupt Active.0: no interrupt has been generated; 1: one or more interrupt events have been generated.
Deepti 0:9e645e6ed2ce 225 * 1 PL: Differential pressure Low. 0: no interrupt has been generated; 1: Low differential pressure event has occurred.
Deepti 0:9e645e6ed2ce 226 * 0 PH: Differential pressure High. 0: no interrupt has been generated; 1: High differential pressure event has occurred.
Deepti 0:9e645e6ed2ce 227 * \endcode
Deepti 0:9e645e6ed2ce 228 */
Deepti 0:9e645e6ed2ce 229 #define LPS25H_INT_SOURCE_REG_ADDR 0x25
Deepti 0:9e645e6ed2ce 230
Deepti 0:9e645e6ed2ce 231 /**
Deepti 0:9e645e6ed2ce 232 * @brief Threshold pressure (LSB)
Deepti 0:9e645e6ed2ce 233 * \code
Deepti 0:9e645e6ed2ce 234 * Read
Deepti 0:9e645e6ed2ce 235 * Default value: 0x00.
Deepti 0:9e645e6ed2ce 236 * 7:0 THS7-THS0: Low part of threshold value for pressure interrupt
Deepti 0:9e645e6ed2ce 237 * generation. The complete threshold value is given by THS_P_H & THS_P_L and is
Deepti 0:9e645e6ed2ce 238 * expressed as unsigned number. P_ths(mbar)=(THS_P_H & THS_P_L)[dec]/16.
Deepti 0:9e645e6ed2ce 239 * \endcode
Deepti 0:9e645e6ed2ce 240 */
Deepti 0:9e645e6ed2ce 241 #define LPS25H_THS_P_LOW_REG_ADDR 0x30
Deepti 0:9e645e6ed2ce 242
Deepti 0:9e645e6ed2ce 243 /**
Deepti 0:9e645e6ed2ce 244 * @brief Threshold pressure (MSB)
Deepti 0:9e645e6ed2ce 245 * \code
Deepti 0:9e645e6ed2ce 246 * Read
Deepti 0:9e645e6ed2ce 247 * Default value: 0x00.
Deepti 0:9e645e6ed2ce 248 * 7:0 THS15-THS8: High part of threshold value for pressure interrupt
Deepti 0:9e645e6ed2ce 249 * generation. The complete threshold value is given by THS_P_H & THS_P_L and is
Deepti 0:9e645e6ed2ce 250 * expressed as unsigned number. P_ths(mbar)=(THS_P_H & THS_P_L)[dec]/16.
Deepti 0:9e645e6ed2ce 251 * \endcode
Deepti 0:9e645e6ed2ce 252 */
Deepti 0:9e645e6ed2ce 253 #define LPS25H_THS_P_HIGH_REG_ADDR 0x31
Deepti 0:9e645e6ed2ce 254
Deepti 0:9e645e6ed2ce 255 /**
Deepti 0:9e645e6ed2ce 256 * @brief Status Register
Deepti 0:9e645e6ed2ce 257 * \code
Deepti 0:9e645e6ed2ce 258 * Read
Deepti 0:9e645e6ed2ce 259 * Default value: 0x00
Deepti 0:9e645e6ed2ce 260 * 7:6 0
Deepti 0:9e645e6ed2ce 261 * 5 P_OR: Pressure data overrun. 0: no overrun has occurred; 1: new data for pressure has overwritten the previous one.
Deepti 0:9e645e6ed2ce 262 * 4 T_OR: Temperature data overrun. 0: no overrun has occurred; 1: a new data for temperature has overwritten the previous one.
Deepti 0:9e645e6ed2ce 263 * 3:2 0
Deepti 0:9e645e6ed2ce 264 * 1 P_DA: Pressure data available. 0: new data for pressure is not yet available; 1: new data for pressure is available.
Deepti 0:9e645e6ed2ce 265 * 0 T_DA: Temperature data available. 0: new data for temperature is not yet available; 1: new data for temperature is available.
Deepti 0:9e645e6ed2ce 266 * \endcode
Deepti 0:9e645e6ed2ce 267 */
Deepti 0:9e645e6ed2ce 268 #define LPS25H_STATUS_REG_ADDR 0x27
Deepti 0:9e645e6ed2ce 269
Deepti 0:9e645e6ed2ce 270 /**
Deepti 0:9e645e6ed2ce 271 * @brief Pressure data (LSB).
Deepti 0:9e645e6ed2ce 272 * \code
Deepti 0:9e645e6ed2ce 273 * Read
Deepti 0:9e645e6ed2ce 274 * Default value: 0x00.
Deepti 0:9e645e6ed2ce 275 * POUT7 - POUT0: Pressure data LSB (2's complement).
Deepti 0:9e645e6ed2ce 276 * Pressure output data: Pout(mbar)=(PRESS_OUT_H & PRESS_OUT_L &
Deepti 0:9e645e6ed2ce 277 * PRESS_OUT_XL)[dec]/4096.
Deepti 0:9e645e6ed2ce 278 * \endcode
Deepti 0:9e645e6ed2ce 279 */
Deepti 0:9e645e6ed2ce 280 #define LPS25H_PRESS_POUT_XL_ADDR 0x28
Deepti 0:9e645e6ed2ce 281
Deepti 0:9e645e6ed2ce 282 /**
Deepti 0:9e645e6ed2ce 283 * @brief Pressure data (Middle part).
Deepti 0:9e645e6ed2ce 284 * \code
Deepti 0:9e645e6ed2ce 285 * Read
Deepti 0:9e645e6ed2ce 286 * Default value: 0x80.
Deepti 0:9e645e6ed2ce 287 * POUT15 - POUT8: Pressure data middle part (2's complement).
Deepti 0:9e645e6ed2ce 288 * Pressure output data: Pout(mbar)=(PRESS_OUT_H & PRESS_OUT_L &
Deepti 0:9e645e6ed2ce 289 * PRESS_OUT_XL)[dec]/4096.
Deepti 0:9e645e6ed2ce 290 * \endcode
Deepti 0:9e645e6ed2ce 291 */
Deepti 0:9e645e6ed2ce 292 #define LPS25H_PRESS_OUT_L_ADDR 0x29
Deepti 0:9e645e6ed2ce 293
Deepti 0:9e645e6ed2ce 294 /**
Deepti 0:9e645e6ed2ce 295 * @brief Pressure data (MSB).
Deepti 0:9e645e6ed2ce 296 * \code
Deepti 0:9e645e6ed2ce 297 * Read
Deepti 0:9e645e6ed2ce 298 * Default value: 0x2F.
Deepti 0:9e645e6ed2ce 299 * POUT23 - POUT16: Pressure data MSB (2's complement).
Deepti 0:9e645e6ed2ce 300 * Pressure output data: Pout(mbar)=(PRESS_OUT_H & PRESS_OUT_L &
Deepti 0:9e645e6ed2ce 301 * PRESS_OUT_XL)[dec]/4096.
Deepti 0:9e645e6ed2ce 302 * \endcode
Deepti 0:9e645e6ed2ce 303 */
Deepti 0:9e645e6ed2ce 304 #define LPS25H_PRESS_OUT_H_ADDR 0x2A
Deepti 0:9e645e6ed2ce 305
Deepti 0:9e645e6ed2ce 306 /**
Deepti 0:9e645e6ed2ce 307 * @brief Temperature data (LSB).
Deepti 0:9e645e6ed2ce 308 * \code
Deepti 0:9e645e6ed2ce 309 * Read
Deepti 0:9e645e6ed2ce 310 * Default value: 0x00.
Deepti 0:9e645e6ed2ce 311 * TOUT7 - TOUT0: temperature data LSB.
Deepti 0:9e645e6ed2ce 312 * T(degC) = 42.5 + (Temp_OUTH & TEMP_OUT_L)[dec]/480.
Deepti 0:9e645e6ed2ce 313 * \endcode
Deepti 0:9e645e6ed2ce 314 */
Deepti 0:9e645e6ed2ce 315 #define LPS25H_TEMP_OUT_L_ADDR 0x2B
Deepti 0:9e645e6ed2ce 316
Deepti 0:9e645e6ed2ce 317 /**
Deepti 0:9e645e6ed2ce 318 * @brief Temperature data (MSB).
Deepti 0:9e645e6ed2ce 319 * \code
Deepti 0:9e645e6ed2ce 320 * Read
Deepti 0:9e645e6ed2ce 321 * Default value: 0x00.
Deepti 0:9e645e6ed2ce 322 * TOUT15 - TOUT8: temperature data MSB.
Deepti 0:9e645e6ed2ce 323 * T(degC) = 42.5 + (Temp_OUTH & TEMP_OUT_L)[dec]/480.
Deepti 0:9e645e6ed2ce 324 * \endcode
Deepti 0:9e645e6ed2ce 325 */
Deepti 0:9e645e6ed2ce 326 #define LPS25H_TEMP_OUT_H_ADDR 0x2C
Deepti 0:9e645e6ed2ce 327
Deepti 0:9e645e6ed2ce 328 /**
Deepti 0:9e645e6ed2ce 329 * @brief FIFO control register
Deepti 0:9e645e6ed2ce 330 * \code
Deepti 0:9e645e6ed2ce 331 * Read/write
Deepti 0:9e645e6ed2ce 332 * Default value: 0x00
Deepti 0:9e645e6ed2ce 333 * 7:5 F_MODE2, F_MODE1, F_MODE0: FIFO mode selection.
Deepti 0:9e645e6ed2ce 334 * FM2 | FM1 | FM0 | FIFO MODE
Deepti 0:9e645e6ed2ce 335 * ---------------------------------------------------
Deepti 0:9e645e6ed2ce 336 * 0 | 0 | 0 | BYPASS MODE
Deepti 0:9e645e6ed2ce 337 * 0 | 0 | 1 | FIFO MODE. Stops collecting data when full
Deepti 0:9e645e6ed2ce 338 * 0 | 1 | 0 | STREAM MODE: Keep the newest measurements in the FIFO
Deepti 0:9e645e6ed2ce 339 * 0 | 1 | 1 | STREAM MODE until trigger deasserted, then change to FIFO MODE
Deepti 0:9e645e6ed2ce 340 * 1 | 0 | 0 | BYPASS MODE until trigger deasserted, then STREAM MODE
Deepti 0:9e645e6ed2ce 341 * 1 | 0 | 1 | Reserved
Deepti 0:9e645e6ed2ce 342 * 1 | 1 | 0 | FIFO_MEAN MODE: Fifo is used to generate a running average filtered pressure
Deepti 0:9e645e6ed2ce 343 * 1 | 1 | 1 | BYPASS mode until trigger deasserted, then FIFO MODE
Deepti 0:9e645e6ed2ce 344 *
Deepti 0:9e645e6ed2ce 345 * 4:0 FIFO Mean Mode Sample size
Deepti 0:9e645e6ed2ce 346 * WTM_POINT4 | WTM_POINT4 | WTM_POINT4 | WTM_POINT4 | WTM_POINT4 | Sample Size
Deepti 0:9e645e6ed2ce 347 * ----------------------------------------------------------------------------------
Deepti 0:9e645e6ed2ce 348 * 0 | 0 | 0 | 0 | 1 | 2
Deepti 0:9e645e6ed2ce 349 * 0 | 0 | 0 | 1 | 1 | 4
Deepti 0:9e645e6ed2ce 350 * 0 | 0 | 1 | 1 | 1 | 8
Deepti 0:9e645e6ed2ce 351 * 0 | 1 | 1 | 1 | 1 | 16
Deepti 0:9e645e6ed2ce 352 * 1 | 1 | 1 | 1 | 1 | 32
Deepti 0:9e645e6ed2ce 353 * other values operation not guaranteed
Deepti 0:9e645e6ed2ce 354 * \endcode
Deepti 0:9e645e6ed2ce 355 */
Deepti 0:9e645e6ed2ce 356 #define LPS25H_CTRL_FIFO_ADDR 0x2E
Deepti 0:9e645e6ed2ce 357
Deepti 0:9e645e6ed2ce 358 /**
Deepti 0:9e645e6ed2ce 359 * @brief FIFO Status register
Deepti 0:9e645e6ed2ce 360 * \code
Deepti 0:9e645e6ed2ce 361 * Read/write
Deepti 0:9e645e6ed2ce 362 * Default value: 0x00
Deepti 0:9e645e6ed2ce 363 * 7 WTM_FIFO: Watermark status. 0:FIFO filling is lower than watermark level; 1: FIFO is equal or higher than watermark level.
Deepti 0:9e645e6ed2ce 364 * 6 FULL_FIFO: Overrun bit status. 0 - FIFO not full; 1 -FIFO is full.
Deepti 0:9e645e6ed2ce 365 * 5 EMPTY_FIFO: Empty FIFO bit. 0 - FIFO not empty; 1 -FIFO is empty.
Deepti 0:9e645e6ed2ce 366 * 4:0 DIFF_POINT4...0: FIFOsStored data level.
Deepti 0:9e645e6ed2ce 367 * \endcode
Deepti 0:9e645e6ed2ce 368 */
Deepti 0:9e645e6ed2ce 369 #define LPS25H_STATUS_FIFO_ADDR 0x2F
Deepti 0:9e645e6ed2ce 370
Deepti 0:9e645e6ed2ce 371 /**
Deepti 0:9e645e6ed2ce 372 * @brief Pressure offset register
Deepti 0:9e645e6ed2ce 373 * \code
Deepti 0:9e645e6ed2ce 374 * Read/write
Deepti 0:9e645e6ed2ce 375 * Default value: 0x00
Deepti 0:9e645e6ed2ce 376 * 7:0 RPDS15...8:Pressure Offset for 1 point calibration after soldering.
Deepti 0:9e645e6ed2ce 377 * \endcode
Deepti 0:9e645e6ed2ce 378 */
Deepti 0:9e645e6ed2ce 379 #define LPS25H_RPDS_TRIM_L_ADDR 0x39
Deepti 0:9e645e6ed2ce 380
Deepti 0:9e645e6ed2ce 381 /**
Deepti 0:9e645e6ed2ce 382 * @brief Pressure offset register
Deepti 0:9e645e6ed2ce 383 * \code
Deepti 0:9e645e6ed2ce 384 * Read/write
Deepti 0:9e645e6ed2ce 385 * Default value: 0x00
Deepti 0:9e645e6ed2ce 386 * 7:0 RPDS23...16:Pressure Offset for 1 point calibration after soldering.
Deepti 0:9e645e6ed2ce 387 * \endcode
Deepti 0:9e645e6ed2ce 388 */
Deepti 0:9e645e6ed2ce 389 #define LPS25H_RPDS_TRIM_H_ADDR 0x3A
Deepti 0:9e645e6ed2ce 390
Deepti 0:9e645e6ed2ce 391 /******************************************************************************/
Deepti 0:9e645e6ed2ce 392 /**************************** END REGISTER MAPPING ***************************/
Deepti 0:9e645e6ed2ce 393 /******************************************************************************/
Deepti 0:9e645e6ed2ce 394
Deepti 0:9e645e6ed2ce 395 /**
Deepti 0:9e645e6ed2ce 396 * @brief Device Address
Deepti 0:9e645e6ed2ce 397 */
Deepti 0:9e645e6ed2ce 398 #define LPS25H_ADDRESS_LOW 0xB8
Deepti 0:9e645e6ed2ce 399 #define LPS25H_ADDRESS_HIGH 0xBA
Deepti 0:9e645e6ed2ce 400
Deepti 0:9e645e6ed2ce 401
Deepti 0:9e645e6ed2ce 402 /**
Deepti 0:9e645e6ed2ce 403 * @brief Device Identifier. Default value of the WHO_AM_I register.
Deepti 0:9e645e6ed2ce 404 */
Deepti 0:9e645e6ed2ce 405 #define I_AM_LPS25H ((uint8_t)0xBD)
Deepti 0:9e645e6ed2ce 406
Deepti 0:9e645e6ed2ce 407 /** @defgroup Power_Mode_selection CTRL_REG1
Deepti 0:9e645e6ed2ce 408 * @{
Deepti 0:9e645e6ed2ce 409 */
Deepti 0:9e645e6ed2ce 410 #define LPS25H_MODE_POWERDOWN ((uint8_t)0x00)
Deepti 0:9e645e6ed2ce 411 #define LPS25H_MODE_ACTIVE ((uint8_t)0x80)
Deepti 0:9e645e6ed2ce 412
Deepti 0:9e645e6ed2ce 413 #define LPS25H_MODE_MASK ((uint8_t)0x80)
Deepti 0:9e645e6ed2ce 414 /**
Deepti 0:9e645e6ed2ce 415 * @}
Deepti 0:9e645e6ed2ce 416 */
Deepti 0:9e645e6ed2ce 417
Deepti 0:9e645e6ed2ce 418 /** @defgroup LPS25H Output Data Rate selection CTRL_REG1
Deepti 0:9e645e6ed2ce 419 * @{
Deepti 0:9e645e6ed2ce 420 */
Deepti 0:9e645e6ed2ce 421 #define LPS25H_ODR_ONE_SHOT ((uint8_t)0x00) /*!< Output Data Rate: P - one shot, T - one shot */
Deepti 0:9e645e6ed2ce 422 #define LPS25H_ODR_1Hz ((uint8_t)0x10) /*!< Output Data Rate: P - 1Hz, T - 1Hz */
Deepti 0:9e645e6ed2ce 423 #define LPS25H_ODR_7Hz ((uint8_t)0x20) /*!< Output Data Rate: P - 7Hz, T - 7Hz */
Deepti 0:9e645e6ed2ce 424 #define LPS25H_ODR_12_5Hz ((uint8_t)0x30) /*!< Output Data Rate: P - 12.5Hz, T - 12.5Hz */
Deepti 0:9e645e6ed2ce 425 #define LPS25H_ODR_25Hz ((uint8_t)0x40) /*!< Output Data Rate: P - 25Hz, T - 25Hz */
Deepti 0:9e645e6ed2ce 426
Deepti 0:9e645e6ed2ce 427 #define LPS25H_ODR_MASK ((uint8_t)0x70)
Deepti 0:9e645e6ed2ce 428 /**
Deepti 0:9e645e6ed2ce 429 * @}
Deepti 0:9e645e6ed2ce 430 */
Deepti 0:9e645e6ed2ce 431
Deepti 0:9e645e6ed2ce 432 /** @defgroup LPS25H Interrupt circuit enable CTRL_REG1
Deepti 0:9e645e6ed2ce 433 * @{
Deepti 0:9e645e6ed2ce 434 */
Deepti 0:9e645e6ed2ce 435 #define LPS25H_DIFF_DISABLE ((uint8_t)0x00) /*!< interrupt circuit enabled */
Deepti 0:9e645e6ed2ce 436 #define LPS25H_DIFF_ENABLE ((uint8_t)0x08) /*!< interrupt generation disabled */
Deepti 0:9e645e6ed2ce 437
Deepti 0:9e645e6ed2ce 438 #define LPS25H_DIFF_EN_MASK ((uint8_t)0x08)
Deepti 0:9e645e6ed2ce 439 /**
Deepti 0:9e645e6ed2ce 440 * @}
Deepti 0:9e645e6ed2ce 441 */
Deepti 0:9e645e6ed2ce 442
Deepti 0:9e645e6ed2ce 443 /** @defgroup LPS25H block data update CTRL_REG1
Deepti 0:9e645e6ed2ce 444 * @{
Deepti 0:9e645e6ed2ce 445 */
Deepti 0:9e645e6ed2ce 446 #define LPS25H_BDU_CONT ((uint8_t)0x00) /*!< continuous update */
Deepti 0:9e645e6ed2ce 447 #define LPS25H_BDU_READ ((uint8_t)0x04) /*!< output registers not updated until MSB and LSB reading */
Deepti 0:9e645e6ed2ce 448
Deepti 0:9e645e6ed2ce 449 #define LPS25H_BDU_MASK ((uint8_t)0x04)
Deepti 0:9e645e6ed2ce 450 /**
Deepti 0:9e645e6ed2ce 451 * @}
Deepti 0:9e645e6ed2ce 452 */
Deepti 0:9e645e6ed2ce 453
Deepti 0:9e645e6ed2ce 454 /** @defgroup LPS25H SPI Serial Interface Mode selection CTRL_REG1
Deepti 0:9e645e6ed2ce 455 * @{
Deepti 0:9e645e6ed2ce 456 */
Deepti 0:9e645e6ed2ce 457 #define LPS25H_SPI_SIM_4W ((uint8_t)0x00) /*!< 4-wire interface */
Deepti 0:9e645e6ed2ce 458 #define LPS25H_SPI_SIM_3W ((uint8_t)0x01) /*!< 3-wire interface */
Deepti 0:9e645e6ed2ce 459
Deepti 0:9e645e6ed2ce 460 #define LPS25H_SPI_SIM_MASK ((uint8_t)0x01)
Deepti 0:9e645e6ed2ce 461 /**
Deepti 0:9e645e6ed2ce 462 * @}
Deepti 0:9e645e6ed2ce 463 */
Deepti 0:9e645e6ed2ce 464
Deepti 0:9e645e6ed2ce 465 /** @defgroup LPS25H o refresh the content of the internal registers stored in the Flash memory
Deepti 0:9e645e6ed2ce 466 block CTRL_REG2
Deepti 0:9e645e6ed2ce 467 * @{
Deepti 0:9e645e6ed2ce 468 */
Deepti 0:9e645e6ed2ce 469 #define LPS25H_NORMAL_MODE ((uint8_t)0x00)
Deepti 0:9e645e6ed2ce 470 #define LPS25H_RESET_MEMORY ((uint8_t)0x80)
Deepti 0:9e645e6ed2ce 471
Deepti 0:9e645e6ed2ce 472 #define LPS25H_RESET_MEMORY_MASK ((uint8_t)0x80)
Deepti 0:9e645e6ed2ce 473 /**
Deepti 0:9e645e6ed2ce 474 * @}
Deepti 0:9e645e6ed2ce 475 */
Deepti 0:9e645e6ed2ce 476
Deepti 0:9e645e6ed2ce 477 /** @defgroup LPS25H Pressure resolution selection RES_CONF
Deepti 0:9e645e6ed2ce 478 * @{
Deepti 0:9e645e6ed2ce 479 */
Deepti 0:9e645e6ed2ce 480 #define LPS25H_P_RES_AVG_8 ((uint8_t)0x00)
Deepti 0:9e645e6ed2ce 481 #define LPS25H_P_RES_AVG_32 ((uint8_t)0x01)
Deepti 0:9e645e6ed2ce 482 #define LPS25H_P_RES_AVG_128 ((uint8_t)0x02)
Deepti 0:9e645e6ed2ce 483 #define LPS25H_P_RES_AVG_512 ((uint8_t)0x03)
Deepti 0:9e645e6ed2ce 484
Deepti 0:9e645e6ed2ce 485 #define LPS25H_P_RES_MASK ((uint8_t)0x03)
Deepti 0:9e645e6ed2ce 486 /**
Deepti 0:9e645e6ed2ce 487 * @}
Deepti 0:9e645e6ed2ce 488 */
Deepti 0:9e645e6ed2ce 489
Deepti 0:9e645e6ed2ce 490 /** @defgroup LPS25H Temperature resolution RES_CONF
Deepti 0:9e645e6ed2ce 491 * @{
Deepti 0:9e645e6ed2ce 492 */
Deepti 0:9e645e6ed2ce 493 #define LPS25H_T_RES_AVG_8 ((uint8_t)0x00)
Deepti 0:9e645e6ed2ce 494 #define LPS25H_T_RES_AVG_16 ((uint8_t)0x04)
Deepti 0:9e645e6ed2ce 495 #define LPS25H_T_RES_AVG_32 ((uint8_t)0x08)
Deepti 0:9e645e6ed2ce 496 #define LPS25H_T_RES_AVG_64 ((uint8_t)0x0C)
Deepti 0:9e645e6ed2ce 497
Deepti 0:9e645e6ed2ce 498 #define LPS25H_T_RES_MASK ((uint8_t)0x0C)
Deepti 0:9e645e6ed2ce 499 /**
Deepti 0:9e645e6ed2ce 500 * @}
Deepti 0:9e645e6ed2ce 501 */
Deepti 0:9e645e6ed2ce 502
Deepti 0:9e645e6ed2ce 503 #define LPS25H_SA0_LOW ((uint8_t)0x00)
Deepti 0:9e645e6ed2ce 504 #define LPS25H_SA0_HIGH ((uint8_t)0x01)
Deepti 0:9e645e6ed2ce 505
Deepti 0:9e645e6ed2ce 506 ///**
Deepti 0:9e645e6ed2ce 507 // * @brief LPS25H Output Data Rate
Deepti 0:9e645e6ed2ce 508 // */
Deepti 0:9e645e6ed2ce 509 //typedef enum {
Deepti 0:9e645e6ed2ce 510 // LPS25H_ODR_P_T_ONE_SHOT = 0x00, /*!< Output Data Rate: P - one shot, T - one shot */
Deepti 0:9e645e6ed2ce 511 // LPS25H_ODR_P_1HZ_T_1HZ = 0x10, /*!< Output Data Rate: P - 1Hz, T - 1Hz */
Deepti 0:9e645e6ed2ce 512 // LPS25H_ODR_P_7HZ_T_7HZ = 0x20, /*!< Output Data Rate: P - 7Hz, T - 7Hz */
Deepti 0:9e645e6ed2ce 513 // LPS25H_ODR_P_12_5HZ_T_12_5HZ = 0x30, /*!< Output Data Rate: P - 12.5Hz, T - 12.5Hz */
Deepti 0:9e645e6ed2ce 514 // LPS25H_ODR_P_25HZ_T_25HZ = 0x40 /*!< Output Data Rate: P - 25Hz, T - 25Hz */
Deepti 0:9e645e6ed2ce 515 //} LPS25H_OutputDataRate;
Deepti 0:9e645e6ed2ce 516
Deepti 0:9e645e6ed2ce 517 ///**
Deepti 0:9e645e6ed2ce 518 // * @brief LPS25H Pressure resolution
Deepti 0:9e645e6ed2ce 519 // */
Deepti 0:9e645e6ed2ce 520 //typedef enum {
Deepti 0:9e645e6ed2ce 521 // LPS25H_PRESS_AVG_8 = 0x00, /*!< Internal average on 8 sample */
Deepti 0:9e645e6ed2ce 522 // LPS25H_PRESS_AVG_32 = 0x01, /*!< Internal average on 32 sample */
Deepti 0:9e645e6ed2ce 523 // LPS25H_PRESS_AVG_128 = 0x02, /*!< Internal average on 128 sample */
Deepti 0:9e645e6ed2ce 524 // LPS25H_PRESS_AVG_512 = 0x03 /*!< Internal average on 512 sample */
Deepti 0:9e645e6ed2ce 525 //} LPS25H_PressureResolution;
Deepti 0:9e645e6ed2ce 526
Deepti 0:9e645e6ed2ce 527 ///**
Deepti 0:9e645e6ed2ce 528 // * @brief LPS25H Temperature resolution
Deepti 0:9e645e6ed2ce 529 // */
Deepti 0:9e645e6ed2ce 530 //typedef enum {
Deepti 0:9e645e6ed2ce 531 // LPS25H_TEMP_AVG_8 = 0x00, /*!< Internal average on 8 sample */
Deepti 0:9e645e6ed2ce 532 // LPS25H_TEMP_AVG_16 = 0x10, /*!< Internal average on 16 sample */
Deepti 0:9e645e6ed2ce 533 // LPS25H_TEMP_AVG_32 = 0x20, /*!< Internal average on 32 sample */
Deepti 0:9e645e6ed2ce 534 // LPS25H_TEMP_AVG_64 = 0x30 /*!< Internal average on 64 sample */
Deepti 0:9e645e6ed2ce 535 //} LPS25H_TemperatureResolution;
Deepti 0:9e645e6ed2ce 536 //
Deepti 0:9e645e6ed2ce 537 ///**
Deepti 0:9e645e6ed2ce 538 // * @addtogroup LPS25H_Structures
Deepti 0:9e645e6ed2ce 539 // * @{
Deepti 0:9e645e6ed2ce 540 // */
Deepti 0:9e645e6ed2ce 541 //
Deepti 0:9e645e6ed2ce 542 ///**
Deepti 0:9e645e6ed2ce 543 // * @brief LPS25H Irq list
Deepti 0:9e645e6ed2ce 544 // */
Deepti 0:9e645e6ed2ce 545 //typedef enum {
Deepti 0:9e645e6ed2ce 546 // LPS25H_DATA = 0x00,
Deepti 0:9e645e6ed2ce 547 // LPS25H_P_HIGH = 0x01,
Deepti 0:9e645e6ed2ce 548 // LPS25H_P_LOW = 0x02,
Deepti 0:9e645e6ed2ce 549 // LPS25H_P_LOW_HIGH = 0x03
Deepti 0:9e645e6ed2ce 550 //} LPS25H_IrqList;
Deepti 0:9e645e6ed2ce 551 //
Deepti 0:9e645e6ed2ce 552 ///**
Deepti 0:9e645e6ed2ce 553 // * @brief LPS25H Irq pin output configuration
Deepti 0:9e645e6ed2ce 554 // */
Deepti 0:9e645e6ed2ce 555 //typedef enum {
Deepti 0:9e645e6ed2ce 556 // LPS25H_PP = 0x00,
Deepti 0:9e645e6ed2ce 557 // LPS25H_OD = 0x40
Deepti 0:9e645e6ed2ce 558 //} LPS25H_OutputType;
Deepti 0:9e645e6ed2ce 559 //
Deepti 0:9e645e6ed2ce 560 ///**
Deepti 0:9e645e6ed2ce 561 // * @brief LPS25H Irq configuration
Deepti 0:9e645e6ed2ce 562 // */
Deepti 0:9e645e6ed2ce 563 //typedef enum {
Deepti 0:9e645e6ed2ce 564 // LPS25H_EMPTY = 0x08,
Deepti 0:9e645e6ed2ce 565 // LPS25H_WTM = 0x04,
Deepti 0:9e645e6ed2ce 566 // LPS25H_OVR = 0x02,
Deepti 0:9e645e6ed2ce 567 // LPS25H_DATA_READY = 0x01
Deepti 0:9e645e6ed2ce 568 //} LPS25H_DataSignalType;
Deepti 0:9e645e6ed2ce 569
Deepti 0:9e645e6ed2ce 570 /**
Deepti 0:9e645e6ed2ce 571 * @}
Deepti 0:9e645e6ed2ce 572 */
Deepti 0:9e645e6ed2ce 573
Deepti 0:9e645e6ed2ce 574 /** @defgroup LPS25H_Exported_Functions
Deepti 0:9e645e6ed2ce 575 * @{
Deepti 0:9e645e6ed2ce 576 */
Deepti 0:9e645e6ed2ce 577 /* Sensor Configuration Functions */
Deepti 0:9e645e6ed2ce 578 void LPS25H_Init(PRESSURE_InitTypeDef *LPS25H_Init);
Deepti 0:9e645e6ed2ce 579 uint8_t LPS25H_ReadID(void);
Deepti 0:9e645e6ed2ce 580 void LPS25H_RebootCmd(void);
Deepti 0:9e645e6ed2ce 581 void LPS25H_GetPressure(float* pfData);
Deepti 0:9e645e6ed2ce 582 void LPS25H_GetTemperature(float* pfData);
Deepti 0:9e645e6ed2ce 583 void LPS25H_PowerOff(void);
Deepti 0:9e645e6ed2ce 584 void LPS25H_SlaveAddrRemap(uint8_t);
Deepti 0:9e645e6ed2ce 585
Deepti 0:9e645e6ed2ce 586 /* Interrupt Configuration Functions */
Deepti 0:9e645e6ed2ce 587 void LPS25H_INT1InterruptConfig(uint16_t Int1Config);
Deepti 0:9e645e6ed2ce 588 void LPS25H_EnableIT(void);
Deepti 0:9e645e6ed2ce 589 void LPS25H_DisableIT(void);
Deepti 0:9e645e6ed2ce 590
Deepti 0:9e645e6ed2ce 591 /* Pressure sensor driver structure */
Deepti 0:9e645e6ed2ce 592 extern PRESSURE_DrvTypeDef LPS25HDrv;
Deepti 0:9e645e6ed2ce 593
Deepti 0:9e645e6ed2ce 594 /* Pressure sensor IO functions */
Deepti 0:9e645e6ed2ce 595 void PRESSURE_IO_Init(void);
Deepti 0:9e645e6ed2ce 596 void PRESSURE_IO_DeInit(void);
Deepti 0:9e645e6ed2ce 597 void PRESSURE_IO_Write(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t WriteAddr,
Deepti 0:9e645e6ed2ce 598 uint16_t NumByteToWrite);
Deepti 0:9e645e6ed2ce 599 void PRESSURE_IO_Read(uint8_t* pBuffer, uint8_t DeviceAddr,
Deepti 0:9e645e6ed2ce 600 uint8_t RegisterAddr, uint16_t NumByteToRead);
Deepti 0:9e645e6ed2ce 601
Deepti 0:9e645e6ed2ce 602 /**
Deepti 0:9e645e6ed2ce 603 * @}
Deepti 0:9e645e6ed2ce 604 */
Deepti 0:9e645e6ed2ce 605
Deepti 0:9e645e6ed2ce 606 /**
Deepti 0:9e645e6ed2ce 607 * @}
Deepti 0:9e645e6ed2ce 608 */
Deepti 0:9e645e6ed2ce 609
Deepti 0:9e645e6ed2ce 610 /**
Deepti 0:9e645e6ed2ce 611 * @}
Deepti 0:9e645e6ed2ce 612 */
Deepti 0:9e645e6ed2ce 613
Deepti 0:9e645e6ed2ce 614 #ifdef __cplusplus
Deepti 0:9e645e6ed2ce 615 }
Deepti 0:9e645e6ed2ce 616 #endif
Deepti 0:9e645e6ed2ce 617
Deepti 0:9e645e6ed2ce 618 #endif /* __LPS25H_H */
Deepti 0:9e645e6ed2ce 619
Deepti 0:9e645e6ed2ce 620 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Deepti 0:9e645e6ed2ce 621