altitude5 2.0.0.0
|
API for configuring and manipulating Altitude 5 Click driver. More...
Topics | |
Altitude 5 Registers List | |
List of registers of Altitude 5 Click driver. | |
Altitude 5 Registers Settings | |
Settings for registers of Altitude 5 Click driver. | |
Altitude 5 MikroBUS Map | |
MikroBUS pin mapping of Altitude 5 Click driver. | |
Functions | |
void | altitude5_cfg_setup (altitude5_cfg_t *cfg) |
Altitude 5 configuration object setup function. | |
err_t | altitude5_init (altitude5_t *ctx, altitude5_cfg_t *cfg) |
Altitude 5 initialization function. | |
err_t | altitude5_default_cfg (altitude5_t *ctx) |
Altitude 5 default configuration function. | |
err_t | altitude5_get_adc (altitude5_t *ctx, uint16_t *data_out) |
Altitude 5 get ADC function. | |
err_t | altitude5_read_an_pin_voltage (altitude5_t *ctx, float *data_out) |
Altitude 5 read AN pin voltage level function. | |
err_t | altitude5_get_adc_voltage (altitude5_t *ctx, float *adc_vtg) |
Altitude 5 get ADC voltage function. | |
err_t | altitude5_get_pressure (altitude5_t *ctx, float *pressure) |
Altitude 5 get pressure function. | |
err_t | altitude5_get_altitude (altitude5_t *ctx, float *altitude) |
Altitude 5 get altitude function. | |
API for configuring and manipulating Altitude 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void altitude5_cfg_setup | ( | altitude5_cfg_t * | cfg | ) |
Altitude 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See altitude5_cfg_t object definition for detailed explanation. |
err_t altitude5_default_cfg | ( | altitude5_t * | ctx | ) |
Altitude 5 default configuration function.
This function executes a default configuration of Altitude 5 click board.
[in] | ctx | : Click context object. See altitude5_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t altitude5_get_adc | ( | altitude5_t * | ctx, |
uint16_t * | data_out ) |
Altitude 5 get ADC function.
This function reads 12-bit ADC data of the TKP236 Analog Absolute Pressure Sensor on the Altitude 5 click board™.
[in] | ctx | : Click context object. See altitude5_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t altitude5_get_adc_voltage | ( | altitude5_t * | ctx, |
float * | adc_vtg ) |
Altitude 5 get ADC voltage function.
This function reads 12-bit ADC data and calculate ADC voltage ( V ) of the TKP236 Analog Absolute Pressure Sensor on the Altitude 5 click board™.
[in] | ctx | : Click context object. See altitude5_t object definition for detailed explanation. |
[out] | adc_vtg | : Output ADC voltage ( V ) data. |
0
- Success, -1
- Error.err_t altitude5_get_altitude | ( | altitude5_t * | ctx, |
float * | altitude ) |
Altitude 5 get altitude function.
This function reads 12-bit ADC data and calculate altitude ( meters ) of the TKP236 Analog Absolute Pressure Sensor on the Altitude 5 click board™.
[in] | ctx | : Click context object. See altitude5_t object definition for detailed explanation. |
[out] | altitude | : Output altitude ( m ) data. |
0
- Success, -1
- Error.err_t altitude5_get_pressure | ( | altitude5_t * | ctx, |
float * | pressure ) |
Altitude 5 get pressure function.
This function reads 12-bit ADC data and calculate pressure ( hPa - mBar ) of the TKP236 Analog Absolute Pressure Sensor on the Altitude 5 click board™.
[in] | ctx | : Click context object. See altitude5_t object definition for detailed explanation. |
[out] | pressure | : Output pressure ( hPa - mBar ) data. |
0
- Success, -1
- Error.err_t altitude5_init | ( | altitude5_t * | ctx, |
altitude5_cfg_t * | cfg ) |
Altitude 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See altitude5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See altitude5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t altitude5_read_an_pin_voltage | ( | altitude5_t * | ctx, |
float * | data_out ) |
Altitude 5 read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See altitude5_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin ( V ). |
0
- Success, -1
- Error.