pressure4 2.0.0.0
|
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. | |
void pressure4_cfg_setup | ( | pressure4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void pressure4_default_cfg | ( | pressure4_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
This function executes default configuration for Pressure 4 click.
void pressure4_generic_read | ( | pressure4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
This function reads data from the desired register.
void pressure4_generic_write | ( | pressure4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
This function writes data to the desired register.
float pressure4_get_pressure | ( | pressure4_t * | ctx | ) |
Get pressure function.
ctx | Click object. |
This function returning the calculated value of the pressure.
uint8_t pressure4_get_status | ( | pressure4_t * | ctx | ) |
Get status function.
ctx | Click object. |
This function returning the state of the status register.
float pressure4_get_temperature | ( | pressure4_t * | ctx | ) |
Get temperature function.
ctx | Click object. |
This function returning the calculated temperature value.
err_t pressure4_init | ( | pressure4_t * | ctx, |
pressure4_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
uint8_t pressure4_read_id | ( | pressure4_t * | ctx | ) |
Read ID function.
ctx | Click object. |
This function returns the contents of the chipid register.
uint8_t pressure4_read_reg_8_bit | ( | pressure4_t * | ctx, |
uint8_t | r_reg ) |
8 bit reading function.
ctx | Click object. |
r_reg | Register address. |
This function reads 8 bit to Pressure 4 registers.
void pressure4_write_reg_8_bit | ( | pressure4_t * | ctx, |
uint8_t | w_reg, | ||
uint8_t | w_data ) |
8 bit writing function.
ctx | Click object. |
w_reg | Register address. |
w_data | Data to be written. |
This function writes 8 bit to Pressure 4 registers.