pressure2 2.0.0.0
|
This file contains API for Pressure 2 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | pressure2_t |
Click ctx object definition. More... | |
struct | pressure2_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | PRESSURE2_MAP_MIKROBUS(cfg, mikrobus) |
#define | PRESSURE2_OK 0 |
#define | PRESSURE2_ERROR -1 |
#define | PRESSURE2_CMD_RESET 0x1E |
#define | PRESSURE2_CMD_ADC_READ 0x00 |
#define | PRESSURE2_CMD_ADC_CONV 0x40 |
#define | PRESSURE2_CMD_ADC_D1 0x00 |
#define | PRESSURE2_CMD_ADC_D2 0x10 |
#define | PRESSURE2_CMD_ADC_256 0x00 |
#define | PRESSURE2_CMD_ADC_512 0x02 |
#define | PRESSURE2_CMD_ADC_1024 0x04 |
#define | PRESSURE2_CMD_ADC_2048 0x06 |
#define | PRESSURE2_CMD_ADC_4096 0x08 |
#define | PRESSURE2_CMD_PROM_RD 0xA0 |
Functions | |
void | pressure2_cfg_setup (pressure2_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | pressure2_init (pressure2_t *ctx, pressure2_cfg_t *cfg) |
Initialization function. | |
err_t | pressure2_default_cfg (pressure2_t *ctx) |
Click Default Configuration function. | |
void | pressure2_reset (pressure2_t *ctx) |
Functions for reset chip. | |
void | pressure2_read_data (pressure2_t *ctx, uint8_t cmd, uint8_t *buffer, uint8_t n_bytes) |
Generic transfer function. | |
void | pressure2_write_bytes (pressure2_t *ctx, uint8_t cmd) |
Sends command. | |
uint16_t | pressure2_read_coefficient (pressure2_t *ctx, uint8_t index) |
Read calibration coefficients and return coefficient. | |
uint32_t | pressure2_send_cmd_adc (pressure2_t *ctx, uint8_t cmd) |
ADC conversion and return 24bit result. | |
void | pressure2_read_sensor (pressure2_t *ctx, float *press, float *temp) |
Read sensor. | |
This file contains API for Pressure 2 Click driver.