altitude6 2.0.0.0
|
API for configuring and manipulating Altitude 6 Click driver. More...
Topics | |
Altitude 6 Registers List | |
List of registers of Altitude 6 Click driver. | |
Altitude 6 Registers Settings | |
Settings for registers of Altitude 6 Click driver. | |
Altitude 6 MikroBUS Map | |
MikroBUS pin mapping of Altitude 6 Click driver. | |
Functions | |
void | altitude6_cfg_setup (altitude6_cfg_t *cfg) |
Altitude 6 configuration object setup function. | |
void | altitude6_drv_interface_selection (altitude6_cfg_t *cfg, altitude6_drv_t drv_sel) |
Altitude 6 driver interface setup function. | |
err_t | altitude6_init (altitude6_t *ctx, altitude6_cfg_t *cfg) |
Altitude 6 initialization function. | |
err_t | altitude6_default_cfg (altitude6_t *ctx) |
Altitude 6 default configuration function. | |
err_t | altitude6_set_command (altitude6_t *ctx, uint8_t cmd) |
Altitude 6 set command function. | |
err_t | altitude6_generic_read (altitude6_t *ctx, uint8_t cmd, uint8_t *data_out, uint8_t len) |
Altitude 6 data reading function. | |
err_t | altitude6_set_ratio (altitude6_t *ctx, uint8_t temp_ratio, uint8_t press_ratio) |
Altitude 6 set data ratio function. | |
err_t | altitude6_sw_reset (altitude6_t *ctx) |
Altitude 6 software reset function. | |
err_t | altitude6_get_calibration_data (altitude6_t *ctx) |
Altitude 6 get calibration data function. | |
err_t | altitude6_get_raw_data (altitude6_t *ctx, uint32_t *temp_data, uint32_t *press_data) |
Altitude 6 get raw data function. | |
err_t | altitude6_get_temperature (altitude6_t *ctx, float *temperature) |
Altitude 6 get temperature data function. | |
err_t | altitude6_get_pressure (altitude6_t *ctx, float *pressure) |
Altitude 6 get pressure data function. | |
err_t | altitude6_get_data (altitude6_t *ctx, float *temperature, float *pressure, float *altitude) |
Altitude 6 get data function. | |
API for configuring and manipulating Altitude 6 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void altitude6_cfg_setup | ( | altitude6_cfg_t * | cfg | ) |
Altitude 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See altitude6_cfg_t object definition for detailed explanation. |
err_t altitude6_default_cfg | ( | altitude6_t * | ctx | ) |
Altitude 6 default configuration function.
This function executes a default configuration of Altitude 6 click board.
[in] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
0
- Success, -1
- Error.void altitude6_drv_interface_selection | ( | altitude6_cfg_t * | cfg, |
altitude6_drv_t | drv_sel ) |
Altitude 6 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 altitude6_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See altitude6_drv_t object definition for detailed explanation. |
err_t altitude6_generic_read | ( | altitude6_t * | ctx, |
uint8_t | cmd, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Altitude 6 data reading function.
This function reads a desired number of data bytes starting from the selected register of the MS5611 Barometric Pressure Sensor, with stainless steel cap on the Altitude 6 click board™
[in] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
[in] | cmd | : Desired command. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t altitude6_get_calibration_data | ( | altitude6_t * | ctx | ) |
Altitude 6 get calibration data function.
This function read and store calibration data of the MS5611 Barometric Pressure Sensor, with stainless steel cap on the Altitude 6 click board™
[in] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t altitude6_get_data | ( | altitude6_t * | ctx, |
float * | temperature, | ||
float * | pressure, | ||
float * | altitude ) |
Altitude 6 get data function.
This function read temperature and pressure data, convert temperature data to the degree Celsius and pressure data to the mbar of the MS5611 Barometric Pressure Sensor, with stainless steel cap on the Altitude 6 click board™ Depending on the temperature and pressure data, function calculates altitude in meters
[in] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
[out] | temperature | : Temperature in degree Celsius. |
[out] | pressure | : Pressure in mbar. |
[out] | altitude | : Altitude data in meters. |
0
- Success, -1
- Error.err_t altitude6_get_pressure | ( | altitude6_t * | ctx, |
float * | pressure ) |
Altitude 6 get pressure data function.
This function read pressure data and convert to the mbar of the MS5611 Barometric Pressure Sensor, with stainless steel cap on the Altitude 6 click board™
[in] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
[out] | pressure | : Pressure in mbar. |
0
- Success, -1
- Error.err_t altitude6_get_raw_data | ( | altitude6_t * | ctx, |
uint32_t * | temp_data, | ||
uint32_t * | press_data ) |
Altitude 6 get raw data function.
This function read raw temperature and pressure data of the MS5611 Barometric Pressure Sensor, with stainless steel cap on the Altitude 6 click board™
[in] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
[out] | temp_data | : Raw temperature data. |
[out] | press_data | : Raw pressure data. |
0
- Success, -1
- Error.err_t altitude6_get_temperature | ( | altitude6_t * | ctx, |
float * | temperature ) |
Altitude 6 get temperature data function.
This function read temperature data and convert to the degree Celsius of the MS5611 Barometric Pressure Sensor, with stainless steel cap on the Altitude 6 click board™
[in] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
[out] | temperature | : Temperature in degree Celsius. |
0
- Success, -1
- Error.err_t altitude6_init | ( | altitude6_t * | ctx, |
altitude6_cfg_t * | cfg ) |
Altitude 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See altitude6_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t altitude6_set_command | ( | altitude6_t * | ctx, |
uint8_t | cmd ) |
Altitude 6 set command function.
This function writes a desired command of the MS5611 Barometric Pressure Sensor, with stainless steel cap on the Altitude 6 click board™
[in] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
[in] | cmd | : Desired command. |
0
- Success, -1
- Error.err_t altitude6_set_ratio | ( | altitude6_t * | ctx, |
uint8_t | temp_ratio, | ||
uint8_t | press_ratio ) |
Altitude 6 set data ratio function.
This function set data ratio of the MS5611 Barometric Pressure Sensor, with stainless steel cap on the Altitude 6 click board™
[in] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
[in] | temp_ratio | : Determines oversampling ratio for temperature measurement. |
[in] | press_ratio | : Determines oversampling ration for pressure measurement. |
0
- Success, -1
- Error.err_t altitude6_sw_reset | ( | altitude6_t * | ctx | ) |
Altitude 6 software reset function.
This function performs a software reset of the MS5611 Barometric Pressure Sensor, with stainless steel cap on the Altitude 6 click board™
[in] | ctx | : Click context object. See altitude6_t object definition for detailed explanation. |
0
- Success, -1
- Error.