manometer2 2.0.0.0
manometer2.h File Reference

This file contains API for Manometer 2 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  manometer2_coef_t
 
struct  manometer2_s
 Click ctx object definition. More...
 
struct  manometer2_cfg_t
 Click configuration structure definition. More...
 

Macros

#define MANOMETER2_MAP_MIKROBUS(cfg, mikrobus)
 
#define MANOMETER2_RETVAL   uint8_t
 
#define MANOMETER2_OK   0x00
 
#define MANOMETER2_INIT_ERROR   0xFF
 
#define MANOMETER2_I2C_ADDRESS_0   0x76
 
#define MANOMETER2_I2C_ADDRESS_1   0x77
 
#define MANOMETER2_RESET   0x1E
 
#define MANOMETER2_RESET_CMD   0xA6
 
#define MANOMETER2_ADC_READ   0x00
 
#define MANOMETER2_D1_CONVERT_256   0x40
 
#define MANOMETER2_D1_CONVERT_512   0x42
 
#define MANOMETER2_D1_CONVERT_1024   0x44
 
#define MANOMETER2_D1_CONVERT_2048   0x46
 
#define MANOMETER2_D1_CONVERT_4096   0x48
 
#define MANOMETER2_D2_CONVERT_256   0x50
 
#define MANOMETER2_D2_CONVERT_512   0x52
 
#define MANOMETER2_D2_CONVERT_1024   0x54
 
#define MANOMETER2_D2_CONVERT_2048   0x56
 
#define MANOMETER2_D2_CONVERT_4096   0x58
 
#define MANOMETER2_C1_READ   0xA2
 
#define MANOMETER2_C2_READ   0xA4
 
#define MANOMETER2_C3_READ   0xA6
 
#define MANOMETER2_C4_READ   0xA8
 
#define MANOMETER2_C5_READ   0xAA
 
#define MANOMETER2_C6_READ   0xAC
 
#define MANOMETER2_CONVERT_256   0
 
#define MANOMETER2_CONVERT_512   1
 
#define MANOMETER2_CONVERT_1024   2
 
#define MANOMETER2_CONVERT_2048   3
 
#define MANOMETER2_CONVERT_4096   4
 
#define MANOMETER2_Q1   14
 
#define MANOMETER2_Q2   16
 
#define MANOMETER2_Q3   7
 
#define MANOMETER2_Q4   5
 
#define MANOMETER2_Q5   7
 
#define MANOMETER2_Q6   21
 

Typedefs

typedef struct manometer2_s manometer2_t
 Click ctx object definition.
 

Functions

void manometer2_cfg_setup (manometer2_cfg_t *cfg)
 Config Object Initialization function.
 
MANOMETER2_RETVAL manometer2_init (manometer2_t *ctx, manometer2_cfg_t *cfg)
 Initialization function.
 
void manometer2_default_cfg (manometer2_t *ctx)
 Click Default Configuration function.
 
void manometer2_write_data (manometer2_t *ctx, uint8_t reg_address, uint8_t write_command)
 Generic write data function.
 
uint16_t manometer2_read_data (manometer2_t *ctx, uint8_t reg_address)
 Generic read data function.
 
uint32_t manometer2_read_command (manometer2_t *ctx, uint8_t reg_address)
 Generic read data function.
 
void manometer2_reset (manometer2_t *ctx)
 Reset.
 
void manometer2_read_coef (manometer2_t *ctx)
 Function read coeffitient.
 
float manometer2_get_temperature (manometer2_t *ctx, uint8_t oversampling_ratio)
 Get temperature data function.
 
float manometer2_get_pressure (manometer2_t *ctx, uint8_t oversampling_ratio)
 Get pressure data function.
 

Detailed Description

This file contains API for Manometer 2 Click driver.