Pressure sensor API.
More...
Pressure sensor API.
◆ drv_pressure_evt_type_t
Pressure driver event types.
Enumerator |
---|
DRV_PRESSURE_EVT_DATA | Converted value ready to be read.
|
DRV_PRESSURE_EVT_ERROR | HW error on the communication bus.
|
◆ drv_pressure_disable()
uint32_t drv_pressure_disable |
( |
void |
| ) |
|
Function for disabling the pressure sensor.
- Return values
-
NRF_SUCCESS | If initialization was successful. |
◆ drv_pressure_enable()
uint32_t drv_pressure_enable |
( |
void |
| ) |
|
Function for enabling the pressure sensor.
- Return values
-
NRF_SUCCESS | If initialization was successful. |
◆ drv_pressure_get()
float drv_pressure_get |
( |
void |
| ) |
|
Function for getting the pressure data [hPa].
- Return values
-
◆ drv_pressure_init()
Function for initializing the pressure driver.
- Parameters
-
[in] | p_params | Pointer to init parameters. |
- Return values
-
NRF_SUCCESS | If initialization was successful. |
NRF_ERROR_INVALID_STATE | If the driver is in invalid state. |
◆ drv_pressure_mode_set()
Function for changing the mode of the pressure sensor.
- Parameters
-
[in] | mode | Altimeter or Barometer. |
- Return values
-
NRF_SUCCESS | If configuration was successful. |
NRF_ERROR_BUSY | If the TWI drivers are busy. |
◆ drv_pressure_reset()
uint32_t drv_pressure_reset |
( |
void |
| ) |
|
Function for resetting the chip to all default register values.
- Return values
-
NRF_SUCCESS | If operation was successful. |
NRF_ERROR_BUSY | If TWI bus was busy. |
◆ drv_pressure_sample()
uint32_t drv_pressure_sample |
( |
void |
| ) |
|
Function for starting the sampling.
- Return values
-
NRF_SUCCESS | If start sampling was successful. |
◆ drv_pressure_sleep()
uint32_t drv_pressure_sleep |
( |
void |
| ) |
|
Function for putting the sensor to sleep.
- Return values
-
NRF_SUCCESS | If sleep was successful. |