pressure19 2.0.0.0
pressure19.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  pressure19_t
 Pressure 19 Click context object. More...
 
struct  pressure19_cfg_t
 Pressure 19 Click configuration object. More...
 

Macros

#define PRESSURE19_MIN_PRESSURE   0.2
 Pressure 19 pressure calculation values.
 
#define PRESSURE19_MAX_PRESSURE   3.0
 
#define PRESSURE19_MIN_VOLTAGE   0.4
 
#define PRESSURE19_MAX_VOLTAGE   4.65
 
#define PRESSURE19_BAR_TO_MBAR   1000
 
#define PRESSURE19_ADC_RESOLUTION   0x0FFF
 Pressure 19 ADC setting.
 
#define PRESSURE19_VREF_3V3   3.3
 
#define PRESSURE19_VREF_5V   5.0
 
#define PRESSURE19_SET_DEV_ADDR   0x4D
 Pressure 19 device address setting.
 
#define PRESSURE19_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  pressure19_drv_t { PRESSURE19_DRV_SEL_ADC , PRESSURE19_DRV_SEL_I2C }
 Pressure 19 Click driver selector. More...
 
enum  pressure19_return_value_t { PRESSURE19_OK = 0 , PRESSURE19_ERROR = -1 }
 Pressure 19 Click return value data. More...
 

Functions

void pressure19_cfg_setup (pressure19_cfg_t *cfg)
 Pressure 19 configuration object setup function.
 
void pressure19_drv_interface_selection (pressure19_cfg_t *cfg, pressure19_drv_t drv_sel)
 Pressure 19 driver interface setup function.
 
err_t pressure19_init (pressure19_t *ctx, pressure19_cfg_t *cfg)
 Pressure 19 initialization function.
 
err_t pressure19_read_raw_adc (pressure19_t *ctx, uint16_t *raw_adc)
 Pressure 19 read raw ADC value function.
 
err_t pressure19_read_voltage (pressure19_t *ctx, float *voltage)
 Pressure 19 read voltage level function.
 
err_t pressure19_set_vref (pressure19_t *ctx, float vref)
 Pressure 19 set vref function.
 
err_t pressure19_get_pressure (pressure19_t *ctx, uint16_t *pressure)
 Pressure 19 get pressure function.
 

Detailed Description

This file contains API for Pressure 19 Click Driver.

Enumeration Type Documentation

◆ pressure19_drv_t

Pressure 19 Click driver selector.

Selects target driver interface of Pressure 19 Click driver.

Enumerator
PRESSURE19_DRV_SEL_ADC 

ADC driver descriptor.

PRESSURE19_DRV_SEL_I2C 

I2C driver descriptor.

◆ pressure19_return_value_t

Pressure 19 Click return value data.

Predefined enum values for driver return values.

Enumerator
PRESSURE19_OK 
PRESSURE19_ERROR