pressure17 2.0.0.0
pressure17.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  pressure17_t
 Pressure 17 Click context object. More...
 
struct  pressure17_cfg_t
 Pressure 17 Click configuration object. More...
 

Macros

#define PRESSURE17_REG_MANUFACTURER_ID   0x0F
 Pressure 17 Register List.
 
#define PRESSURE17_REG_PART_ID   0x10
 
#define PRESSURE17_REG_POWER_DOWN   0x12
 
#define PRESSURE17_REG_RESET   0x13
 
#define PRESSURE17_REG_MODE_CONTROL   0x14
 
#define PRESSURE17_REG_IIR_FIFO_CONTROL   0x15
 
#define PRESSURE17_REG_FIFO_DATA   0x18
 
#define PRESSURE17_REG_STATUS   0x19
 
#define PRESSURE17_REG_PRESS_OUT_MSB   0x1A
 
#define PRESSURE17_REG_PRESS_OUT_LSB   0x1B
 
#define PRESSURE17_REG_PRESS_OUT_XL   0x1C
 
#define PRESSURE17_REG_TEMP_OUT_MSB   0x1D
 
#define PRESSURE17_REG_TEMP_OUT_LSB   0x1E
 
#define PRESSURE17_MANUFACTURER_ID   0xE0
 Pressure 17 ID values.
 
#define PRESSURE17_PART_ID   0x34
 
#define PRESSURE17_POWER_DOWN   0x00
 Pressure 17 Power Down register settings.
 
#define PRESSURE17_POWER_ACTIVE   0x01
 
#define PRESSURE17_RSTB_RESET   0x00
 Pressure 17 Reset register settings.
 
#define PRESSURE17_RSTB_ACTIVE   0x01
 
#define PRESSURE17_MODE_AVE_NUM_8_TIMES   0x60
 Pressure 17 Mode Control register settings.
 
#define PRESSURE17_MODE_AVE_NUM_16_TIMES   0x80
 
#define PRESSURE17_MODE_AVE_NUM_32_TIMES   0xA0
 
#define PRESSURE17_MODE_AVE_NUM_64_TIMES   0xC0
 
#define PRESSURE17_MODE_DR_EN   0x10
 
#define PRESSURE17_MODE_FULL_EN   0x08
 
#define PRESSURE17_MODE_WTM_EN   0x04
 
#define PRESSURE17_MODE_STANDBY_MODE   0x00
 
#define PRESSURE17_MODE_ONE_SHOT_MODE   0x01
 
#define PRESSURE17_MODE_CONTINUOUS_MODE   0x02
 
#define PRESSURE17_FIFO_EN   0x80
 Pressure 17 IIR/FIFO Control register settings.
 
#define PRESSURE17_WTM_LEVEL_2   0x00
 
#define PRESSURE17_WTM_LEVEL_3   0x40
 
#define PRESSURE17_IIR_OFF   0x00
 
#define PRESSURE17_IIR_ON_WEAK   0x01
 
#define PRESSURE17_IIR_ON_MIDDLE   0x02
 
#define PRESSURE17_IIR_ON_STRONG   0x03
 
#define PRESSURE17_FIFO_LVL_FIFO_EMPTY   0x00
 Pressure 17 FIFO data register settings.
 
#define PRESSURE17_FIFO_LVL_FIFO_NUM_1   0x01
 
#define PRESSURE17_FIFO_LVL_FIFO_NUM_2   0x02
 
#define PRESSURE17_FIFO_LVL_FIFO_NUM_3   0x03
 
#define PRESSURE17_FIFO_LVL_FIFO_FULL   0x04
 
#define PRESSURE17_STATUS_RD_FULL   0x04
 Pressure 17 STATUS register settings.
 
#define PRESSURE17_STATUS_RD_WTM   0x02
 
#define PRESSURE17_STATUS_RD_DRDY   0x01
 
#define PRESSURE17_PRESS_COUNTS_PER_MBAR   2048
 Pressure 17 pressure and temperature calculation constants.
 
#define PRESSURE17_TEMP_COUNTS_PER_C   32
 
#define PRESSURE17_SET_DEV_ADDR   0x5D
 Pressure 17 device address setting.
 
#define PRESSURE17_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  pressure17_return_value_t { PRESSURE17_OK = 0 , PRESSURE17_ERROR = -1 }
 Pressure 17 Click return value data. More...
 

Functions

void pressure17_cfg_setup (pressure17_cfg_t *cfg)
 Pressure 17 configuration object setup function.
 
err_t pressure17_init (pressure17_t *ctx, pressure17_cfg_t *cfg)
 Pressure 17 initialization function.
 
err_t pressure17_default_cfg (pressure17_t *ctx)
 Pressure 17 default configuration function.
 
err_t pressure17_generic_write (pressure17_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 Pressure 17 I2C writing function.
 
err_t pressure17_generic_read (pressure17_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 Pressure 17 I2C reading function.
 
err_t pressure17_write_register (pressure17_t *ctx, uint8_t reg, uint8_t data_in)
 Pressure 17 write register function.
 
err_t pressure17_read_register (pressure17_t *ctx, uint8_t reg, uint8_t *data_out)
 Pressure 17 read register function.
 
err_t pressure17_check_communication (pressure17_t *ctx)
 Pressure 17 check communication function.
 
err_t pressure17_read_data (pressure17_t *ctx, float *pressure, float *temperature)
 Pressure 17 read data function.
 
uint8_t pressure17_get_int_pin (pressure17_t *ctx)
 Pressure 17 get int pin function.
 

Detailed Description

This file contains API for Pressure 17 Click Driver.

Enumeration Type Documentation

◆ pressure17_return_value_t

Pressure 17 Click return value data.

Predefined enum values for driver return values.

Enumerator
PRESSURE17_OK 
PRESSURE17_ERROR