pressure7 2.0.0.0
pressure7.h File Reference

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

Macros

#define PRESSURE7_MAP_MIKROBUS(cfg, mikrobus)
 
#define PRESSURE7_RETVAL   uint8_t
 
#define PRESSURE7_OK   0x00
 
#define PRESSURE7_INIT_ERROR   0xFF
 
#define PRESSURE7_CMD_RESET   0x1E
 
#define PRESSURE7_CMD_CONVERT_D1_OSR_256   0x40
 
#define PRESSURE7_CMD_CONVERT_D1_OSR_512   0x42
 
#define PRESSURE7_CMD_CONVERT_D1_OSR_1024   0x44
 
#define PRESSURE7_CMD_CONVERT_D1_OSR_2048   0x46
 
#define PRESSURE7_CMD_CONVERT_D1_OSR_4096   0x48
 
#define PRESSURE7_CMD_CONVERT_D1_OSR_8192   0x4A
 
#define PRESSURE7_CMD_CONVERT_D2_OSR_256   0x50
 
#define PRESSURE7_CMD_CONVERT_D2_OSR_512   0x52
 
#define PRESSURE7_CMD_CONVERT_D2_OSR_1024   0x54
 
#define PRESSURE7_CMD_CONVERT_D2_OSR_2048   0x56
 
#define PRESSURE7_CMD_CONVERT_D2_OSR_4096   0x58
 
#define PRESSURE7_CMD_CONVERT_D2_OSR_8912   0x5A
 
#define PRESSURE7_CMD_ADC_READ   0x00
 
#define PRESSURE7_CMD_PROM_READ   0xA0
 
#define PRESSURE7_PROM_ADDR_CRC   0x00
 
#define PRESSURE7_PROM_ADDR_C1   0x01 << 1
 
#define PRESSURE7_PROM_ADDR_C2   0x02 << 1
 
#define PRESSURE7_PROM_ADDR_C3   0x03 << 1
 
#define PRESSURE7_PROM_ADDR_C4   0x04 << 1
 
#define PRESSURE7_PROM_ADDR_C5   0x05 << 1
 
#define PRESSURE7_PROM_ADDR_C6   0x06 << 1
 
#define PRESSURE7_PROM_ADDR_C7   0x07 << 1
 
#define PRESSURE7_PROM_READ_ERROR   1
 
#define PRESSURE7_PROM_READ_OK   0
 
#define PRESSURE7_DEVICE_SLAVE_ADDRESS   0x76
 

Functions

void pressure7_cfg_setup (pressure7_cfg_t *cfg)
 Config Object Initialization function.
 
PRESSURE7_RETVAL pressure7_init (pressure7_t *ctx, pressure7_cfg_t *cfg)
 Initialization function.
 
void pressure7_default_cfg (pressure7_t *ctx)
 Click Default Configuration function.
 
void pressure7_generic_read (pressure7_t *ctx, uint8_t reg_addr, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void pressure7_send_command (pressure7_t *ctx, uint8_t cmd)
 Send command to click.
 
void pressure7_reset (pressure7_t *ctx)
 Start reset sequence.
 
uint8_t pressure7_read_prom (pressure7_t *ctx)
 Read calibration data from PROM.
 
void pressure7_start_measurement (pressure7_t *ctx)
 Start measurement and calculation data.
 
void pressure7_get_sensor_data (pressure7_t *ctx, float *Temperature, float *Pressure)
 Read Pressure and Temperature data.
 
void pressure7_set_over_sampling_ratio (uint8_t osr_d1, uint8_t osr_d2)
 Set OSR(Over sampling ratio) for Pressure(D1) and Temperature(D2) data.
 

Detailed Description

This file contains API for Pressure 7 Click driver.