LCOV - code coverage report
Current view: top level - zephyr/drivers/sensor - bmp581_user.h Hit Total Coverage
Test: new.info Lines: 0 53 0.0 %
Date: 2024-12-22 00:14:23

          Line data    Source code
       1           0 : /*
       2             :  * Copyright (c) 2022 Badgerd Technologies B.V.
       3             :  *
       4             :  * SPDX-License-Identifier: Apache-2.0
       5             :  *
       6             :  * Driver is developed to be used with Zephyr. And it only supports i2c interface.
       7             :  *
       8             :  * Author: Talha Can Havadar <havadartalha@gmail.com>
       9             :  *
      10             :  */
      11             : 
      12             : #ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_BMP581_USER_H_
      13             : #define ZEPHYR_INCLUDE_DRIVERS_SENSOR_BMP581_USER_H_
      14             : 
      15             : #include <zephyr/drivers/sensor.h>
      16             : 
      17           0 : #define BMP5_SEA_LEVEL_PRESSURE_PA 101325
      18             : 
      19             : /* ODR settings */
      20           0 : #define BMP5_ODR_240_HZ   0x00
      21           0 : #define BMP5_ODR_218_5_HZ 0x01
      22           0 : #define BMP5_ODR_199_1_HZ 0x02
      23           0 : #define BMP5_ODR_179_2_HZ 0x03
      24           0 : #define BMP5_ODR_160_HZ   0x04
      25           0 : #define BMP5_ODR_149_3_HZ 0x05
      26           0 : #define BMP5_ODR_140_HZ   0x06
      27           0 : #define BMP5_ODR_129_8_HZ 0x07
      28           0 : #define BMP5_ODR_120_HZ   0x08
      29           0 : #define BMP5_ODR_110_1_HZ 0x09
      30           0 : #define BMP5_ODR_100_2_HZ 0x0A
      31           0 : #define BMP5_ODR_89_6_HZ  0x0B
      32           0 : #define BMP5_ODR_80_HZ    0x0C
      33           0 : #define BMP5_ODR_70_HZ    0x0D
      34           0 : #define BMP5_ODR_60_HZ    0x0E
      35           0 : #define BMP5_ODR_50_HZ    0x0F
      36           0 : #define BMP5_ODR_45_HZ    0x10
      37           0 : #define BMP5_ODR_40_HZ    0x11
      38           0 : #define BMP5_ODR_35_HZ    0x12
      39           0 : #define BMP5_ODR_30_HZ    0x13
      40           0 : #define BMP5_ODR_25_HZ    0x14
      41           0 : #define BMP5_ODR_20_HZ    0x15
      42           0 : #define BMP5_ODR_15_HZ    0x16
      43           0 : #define BMP5_ODR_10_HZ    0x17
      44           0 : #define BMP5_ODR_05_HZ    0x18
      45           0 : #define BMP5_ODR_04_HZ    0x19
      46           0 : #define BMP5_ODR_03_HZ    0x1A
      47           0 : #define BMP5_ODR_02_HZ    0x1B
      48           0 : #define BMP5_ODR_01_HZ    0x1C
      49           0 : #define BMP5_ODR_0_5_HZ   0x1D
      50           0 : #define BMP5_ODR_0_250_HZ 0x1E
      51           0 : #define BMP5_ODR_0_125_HZ 0x1F
      52             : 
      53             : /* Oversampling for temperature and pressure */
      54           0 : #define BMP5_OVERSAMPLING_1X   0x00
      55           0 : #define BMP5_OVERSAMPLING_2X   0x01
      56           0 : #define BMP5_OVERSAMPLING_4X   0x02
      57           0 : #define BMP5_OVERSAMPLING_8X   0x03
      58           0 : #define BMP5_OVERSAMPLING_16X  0x04
      59           0 : #define BMP5_OVERSAMPLING_32X  0x05
      60           0 : #define BMP5_OVERSAMPLING_64X  0x06
      61           0 : #define BMP5_OVERSAMPLING_128X 0x07
      62             : 
      63             : /* IIR filter for temperature and pressure */
      64           0 : #define BMP5_IIR_FILTER_BYPASS    0x00
      65           0 : #define BMP5_IIR_FILTER_COEFF_1   0x01
      66           0 : #define BMP5_IIR_FILTER_COEFF_3   0x02
      67           0 : #define BMP5_IIR_FILTER_COEFF_7   0x03
      68           0 : #define BMP5_IIR_FILTER_COEFF_15  0x04
      69           0 : #define BMP5_IIR_FILTER_COEFF_31  0x05
      70           0 : #define BMP5_IIR_FILTER_COEFF_63  0x06
      71           0 : #define BMP5_IIR_FILTER_COEFF_127 0x07
      72             : 
      73             : /* Custom ATTR values */
      74             : 
      75             : /* This is used to enable IIR config,
      76             :  * keep in mind that disabling IIR back in runtime is not
      77             :  * supported yet
      78             :  */
      79           0 : #define BMP5_ATTR_IIR_CONFIG (SENSOR_ATTR_PRIV_START + 1u)
      80           0 : #define BMP5_ATTR_POWER_MODE (SENSOR_ATTR_PRIV_START + 2u)
      81             : 
      82           0 : enum bmp5_powermode {
      83             :         /*! Standby powermode */
      84             :         BMP5_POWERMODE_STANDBY,
      85             :         /*! Normal powermode */
      86             :         BMP5_POWERMODE_NORMAL,
      87             :         /*! Forced powermode */
      88             :         BMP5_POWERMODE_FORCED,
      89             :         /*! Continuous powermode */
      90             :         BMP5_POWERMODE_CONTINUOUS,
      91             :         /*! Deep standby powermode */
      92             :         BMP5_POWERMODE_DEEP_STANDBY
      93             : };
      94             : 
      95             : #endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_BMP581_USER_H_ */

Generated by: LCOV version 1.14