Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: VL53L0X
Fork of BSP_B-L475E-IOT01 by
lps22hb.h
00001 /** 00002 ****************************************************************************** 00003 * @file lps22hb.h 00004 * @author MCD Application Team 00005 * @version V1.0.0 00006 * @date 14-February-2017 00007 * @brief LPS22HB header driver file 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 __LPS22HB__H 00040 #define __LPS22HB__H 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00046 /* Includes ------------------------------------------------------------------*/ 00047 #include "../Common/psensor.h" 00048 #include "../Common/tsensor.h" 00049 00050 /** @addtogroup BSP 00051 * @{ 00052 */ 00053 00054 /** @addtogroup Component 00055 * @{ 00056 */ 00057 00058 /** @addtogroup LPS22HB 00059 * @{ 00060 */ 00061 00062 /** @defgroup LPS22HB_Exported_Macros LPS22HB Exported Macros 00063 * @{ 00064 */ 00065 00066 /** 00067 * @brief Bitfield positioning. 00068 */ 00069 #define LPS22HB_BIT(x) ((uint8_t)x) 00070 /** 00071 * @} 00072 */ 00073 00074 00075 /** @defgroup LPS22HB_Exported_Constants LPS22HB Exported Constants 00076 * @{ 00077 */ 00078 00079 /** 00080 * @brief Device Identification register. 00081 * Read 00082 * Default value: 0xB1 00083 * 7:0 This read-only register contains the device identifier that, for LPS22HB, is set to B1h. 00084 */ 00085 00086 #define LPS22HB_WHO_AM_I_REG (uint8_t)0x0F 00087 00088 /** 00089 * @brief Device Identification value. 00090 */ 00091 #define LPS22HB_WHO_AM_I_VAL (uint8_t)0xB1 00092 00093 /** 00094 * @brief Reference Pressure Register(LSB data) 00095 * Read/write 00096 * Default value: 0x00 00097 * 7:0 REFL7-0: Lower part of the reference pressure value that 00098 * is sum to the sensor output pressure. 00099 */ 00100 #define LPS22HB_REF_P_XL_REG (uint8_t)0x15 00101 00102 /** 00103 * @brief Reference Pressure Register (Middle data) 00104 * Read/write 00105 * Default value: 0x00 00106 * 7:0 REFL15-8: Middle part of the reference pressure value that 00107 * is sum to the sensor output pressure. 00108 */ 00109 #define LPS22HB_REF_P_L_REG (uint8_t)0x16 00110 00111 /** 00112 * @brief Reference Pressure Register (MSB data) 00113 * Read/write 00114 * Default value: 0x00 00115 * 7:0 REFL23-16 Higest part of the reference pressure value that 00116 * is sum to the sensor output pressure. 00117 */ 00118 #define LPS22HB_REF_P_H_REG (uint8_t)0x17 00119 00120 /** 00121 * @brief Pressure and temperature resolution mode Register 00122 * Read/write 00123 * Default value: 0x05 00124 * 7:2 These bits must be set to 0 for proper operation of the device 00125 * 1: Reserved 00126 * 0 LC_EN: Low Current Mode Enable. Default 0 00127 */ 00128 #define LPS22HB_RES_CONF_REG (uint8_t)0x1A 00129 #define LPS22HB_LCEN_MASK (uint8_t)0x01 00130 00131 /** 00132 * @brief Control Register 1 00133 * Read/write 00134 * Default value: 0x00 00135 * 7: This bit must be set to 0 for proper operation of the device 00136 * 6:4 ODR2, ODR1, ODR0: output data rate selection.Default 000 00137 * ODR2 | ODR1 | ODR0 | Pressure output data-rate(Hz) | Pressure output data-rate(Hz) 00138 * ---------------------------------------------------------------------------------- 00139 * 0 | 0 | 0 | one shot | one shot 00140 * 0 | 0 | 1 | 1 | 1 00141 * 0 | 1 | 0 | 10 | 10 00142 * 0 | 1 | 1 | 25 | 25 00143 * 1 | 0 | 0 | 50 | 50 00144 * 1 | 0 | 1 | 75 | 75 00145 * 1 | 1 | 0 | Reserved | Reserved 00146 * 1 | 1 | 1 | Reserved | Reserved 00147 * 00148 * 3 EN_LPFP: Enable Low Pass filter on Pressure data. Default value:0 00149 * 2:LPF_CFG Low-pass configuration register. (0: Filter cutoff is ODR/9; 1: filter cutoff is ODR/20) 00150 * 1 BDU: block data update. 0 - continuous update; 1 - output registers not updated until MSB and LSB reading. 00151 * 0 SIM: SPI Serial Interface Mode selection. 0 - SPI 4-wire; 1 - SPI 3-wire 00152 */ 00153 #define LPS22HB_CTRL_REG1 (uint8_t)0x10 00154 00155 #define LPS22HB_ODR_MASK (uint8_t)0x70 00156 #define LPS22HB_LPFP_MASK (uint8_t)0x08 00157 #define LPS22HB_LPFP_CUTOFF_MASK (uint8_t)0x04 00158 #define LPS22HB_BDU_MASK (uint8_t)0x02 00159 #define LPS22HB_SIM_MASK (uint8_t)0x01 00160 00161 #define LPS22HB_LPFP_BIT LPS22HB_BIT(3) 00162 00163 /** 00164 * @brief Control Register 2 00165 * Read/write 00166 * Default value: 0x10 00167 * 7 BOOT: Reboot memory content. 0: normal mode; 1: reboot memory content. Self-clearing upon completation 00168 * 6 FIFO_EN: FIFO Enable. 0: disable; 1: enable 00169 * 5 STOP_ON_FTH: Stop on FIFO Threshold FIFO Watermark level use. 0: disable; 1: enable 00170 * 4 IF_ADD_INC: Register address automatically incrementeed during a multiple byte access with a serial interface (I2C or SPI). 00171 * Default value 1.( 0: disable; 1: enable) 00172 * 3 I2C DIS: Disable I2C interface 0: I2C Enabled; 1: I2C disabled 00173 * 2 SWRESET: Software reset. 0: normal mode; 1: SW reset. Self-clearing upon completation 00174 * 1 AUTO_ZERO: Autozero enable. 0: normal mode; 1: autozero enable. 00175 * 0 ONE_SHOT: One shot enable. 0: waiting for start of conversion; 1: start for a new dataset 00176 */ 00177 #define LPS22HB_CTRL_REG2 (uint8_t)0x11 00178 00179 #define LPS22HB_BOOT_BIT LPS22HB_BIT(7) 00180 #define LPS22HB_FIFO_EN_BIT LPS22HB_BIT(6) 00181 #define LPS22HB_WTM_EN_BIT LPS22HB_BIT(5) 00182 #define LPS22HB_ADD_INC_BIT LPS22HB_BIT(4) 00183 #define LPS22HB_I2C_BIT LPS22HB_BIT(3) 00184 #define LPS22HB_SW_RESET_BIT LPS22HB_BIT(2) 00185 00186 #define LPS22HB_FIFO_EN_MASK (uint8_t)0x40 00187 #define LPS22HB_WTM_EN_MASK (uint8_t)0x20 00188 #define LPS22HB_ADD_INC_MASK (uint8_t)0x10 00189 #define LPS22HB_I2C_MASK (uint8_t)0x08 00190 #define LPS22HB_ONE_SHOT_MASK (uint8_t)0x01 00191 00192 00193 /** 00194 * @brief CTRL Reg3 Interrupt Control Register 00195 * Read/write 00196 * Default value: 0x00 00197 * 7 INT_H_L: Interrupt active high, low. 0:active high; 1: active low. 00198 * 6 PP_OD: Push-Pull/OpenDrain selection on interrupt pads. 0: Push-pull; 1: open drain. 00199 * 5 F_FSS5: FIFO full flag on INT_DRDY pin. Defaul value: 0. (0: Diasable; 1 : Enable). 00200 * 4 F_FTH: FIFO threshold (watermark) status on INT_DRDY pin. Defaul value: 0. (0: Diasable; 1 : Enable). 00201 * 3 F_OVR: FIFO overrun interrupt on INT_DRDY pin. Defaul value: 0. (0: Diasable; 1 : Enable). 00202 * 2 DRDY: Data-ready signal on INT_DRDY pin. Defaul value: 0. (0: Diasable; 1 : Enable). 00203 * 1:0 INT_S2, INT_S1: data signal on INT pad control bits. 00204 * INT_S2 | INT_S1 | INT pin 00205 * ------------------------------------------------------ 00206 * 0 | 0 | Data signal( in order of priority:PTH_DRDY or F_FTH or F_OVR_or F_FSS5 00207 * 0 | 1 | Pressure high (P_high) 00208 * 1 | 0 | Pressure low (P_low) 00209 * 1 | 1 | P_low OR P_high 00210 */ 00211 #define LPS22HB_CTRL_REG3 (uint8_t)0x12 00212 00213 #define LPS22HB_PP_OD_BIT LPS22HB_BIT(6) 00214 #define LPS22HB_FIFO_FULL_BIT LPS22HB_BIT(5) 00215 #define LPS22HB_FIFO_FTH_BIT LPS22HB_BIT(4) 00216 #define LPS22HB_FIFO_OVR_BIT LPS22HB_BIT(3) 00217 #define LPS22HB_DRDY_BIT LPS22HB_BIT(2) 00218 00219 00220 #define LPS22HB_INT_H_L_MASK (uint8_t)0x80 00221 #define LPS22HB_PP_OD_MASK (uint8_t)0x40 00222 #define LPS22HB_FIFO_FULL_MASK (uint8_t)0x20 00223 #define LPS22HB_FIFO_FTH_MASK (uint8_t)0x10 00224 #define LPS22HB_FIFO_OVR_MASK (uint8_t)0x08 00225 #define LPS22HB_DRDY_MASK (uint8_t)0x04 00226 #define LPS22HB_INT_S12_MASK (uint8_t)0x03 00227 00228 00229 /** 00230 * @brief Interrupt Differential configuration Register 00231 * Read/write 00232 * Default value: 0x00. 00233 * 7 AUTORIFP: AutoRifP Enable 00234 * 6 RESET_ARP: Reset AutoRifP function 00235 * 4 AUTOZERO: Autozero enabled 00236 * 5 RESET_AZ: Reset Autozero Function 00237 * 3 DIFF_EN: Interrupt generation enable 00238 * 2 LIR: Latch Interrupt request into INT_SOURCE register. 0 - interrupt request not latched 00239 * 1 - interrupt request latched 00240 * 1 PL_E: Enable interrupt generation on differential pressure low event. 0 - disable; 1 - enable 00241 * 0 PH_E: Enable interrupt generation on differential pressure high event. 0 - disable; 1 - enable 00242 */ 00243 #define LPS22HB_INTERRUPT_CFG_REG (uint8_t)0x0B 00244 00245 #define LPS22HB_DIFF_EN_BIT LPS22HB_BIT(3) 00246 #define LPS22HB_LIR_BIT LPS22HB_BIT(2) 00247 #define LPS22HB_PLE_BIT LPS22HB_BIT(1) 00248 #define LPS22HB_PHE_BIT LPS22HB_BIT(0) 00249 00250 #define LPS22HB_AUTORIFP_MASK (uint8_t)0x80 00251 #define LPS22HB_RESET_ARP_MASK (uint8_t)0x40 00252 #define LPS22HB_AUTOZERO_MASK (uint8_t)0x20 00253 #define LPS22HB_RESET_AZ_MASK (uint8_t)0x10 00254 #define LPS22HB_DIFF_EN_MASK (uint8_t)0x08 00255 #define LPS22HB_LIR_MASK (uint8_t)0x04 00256 #define LPS22HB_PLE_MASK (uint8_t)0x02 00257 #define LPS22HB_PHE_MASK (uint8_t)0x01 00258 00259 00260 00261 /** 00262 * @brief Interrupt source Register (It is cleared by reading it) 00263 * Read 00264 * 7 BOOT_STATUS: If 1 indicates that the Boot (Reboot) phase is running. 00265 * 6:3 Reserved: Keep these bits at 0 00266 * 2 IA: Interrupt Active.0: no interrupt has been generated 00267 * 1: one or more interrupt events have been generated. 00268 * 1 PL: Differential pressure Low. 0: no interrupt has been generated 00269 * 1: Low differential pressure event has occurred. 00270 * 0 PH: Differential pressure High. 0: no interrupt has been generated 00271 * 1: High differential pressure event has occurred. 00272 */ 00273 #define LPS22HB_INTERRUPT_SOURCE_REG (uint8_t)0x25 00274 00275 #define LPS22HB_BOOT_STATUS_BIT LPS22HB_BIT(7) 00276 #define LPS22HB_IA_BIT LPS22HB_BIT(2) 00277 #define LPS22HB_PL_BIT LPS22HB_BIT(1) 00278 #define LPS22HB_PH_BIT LPS22HB_BIT(0) 00279 00280 #define LPS22HB_BOOT_STATUS_MASK (uint8_t)0x80 00281 #define LPS22HB_IA_MASK (uint8_t)0x04 00282 #define LPS22HB_PL_MASK (uint8_t)0x02 00283 #define LPS22HB_PH_MASK (uint8_t)0x01 00284 00285 00286 /** 00287 * @brief Status Register 00288 * Read 00289 * 7:6 Reserved: 0 00290 * 5 T_OR: Temperature data overrun. 0: no overrun has occurred 00291 * 1: a new data for temperature has overwritten the previous one. 00292 * 4 P_OR: Pressure data overrun. 0: no overrun has occurred 00293 * 1: new data for pressure has overwritten the previous one. 00294 * 3:2 Reserved: 0 00295 * 1 T_DA: Temperature data available. 0: new data for temperature is not yet available 00296 * 1: new data for temperature is available. 00297 * 0 P_DA: Pressure data available. 0: new data for pressure is not yet available 00298 * 1: new data for pressure is available. 00299 */ 00300 #define LPS22HB_STATUS_REG (uint8_t)0x27 00301 00302 #define LPS22HB_TOR_BIT LPS22HB_BIT(5) 00303 #define LPS22HB_POR_BIT LPS22HB_BIT(4) 00304 #define LPS22HB_TDA_BIT LPS22HB_BIT(1) 00305 #define LPS22HB_PDA_BIT LPS22HB_BIT(0) 00306 00307 #define LPS22HB_TOR_MASK (uint8_t)0x20 00308 #define LPS22HB_POR_MASK (uint8_t)0x10 00309 #define LPS22HB_TDA_MASK (uint8_t)0x02 00310 #define LPS22HB_PDA_MASK (uint8_t)0x01 00311 00312 00313 /** 00314 * @brief Pressure data (LSB) register. 00315 * Read 00316 * Default value: 0x00.(To be verified) 00317 * POUT7 - POUT0: Pressure data LSB (2's complement). 00318 * Pressure output data: Pout(hPA)=(PRESS_OUT_H & PRESS_OUT_L & 00319 * PRESS_OUT_XL)[dec]/4096. 00320 */ 00321 #define LPS22HB_PRESS_OUT_XL_REG (uint8_t)0x28 00322 00323 /** 00324 * @brief Pressure data (Middle part) register. 00325 * Read 00326 * Default value: 0x80. 00327 * POUT15 - POUT8: Pressure data middle part (2's complement). 00328 * Pressure output data: Pout(hPA)=(PRESS_OUT_H & PRESS_OUT_L & 00329 * PRESS_OUT_XL)[dec]/4096. 00330 */ 00331 #define LPS22HB_PRESS_OUT_L_REG (uint8_t)0x29 00332 00333 /** 00334 * @brief Pressure data (MSB) register. 00335 * Read 00336 * Default value: 0x2F. 00337 * POUT23 - POUT16: Pressure data MSB (2's complement). 00338 * Pressure output data: Pout(hPA)=(PRESS_OUT_H & PRESS_OUT_L & 00339 * PRESS_OUT_XL)[dec]/4096. 00340 */ 00341 #define LPS22HB_PRESS_OUT_H_REG (uint8_t)0x2A 00342 00343 /** 00344 * @brief Temperature data (LSB) register. 00345 * Read 00346 * Default value: 0x00. 00347 * TOUT7 - TOUT0: temperature data LSB. 00348 * Tout(degC)=TEMP_OUT/100 00349 */ 00350 #define LPS22HB_TEMP_OUT_L_REG (uint8_t)0x2B 00351 00352 /** 00353 * @brief Temperature data (MSB) register. 00354 * Read 00355 * Default value: 0x00. 00356 * TOUT15 - TOUT8: temperature data MSB. 00357 * Tout(degC)=TEMP_OUT/100 00358 */ 00359 #define LPS22HBH_TEMP_OUT_H_REG (uint8_t)0x2C 00360 00361 /** 00362 * @brief Threshold pressure (LSB) register. 00363 * Read/write 00364 * Default value: 0x00. 00365 * 7:0 THS7-THS0: LSB Threshold pressure Low part of threshold value for pressure interrupt 00366 * generation. The complete threshold value is given by THS_P_H & THS_P_L and is 00367 * expressed as unsigned number. P_ths(hPA)=(THS_P_H & THS_P_L)[dec]/16. 00368 */ 00369 #define LPS22HB_THS_P_LOW_REG (uint8_t)0x0C 00370 00371 /** 00372 * @brief Threshold pressure (MSB) 00373 * Read/write 00374 * Default value: 0x00. 00375 * 7:0 THS15-THS8: MSB Threshold pressure. High part of threshold value for pressure interrupt 00376 * generation. The complete threshold value is given by THS_P_H & THS_P_L and is 00377 * expressed as unsigned number. P_ths(mbar)=(THS_P_H & THS_P_L)[dec]/16. 00378 */ 00379 #define LPS22HB_THS_P_HIGH_REG (uint8_t)0x0D 00380 00381 /** 00382 * @brief FIFO control register 00383 * Read/write 00384 * Default value: 0x00 00385 * 7:5 F_MODE2, F_MODE1, F_MODE0: FIFO mode selection. 00386 * FM2 | FM1 | FM0 | FIFO MODE 00387 * --------------------------------------------------- 00388 * 0 | 0 | 0 | BYPASS MODE 00389 * 0 | 0 | 1 | FIFO MODE. Stops collecting data when full 00390 * 0 | 1 | 0 | STREAM MODE: Keep the newest measurements in the FIFO 00391 * 0 | 1 | 1 | STREAM MODE until trigger deasserted, then change to FIFO MODE 00392 * 1 | 0 | 0 | BYPASS MODE until trigger deasserted, then STREAM MODE 00393 * 1 | 0 | 1 | Reserved for future use 00394 * 1 | 1 | 0 | Reserved 00395 * 1 | 1 | 1 | BYPASS mode until trigger deasserted, then FIFO MODE 00396 * 00397 * 4:0 WTM_POINT4-0 : FIFO Watermark level selection (0-31) 00398 */ 00399 #define LPS22HB_CTRL_FIFO_REG (uint8_t)0x14 00400 00401 #define LPS22HB_FIFO_MODE_MASK (uint8_t)0xE0 00402 #define LPS22HB_WTM_POINT_MASK (uint8_t)0x1F 00403 00404 00405 /** 00406 * @brief FIFO Status register 00407 * Read 00408 * 7 FTH_FIFO: FIFO threshold status. 0:FIFO filling is lower than FTH level 00409 * 1: FIFO is equal or higher than FTH level. 00410 * 6 OVR: Overrun bit status. 0 - FIFO not full 00411 * 1 - FIFO is full and at least one sample in the FIFO has been overwritten. 00412 * 5:0 FSS: FIFO Stored data level. 000000: FIFO empty, 100000: FIFO is full and has 32 unread samples. 00413 */ 00414 #define LPS22HB_STATUS_FIFO_REG (uint8_t)0x26 00415 00416 #define LPS22HB_FTH_FIFO_BIT LPS22HB_BIT(7) 00417 #define LPS22HB_OVR_FIFO_BIT LPS22HB_BIT(6) 00418 00419 #define LPS22HB_FTH_FIFO_MASK (uint8_t)0x80 00420 #define LPS22HB_OVR_FIFO_MASK (uint8_t)0x40 00421 #define LPS22HB_LEVEL_FIFO_MASK (uint8_t)0x3F 00422 #define LPS22HB_FIFO_EMPTY (uint8_t)0x00 00423 #define LPS22HB_FIFO_FULL (uint8_t)0x20 00424 00425 00426 00427 /** 00428 * @brief Pressure offset register (LSB) 00429 * Read/write 00430 * Default value: 0x00 00431 * 7:0 RPDS7-0:Pressure Offset for 1 point calibration (OPC) after soldering. 00432 * This register contains the low part of the pressure offset value after soldering,for 00433 * differential pressure computing. The complete value is given by RPDS_L & RPDS_H 00434 * and is expressed as signed 2 complement value. 00435 */ 00436 #define LPS22HB_RPDS_L_REG (uint8_t)0x18 00437 00438 /** 00439 * @brief Pressure offset register (MSB) 00440 * Read/write 00441 * Default value: 0x00 00442 * 7:0 RPDS15-8:Pressure Offset for 1 point calibration (OPC) after soldering. 00443 * This register contains the high part of the pressure offset value after soldering (see description RPDS_L) 00444 */ 00445 #define LPS22HB_RPDS_H_REG (uint8_t)0x19 00446 00447 00448 /** 00449 * @brief Clock Tree Configuration register 00450 * Read/write 00451 * Default value: 0x00 00452 * 7:6 Reserved. 00453 * 5: CTE: Clock Tree Enhancement 00454 */ 00455 #define LPS22HB_CLOCK_TREE_CONFIGURATION (uint8_t)0x43 00456 #define LPS22HB_CTE_MASK (uint8_t)0x20 00457 00458 /** 00459 * @} 00460 */ 00461 00462 00463 /** @defgroup LPS22HB_Pressure_Exported_Functions LPS22HB Pressure Exported Functions 00464 * @{ 00465 */ 00466 /* PRESSURE functions */ 00467 void LPS22HB_P_Init(uint16_t DeviceAddr); 00468 uint8_t LPS22HB_P_ReadID(uint16_t DeviceAddr); 00469 float LPS22HB_P_ReadPressure(uint16_t DeviceAddr); 00470 /** 00471 * @} 00472 */ 00473 00474 /** @defgroup HTS221_PressImported_Globals PRESSURE Imported Globals 00475 * @{ 00476 */ 00477 /* PRESSURE driver structure */ 00478 extern PSENSOR_DrvTypeDef LPS22HB_P_Drv; 00479 /** 00480 * @} 00481 */ 00482 00483 /** @defgroup LPS22HB_Temperature_Exported_Functions LPS22HB Temperature Exported Functions 00484 * @{ 00485 */ 00486 /* TEMPERATURE functions */ 00487 void LPS22HB_T_Init(uint16_t DeviceAddr, TSENSOR_InitTypeDef *pInitStruct); 00488 float LPS22HB_T_ReadTemp(uint16_t DeviceAddr); 00489 /** 00490 * @} 00491 */ 00492 00493 /** @defgroup HTS221_TempImported_Globals Temperature Imported Globals 00494 * @{ 00495 */ 00496 /* Temperature driver structure */ 00497 extern TSENSOR_DrvTypeDef LPS22HB_T_Drv; 00498 /** 00499 * @} 00500 */ 00501 00502 /** @defgroup LPS22HB_Imported_Functions LPS22HB Imported Functions 00503 * @{ 00504 */ 00505 /* IO functions */ 00506 extern void SENSOR_IO_Init(void); 00507 extern void SENSOR_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); 00508 extern uint8_t SENSOR_IO_Read(uint8_t Addr, uint8_t Reg); 00509 extern uint16_t SENSOR_IO_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length); 00510 extern void SENSOR_IO_WriteMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length); 00511 00512 /** 00513 * @} 00514 */ 00515 00516 #ifdef __cplusplus 00517 } 00518 #endif 00519 00520 #endif /* __LPS22HB__H */ 00521 00522 /** 00523 * @} 00524 */ 00525 00526 /** 00527 * @} 00528 */ 00529 00530 /** 00531 * @} 00532 */ 00533 00534 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 15:06:31 by
1.7.2
