pressure16 2.0.0.0
pressure16.h File Reference

This file contains API for Pressure 16 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  pressure16_s
 Pressure 16 Click context object. More...
 
struct  pressure16_cfg_t
 Pressure 16 Click configuration object. More...
 
struct  pressure16_int_cfg_t
 Pressure 16 Click Interrupt configuration object. More...
 
struct  pressure16_ctrl_cfg_t
 Pressure 16 Click Control configuration object. More...
 

Macros

#define PRESSURE16_REG_INT_CFG   0x0B
 Pressure 16 description register.
 
#define PRESSURE16_REG_THR_P_L   0x0C
 
#define PRESSURE16_REG_THR_P_H   0x0D
 
#define PRESSURE16_REG_INTERFACE_CTRL   0x0E
 
#define PRESSURE16_REG_DEVICE_ID   0x0F
 
#define PRESSURE16_REG_CTRL_1   0x10
 
#define PRESSURE16_REG_CTRL_2   0x11
 
#define PRESSURE16_REG_CTRL_3   0x12
 
#define PRESSURE16_REG_FIFO_CTRL   0x13
 
#define PRESSURE16_REG_FIFO_WTM   0x14
 
#define PRESSURE16_REG_REF_P_L   0x15
 
#define PRESSURE16_REG_REF_P_H   0x16
 
#define PRESSURE16_REG_OPC_P_L   0x18
 
#define PRESSURE16_REG_OPC_P_H   0x19
 
#define PRESSURE16_REG_INT_SOURCE   0x24
 
#define PRESSURE16_REG_FIFO_STATUS_1   0x25
 
#define PRESSURE16_REG_FIFO_STATUS_2   0x26
 
#define PRESSURE16_REG_STATUS   0x27
 
#define PRESSURE16_REG_DATA_P_XL   0x28
 
#define PRESSURE16_REG_DATA_P_L   0x29
 
#define PRESSURE16_REG_DATA_P_H   0x2A
 
#define PRESSURE16_REG_DATA_T_L   0x2B
 
#define PRESSURE16_REG_DATA_T_H   0x2C
 
#define PRESSURE16_REG_FIFO_DATA_P_XL   0x78
 
#define PRESSURE16_REG_FIFO_DATA_P_L   0x79
 
#define PRESSURE16_REG_FIFO_DATA_P_H   0x7A
 
#define PRESSURE16_REG_FIFO_DATA_T_L   0x7B
 
#define PRESSURE16_REG_FIFO_DATA_T_H   0x7C
 
#define PRESSURE16_SET_CTRL_ODR_POWER_DOWN_MODE   0x00
 Pressure 16 description setting.
 
#define PRESSURE16_SET_CTRL_ODR_1   0x01
 
#define PRESSURE16_SET_CTRL_ODR_10   0x02
 
#define PRESSURE16_SET_CTRL_ODR_25   0x03
 
#define PRESSURE16_SET_CTRL_ODR_50   0x04
 
#define PRESSURE16_SET_CTRL_ODR_75   0x05
 
#define PRESSURE16_SET_CTRL_ODR_100   0x06
 
#define PRESSURE16_SET_CTRL_ODR_200   0x07
 
#define PRESSURE16_SET_CTRL_LPFP_DISABLE   0x00
 
#define PRESSURE16_SET_CTRL_LPFP_ENABLE   0x01
 
#define PRESSURE16_SET_CTRL_LPFP_DISABLE   0x00
 
#define PRESSURE16_SET_CTRL_LPFP_ENABLE   0x01
 
#define PRESSURE16_SET_BDU_DATA_UPDATES_CONTINUOUS   0x00
 
#define PRESSURE16_SET_BDU_DATA_NOT_UPDATES_UNTIL_READ   0x01
 
#define PRESSURE16_SET_SIM_SPI_4_WIRE_INTERFACE   0x00
 
#define PRESSURE16_SET_SIM_SPI_3_WIRE_INTERFACE   0x01
 
#define PRESSURE16_SET_BOOT_NORMAL_OPERATION   0x00
 
#define PRESSURE16_SET_BOOT_REBOOT_MEMORY_CONTENT   0x01
 
#define PRESSURE16_SET_INT_H_L_INTERRUPT_ACTIVE_HIGH   0x00
 
#define PRESSURE16_SET_INT_H_L_INTERRUPT_ACTIVE_LOW   0x01
 
#define PRESSURE16_SET_PP_OD_PUSH_PULL   0x00
 
#define PRESSURE16_SET_PP_OD_OPEN_DRAIN   0x01
 
#define PRESSURE16_SET_IF_ADD_INC_DISABLED   0x00
 
#define PRESSURE16_SET_IF_ADD_INC_ENABLED   0x01
 
#define PRESSURE16_SET_LOW_NOISE_ENABLE_LOW_POWER_MODE   0x00
 
#define PRESSURE16_SET_LOW_NOISE_ENABLE_LOW_NOISE_MODE   0x01
 
#define PRESSURE16_SET_ONE_SHOT_NORMAL_OPERATION   0x00
 
#define PRESSURE16_SET_ONE_SHOT_NEW_DATA_SET_IS_ACQUIRED   0x01
 
#define PRESSURE16_SET_INT_F_FULL_DISABLED   0x00
 
#define PRESSURE16_SET_INT_F_FULL_ENABLED   0x01
 
#define PRESSURE16_SET_INT_F_WTM_DISABLED   0x00
 
#define PRESSURE16_SET_INT_F_WTM_ENABLED   0x01
 
#define PRESSURE16_SET_INT_F_OVR_DISABLED   0x00
 
#define PRESSURE16_SET_INT_F_OVR_ENABLED   0x01
 
#define PRESSURE16_SET_DRDY_DISABLED   0x00
 
#define PRESSURE16_SET_DRDY_ENABLED   0x01
 
#define PRESSURE16_SET_INT_S_DATA_SIGNAL   0x00
 
#define PRESSURE16_SET_INT_S_PRESSURE_HIGH_EVENT   0x01
 
#define PRESSURE16_SET_INT_S_PRESSURE_LOW_EVENT   0x02
 
#define PRESSURE16_SET_INT_S_PRESSURE_LOW_HIGH_EVENT   0x03
 
#define PRESSURE16_SET_INT_CFG_AUTOREFP_DISABLED   0x00
 
#define PRESSURE16_SET_INT_CFG_AUTOREFP_ENABLED   0x01
 
#define PRESSURE16_SET_INT_CFG_RESET_ARP_NORMAL_MODE   0x00
 
#define PRESSURE16_SET_INT_CFG_RESET_ARP_RST_AUTOREFP   0x01
 
#define PRESSURE16_SET_INT_CFG_AUTOZERO_DISABLED   0x00
 
#define PRESSURE16_SET_INT_CFG_AUTOZERO_ENABLED   0x01
 
#define PRESSURE16_SET_INT_CFG_AUTOZERO_NORMAL_MODE   0x00
 
#define PRESSURE16_SET_INT_CFG_RST_AUTOZERO   0x01
 
#define PRESSURE16_SET_INT_CFG_DIFF_EN_DISABLED   0x00
 
#define PRESSURE16_SET_INT_CFG_DIFF_EN_ENABLED   0x01
 
#define PRESSURE16_SET_INT_CFG_LIR_INT_IS_NOT_LATCHED   0x00
 
#define PRESSURE16_SET_INT_CFG_LIR_INT_IS_LATCHED   0x01
 
#define PRESSURE16_SET_INT_CFG_PLE_INT_IS_INACTIVE   0x00
 
#define PRESSURE16_SET_INT_CFG_PLE_INT_IS_ACTIVE   0x01
 
#define PRESSURE16_SET_INT_CFG_PHE_INT_IS_INACTIVE   0x00
 
#define PRESSURE16_SET_INT_CFG_PHE_INT_IS_ACTIVE   0x01
 
#define PRESSURE16_SET_SW_RESET_BIT_MASK   0x04
 
#define PRESSURE16_SET_DEV_ADDR_GND   0x5C
 Pressure 16 device address setting.
 
#define PRESSURE16_SET_DEV_ADDR_VCC   0x5D
 
#define PRESSURE16_DEVICE_ID   0xB3
 Pressure 16 device ID value.
 
#define PRESSURE16_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* pressure16_master_io_t) (struct pressure16_s *, uint8_t, uint8_t *, uint8_t)
 Pressure 16 Click driver interface.
 
typedef struct pressure16_s pressure16_t
 Pressure 16 Click context object.
 

Enumerations

enum  pressure16_drv_t { PRESSURE16_DRV_SEL_SPI , PRESSURE16_DRV_SEL_I2C }
 Pressure 16 Click driver selector. More...
 
enum  pressure16_return_value_t { PRESSURE16_OK = 0 , PRESSURE16_ERROR = -1 }
 Pressure 16 Click return value data. More...
 

Functions

void pressure16_cfg_setup (pressure16_cfg_t *cfg)
 Pressure 16 configuration object setup function.
 
void pressure16_drv_interface_selection (pressure16_cfg_t *cfg, pressure16_drv_t drv_sel)
 Pressure 16 driver interface setup function.
 
err_t pressure16_init (pressure16_t *ctx, pressure16_cfg_t *cfg)
 Pressure 16 initialization function.
 
err_t pressure16_default_cfg (pressure16_t *ctx)
 Pressure 16 default configuration function.
 
err_t pressure16_generic_write (pressure16_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Pressure 16 data writing function.
 
err_t pressure16_generic_read (pressure16_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Pressure 16 data reading function.
 
err_t pressure16_get_device_id (pressure16_t *ctx, uint8_t *dev_id)
 Pressure 16 get device ID function.
 
err_t pressure16_sw_reset (pressure16_t *ctx)
 Pressure 16 software reset function.
 
err_t pressure16_set_interrupt_config (pressure16_t *ctx, pressure16_int_cfg_t int_cfg_data)
 Pressure 16 set interrupt configuration function.
 
err_t pressure16_get_interrupt_config (pressure16_t *ctx, pressure16_int_cfg_t *int_cfg_data)
 Pressure 16 get interrupt configuration function.
 
err_t pressure16_set_ctrl_config (pressure16_t *ctx, pressure16_ctrl_cfg_t ctrl_cfg_data)
 Pressure 16 set control configuration function.
 
err_t pressure16_get_ctrl_config (pressure16_t *ctx, pressure16_ctrl_cfg_t *ctrl_cfg_data)
 Pressure 16 get control configuration function.
 
err_t pressure16_get_pressure (pressure16_t *ctx, float *pressure)
 Pressure 16 get pressure function.
 
err_t pressure16_get_temperature (pressure16_t *ctx, float *temperature)
 Pressure 16 get temperature function.
 
err_t pressure16_get_press_temp (pressure16_t *ctx, float *pressure, float *temperature)
 Pressure 16 get pressure and temperature function.
 
uint8_t pressure16_get_interrupt (pressure16_t *ctx)
 Pressure 16 get interrupt function.
 

Detailed Description

This file contains API for Pressure 16 Click Driver.

Typedef Documentation

◆ pressure16_master_io_t

typedef err_t(* pressure16_master_io_t) (struct pressure16_s *, uint8_t, uint8_t *, uint8_t)

Pressure 16 Click driver interface.

Definition of driver interface of Pressure 16 Click driver. Driver serial interface.

◆ pressure16_t

typedef struct pressure16_s pressure16_t

Pressure 16 Click context object.

Context object definition of Pressure 16 Click driver.

Enumeration Type Documentation

◆ pressure16_drv_t

Pressure 16 Click driver selector.

Selects target driver interface of Pressure 16 Click driver.

Enumerator
PRESSURE16_DRV_SEL_SPI 

SPI driver descriptor.

PRESSURE16_DRV_SEL_I2C 

I2C driver descriptor.

◆ pressure16_return_value_t

Pressure 16 Click return value data.

Predefined enum values for driver return values.

Enumerator
PRESSURE16_OK 
PRESSURE16_ERROR