pressure19 2.0.0.0
|
API for configuring and manipulating Pressure 19 Click driver. More...
Topics | |
Pressure 19 Registers Settings | |
Settings for registers of Pressure 19 Click driver. | |
Pressure 19 MikroBUS Map | |
MikroBUS pin mapping of Pressure 19 Click driver. | |
Functions | |
void | pressure19_cfg_setup (pressure19_cfg_t *cfg) |
Pressure 19 configuration object setup function. | |
void | pressure19_drv_interface_selection (pressure19_cfg_t *cfg, pressure19_drv_t drv_sel) |
Pressure 19 driver interface setup function. | |
err_t | pressure19_init (pressure19_t *ctx, pressure19_cfg_t *cfg) |
Pressure 19 initialization function. | |
err_t | pressure19_read_raw_adc (pressure19_t *ctx, uint16_t *raw_adc) |
Pressure 19 read raw ADC value function. | |
err_t | pressure19_read_voltage (pressure19_t *ctx, float *voltage) |
Pressure 19 read voltage level function. | |
err_t | pressure19_set_vref (pressure19_t *ctx, float vref) |
Pressure 19 set vref function. | |
err_t | pressure19_get_pressure (pressure19_t *ctx, uint16_t *pressure) |
Pressure 19 get pressure function. | |
API for configuring and manipulating Pressure 19 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void pressure19_cfg_setup | ( | pressure19_cfg_t * | cfg | ) |
Pressure 19 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See pressure19_cfg_t object definition for detailed explanation. |
void pressure19_drv_interface_selection | ( | pressure19_cfg_t * | cfg, |
pressure19_drv_t | drv_sel ) |
Pressure 19 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See pressure19_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See pressure19_drv_t object definition for detailed explanation. |
err_t pressure19_get_pressure | ( | pressure19_t * | ctx, |
uint16_t * | pressure ) |
Pressure 19 get pressure function.
This function reads the output voltage and converts it to pressure in mBar.
[in] | ctx | : Click context object. See pressure19_t object definition for detailed explanation. |
[out] | pressure | : Pressure [mBar]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure19_init | ( | pressure19_t * | ctx, |
pressure19_cfg_t * | cfg ) |
Pressure 19 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See pressure19_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See pressure19_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure19_read_raw_adc | ( | pressure19_t * | ctx, |
uint16_t * | raw_adc ) |
Pressure 19 read raw ADC value function.
This function reads raw ADC value.
[in] | ctx | : Click context object. See pressure19_t object definition for detailed explanation. |
[out] | raw_adc | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure19_read_voltage | ( | pressure19_t * | ctx, |
float * | voltage ) |
Pressure 19 read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
[in] | ctx | : Click context object. See pressure19_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure19_set_vref | ( | pressure19_t * | ctx, |
float | vref ) |
Pressure 19 set vref function.
This function sets the voltage reference for Pressure 19 click driver.
[in] | ctx | : Click context object. See pressure19_t object definition for detailed explanation. |
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.