pressure15 2.0.0.0
pressure15.h File Reference

This file contains API for Pressure 15 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  pressure15_s
 Pressure 15 Click context object. More...
 
struct  pressure15_cfg_t
 Pressure 15 Click configuration object. More...
 

Macros

#define PRESSURE15_REG_INTERRUPT_CFG   0x0B
 Pressure 15 description register.
 
#define PRESSURE15_REG_THS_P_L   0x0C
 
#define PRESSURE15_REG_THS_P_H   0x0D
 
#define PRESSURE15_REG_IF_CTRL   0x0E
 
#define PRESSURE15_REG_WHO_AM_I   0x0F
 
#define PRESSURE15_REG_CTRL_REG1   0x10
 
#define PRESSURE15_REG_CTRL_REG2   0x11
 
#define PRESSURE15_REG_CTRL_REG3   0x12
 
#define PRESSURE15_REG_FIFO_CTRL   0x13
 
#define PRESSURE15_REG_FIFO_WTM   0x14
 
#define PRESSURE15_REG_REF_PL_L   0x15
 
#define PRESSURE15_REG_REF_PL_H   0x16
 
#define PRESSURE15_REG_RPDS_L   0x18
 
#define PRESSURE15_REG_RPDS_H   0x19
 
#define PRESSURE15_REG_INT_SOURCE   0x24
 
#define PRESSURE15_REG_FIFO_STATUS1   0x25
 
#define PRESSURE15_REG_FIFO_STATUS2   0x26
 
#define PRESSURE15_REG_STATUS   0x27
 
#define PRESSURE15_REG_PRESSURE_OUT_XL   0x28
 
#define PRESSURE15_REG_PRESSURE_OUT_L   0x29
 
#define PRESSURE15_REG_PRESSURE_OUT_H   0x2A
 
#define PRESSURE15_REG_TEMP_OUT_L   0x2B
 
#define PRESSURE15_REG_TEMP_OUT_H   0x2C
 
#define PRESSURE15_REG_LPFP_RES   0x3C
 
#define PRESSURE15_REG_FIFO_DATA_OUT_PRESS_XL   0x78
 
#define PRESSURE15_REG_FIFO_DATA_OUT_PRESS_L   0x79
 
#define PRESSURE15_REG_FIFO_DATA_OUT_PRESS_H   0x7A
 
#define PRESSURE15_REG_FIFO_DATA_OUT_TEMP_L   0x7B
 
#define PRESSURE15_REG_FIFO_DATA_OUT_TEMP_H   0x7C
 
#define PRESSURE15_ID   0xB3
 Pressure 15 device ID.
 
#define PRESSURE15_SET_DEV_ADDR   0x5C
 Pressure 15 device address setting.
 
#define PRESSURE15_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* pressure15_master_io_t) (struct pressure15_s *, uint8_t, uint8_t *, uint8_t)
 Pressure 15 Click driver interface.
 
typedef struct pressure15_s pressure15_t
 Pressure 15 Click context object.
 

Enumerations

enum  pressure15_drv_t { PRESSURE15_DRV_SEL_SPI , PRESSURE15_DRV_SEL_I2C }
 Pressure 15 Click driver selector. More...
 
enum  pressure15_return_value_t { PRESSURE15_OK = 0 , PRESSURE15_ERROR = -1 }
 Pressure 15 Click return value data. More...
 

Functions

void pressure15_cfg_setup (pressure15_cfg_t *cfg)
 Pressure 15 configuration object setup function.
 
void pressure15_drv_interface_selection (pressure15_cfg_t *cfg, pressure15_drv_t drv_sel)
 Pressure 15 driver interface setup function.
 
err_t pressure15_init (pressure15_t *ctx, pressure15_cfg_t *cfg)
 Pressure 15 initialization function.
 
err_t pressure15_default_cfg (pressure15_t *ctx)
 Pressure 15 default configuration function.
 
err_t pressure15_generic_write (pressure15_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Pressure 15 data writing function.
 
err_t pressure15_generic_read (pressure15_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Pressure 15 data reading function.
 
uint8_t pressure15_get_int (pressure15_t *ctx)
 Get interrupt pin state.
 
err_t pressure15_get_temperature (pressure15_t *ctx, float *temperature)
 Get temperature data.
 
err_t pressure15_get_pressure (pressure15_t *ctx, float *pressure)
 Get pressure data.
 

Detailed Description

This file contains API for Pressure 15 Click Driver.

Typedef Documentation

◆ pressure15_master_io_t

typedef err_t(* pressure15_master_io_t) (struct pressure15_s *, uint8_t, uint8_t *, uint8_t)

Pressure 15 Click driver interface.

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

◆ pressure15_t

typedef struct pressure15_s pressure15_t

Pressure 15 Click context object.

Context object definition of Pressure 15 Click driver.

Enumeration Type Documentation

◆ pressure15_drv_t

Pressure 15 Click driver selector.

Selects target driver interface of Pressure 15 Click driver.

Enumerator
PRESSURE15_DRV_SEL_SPI 

SPI driver descriptor.

PRESSURE15_DRV_SEL_I2C 

I2C driver descriptor.

◆ pressure15_return_value_t

Pressure 15 Click return value data.

Predefined enum values for driver return values.

Enumerator
PRESSURE15_OK 
PRESSURE15_ERROR