48 #ifndef __DRV_PRESSURE_H__ 49 #define __DRV_PRESSURE_H__ 51 #include "nrf_drv_twi.h" 66 DRV_PRESSURE_MODE_ALTIMETER,
67 DRV_PRESSURE_MODE_BAROMETER
drv_pressure_evt_type_t
Pressure driver event types.
Definition: drv_pressure.h:56
uint8_t twi_addr
TWI address.
Definition: drv_pressure.h:86
drv_pressure_evt_handler_t evt_handler
Event handler - called after a pin interrupt has been detected.
Definition: drv_pressure.h:90
void(* drv_pressure_evt_handler_t)(drv_pressure_evt_t const *p_evt)
Pressure driver event handler callback type.
Definition: drv_pressure.h:80
Pressure event struct.
Definition: drv_pressure.h:72
Initialization struct for pressure driver.
Definition: drv_pressure.h:84
Definition: drv_pressure.h:59
uint32_t drv_pressure_sleep(void)
Function for putting the sensor to sleep.
uint32_t drv_pressure_reset(void)
Function for resetting the chip to all default register values.
float drv_pressure_get(void)
Function for getting the pressure data [hPa].
uint32_t drv_pressure_mode_set(drv_pressure_mode_t mode)
Function for changing the mode of the pressure sensor.
drv_pressure_mode_t mode
Current mode of operation.
Definition: drv_pressure.h:91
uint32_t pin_int
Interrupt pin.
Definition: drv_pressure.h:87
drv_pressure_mode_t
Pressure modes of operation.
Definition: drv_pressure.h:64
uint32_t drv_pressure_disable(void)
Function for disabling the pressure sensor.
uint32_t drv_pressure_enable(void)
Function for enabling the pressure sensor.
uint32_t drv_pressure_init(drv_pressure_init_t *p_params)
Function for initializing the pressure driver.
uint32_t drv_pressure_sample(void)
Function for starting the sampling.
nrf_drv_twi_config_t const * p_twi_cfg
The TWI configuration to use while the driver is enabled.
Definition: drv_pressure.h:89
Definition: drv_pressure.h:58
nrf_drv_twi_t const * p_twi_instance
The instance of TWI master to be used for transactions.
Definition: drv_pressure.h:88