pressure4 2.0.0.0
pressure4.h File Reference

This file contains API for Pressure 4 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  pressure4_s
 Click ctx object definition. More...
 
struct  pressure4_cfg_t
 Click configuration structure definition. More...
 

Macros

#define PRESSURE4_MAP_MIKROBUS(cfg, mikrobus)
 
#define PRESSURE4_MASTER_I2C   0
 
#define PRESSURE4_MASTER_SPI   1
 
#define PRESSURE4_OK   0
 
#define PRESSURE4_ERROR   -1
 
#define PRESSURE4_ADDR0   0x76
 
#define PRESSURE4_ADDR1   0x77
 
#define PRESSURE4_ID   0xD0
 
#define PRESSURE4_RESET   0xE0
 
#define PRESSURE4_STATUS   0xF3
 
#define PRESSURE4_CTL_MEAS   0xF4
 
#define PRESSURE4_CONFIG   0xF5
 
#define PRESSURE4_PRESS_MSB   0xF7
 
#define PRESSURE4_PRESS_LSB   0xF8
 
#define PRESSURE4_PRESS_XLSB   0xF9
 
#define PRESSURE4_TEMP_MSB   0xFA
 
#define PRESSURE4_TEMP_LSB   0xFB
 
#define PRESSURE4_TEMP_XLSB   0xFC
 
#define PRESSURE4_CALIBRATION_DIG_T1   0x88
 
#define PRESSURE4_CALIBRATION_DIG_T2   0x8A
 
#define PRESSURE4_CALIBRATION_DIG_T3   0x8C
 
#define PRESSURE4_CALIBRATION_DIG_P1   0x8E
 
#define PRESSURE4_CALIBRATION_DIG_P2   0x90
 
#define PRESSURE4_CALIBRATION_DIG_P3   0x92
 
#define PRESSURE4_CALIBRATION_DIG_P4   0x94
 
#define PRESSURE4_CALIBRATION_DIG_P5   0x96
 
#define PRESSURE4_CALIBRATION_DIG_P6   0x98
 
#define PRESSURE4_CALIBRATION_DIG_P7   0x9A
 
#define PRESSURE4_CALIBRATION_DIG_P8   0x9C
 
#define PRESSURE4_CALIBRATION_DIG_P9   0x9E
 

Typedefs

typedef void(* pressure4_master_io_t) (struct pressure4_s *, uint8_t, uint8_t *, uint8_t)
 Master Input/Output type.
 
typedef struct pressure4_s pressure4_t
 Click ctx object definition.
 

Functions

void pressure4_cfg_setup (pressure4_cfg_t *cfg)
 Config Object Initialization function.
 
err_t pressure4_init (pressure4_t *ctx, pressure4_cfg_t *cfg)
 Initialization function.
 
void pressure4_default_cfg (pressure4_t *ctx)
 Click Default Configuration function.
 
void pressure4_generic_write (pressure4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void pressure4_generic_read (pressure4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void pressure4_write_reg_8_bit (pressure4_t *ctx, uint8_t w_reg, uint8_t w_data)
 8 bit writing function.
 
uint8_t pressure4_read_reg_8_bit (pressure4_t *ctx, uint8_t r_reg)
 8 bit reading function.
 
uint8_t pressure4_read_id (pressure4_t *ctx)
 Read ID function.
 
uint8_t pressure4_get_status (pressure4_t *ctx)
 Get status function.
 
float pressure4_get_temperature (pressure4_t *ctx)
 Get temperature function.
 
float pressure4_get_pressure (pressure4_t *ctx)
 Get pressure function.
 

Detailed Description

This file contains API for Pressure 4 Click driver.