diffpress
2.0.0.0
|
Functions | |
void | diffpress_cfg_setup (diffpress_cfg_t *cfg) |
Config Object Initialization function. More... | |
DIFFPRESS_RETVAL | diffpress_init (diffpress_t *ctx, diffpress_cfg_t *cfg) |
Initialization function. More... | |
void | diffpress_generic_write (diffpress_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | diffpress_generic_read (diffpress_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
uint16_t | diffpress_get_adc_data (diffpress_t *ctx) |
Gets adc data function. More... | |
float | diffpress_get_pressure_difference (diffpress_t *ctx) |
Gets pressure difference function. More... | |
void diffpress_cfg_setup | ( | diffpress_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void diffpress_generic_read | ( | diffpress_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
This function reads data from the desired register.
void diffpress_generic_write | ( | diffpress_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
This function writes data to the desired register.
uint16_t diffpress_get_adc_data | ( | diffpress_t * | ctx | ) |
Gets adc data function.
ctx | Click object. |
This function gets adc data.
float diffpress_get_pressure_difference | ( | diffpress_t * | ctx | ) |
Gets pressure difference function.
ctx | Click object. |
This function gets pressure difference.
DIFFPRESS_RETVAL diffpress_init | ( | diffpress_t * | ctx, |
diffpress_cfg_t * | cfg | ||
) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.