pressure2 2.0.0.0
|
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. | |
void pressure2_cfg_setup | ( | pressure2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
err_t pressure2_default_cfg | ( | pressure2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
This function executes default configuration for Pressure 2 click.
err_t pressure2_init | ( | pressure2_t * | ctx, |
pressure2_cfg_t * | cfg ) |
Initialization function.
pressure2 | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
uint16_t pressure2_read_coefficient | ( | pressure2_t * | ctx, |
uint8_t | index ) |
Read calibration coefficients and return coefficient.
ctx | Click object. |
index |
This function read calibration coefficients and return coefficient.
void pressure2_read_data | ( | pressure2_t * | ctx, |
uint8_t | cmd, | ||
uint8_t * | buffer, | ||
uint8_t | n_bytes ) |
Generic transfer function.
ctx | Click object. |
reg_addr | Address which from data be read. |
buffer | Memory where data be stored. |
n_bytes | Number of bytes to be read. |
Reads multiple registries depending on the specified number of bytes.
void pressure2_read_sensor | ( | pressure2_t * | ctx, |
float * | press, | ||
float * | temp ) |
Read sensor.
ctx | Click object. |
press | Pressure to be calculate; |
temp | Pressure to be calculate; |
Functions for readding sensor.
void pressure2_reset | ( | pressure2_t * | ctx | ) |
Functions for reset chip.
ctx | Click object. |
Functions for reset chip.
uint32_t pressure2_send_cmd_adc | ( | pressure2_t * | ctx, |
uint8_t | cmd ) |
ADC conversion and return 24bit result.
ctx | Click object. |
cmd | Command to be send. |
This function preforms ADC conversion and return 24bit result.
void pressure2_write_bytes | ( | pressure2_t * | ctx, |
uint8_t | cmd ) |
Sends command.
ctx | Click object. |
cmd | Command to be written. |
Sends command using SPI protocol.