barometer5 2.0.0.0
|
API for configuring and manipulating Barometer 5 Click driver. More...
Topics | |
Barometer 5 Command List | |
List of commands of Barometer 5 Click driver. | |
Barometer 5 Registers Settings | |
Settings for registers of Barometer 5 Click driver. | |
Barometer 5 MikroBUS Map | |
MikroBUS pin mapping of Barometer 5 Click driver. | |
Barometer5_cmd | |
Functions | |
void | barometer5_cfg_setup (barometer5_cfg_t *cfg) |
Barometer 5 configuration object setup function. | |
err_t | barometer5_init (barometer5_t *ctx, barometer5_cfg_t *cfg) |
Barometer 5 initialization function. | |
err_t | barometer5_default_cfg (barometer5_t *ctx) |
Barometer 5 default configuration function. | |
err_t | barometer5_generic_write (barometer5_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Barometer 5 I2C writing function. | |
err_t | barometer5_generic_read (barometer5_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Barometer 5 I2C reading function. | |
err_t | barometer5_set_command (barometer5_t *ctx, uint8_t cmd) |
Barometer 5 set command function. | |
err_t | barometer5_set_ratio (barometer5_t *ctx, uint8_t temp_ratio, uint8_t press_ratio) |
Barometer 5 set data ratio function. | |
err_t | barometer5_sw_reset (barometer5_t *ctx) |
Barometer 5 software reset function. | |
err_t | barometer5_get_calibration_data (barometer5_t *ctx) |
Barometer 5 get calibration data function. | |
err_t | barometer5_get_raw_data (barometer5_t *ctx, uint32_t *temp_data, uint32_t *press_data) |
Barometer 5 get raw data function. | |
err_t | barometer5_get_temperature (barometer5_t *ctx, float *temperature) |
Barometer 5 get temperature data function. | |
err_t | barometer5_get_pressure (barometer5_t *ctx, float *pressure) |
Barometer 5 get pressure data function. | |
err_t | barometer5_calculate_altitude (barometer5_t *ctx, float *altitude) |
Barometer 5 calculate altitude function. | |
err_t | barometer5_get_data (barometer5_t *ctx, float *temperature, float *pressure) |
Barometer 5 get data function. | |
API for configuring and manipulating Barometer 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t barometer5_calculate_altitude | ( | barometer5_t * | ctx, |
float * | altitude ) |
Barometer 5 calculate altitude function.
This function read pressure and temperature data and calculate altitude data, depending on the temperature and pressure data, function calculates altitude in meters of the MS5637 Low Voltage Barometric Pressure Sensor
on the Barometer 5 click board™.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
[out] | altitude | : Altitude data in meters. |
0
- Success, -1
- Error.void barometer5_cfg_setup | ( | barometer5_cfg_t * | cfg | ) |
Barometer 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See barometer5_cfg_t object definition for detailed explanation. |
err_t barometer5_default_cfg | ( | barometer5_t * | ctx | ) |
Barometer 5 default configuration function.
This function executes a default configuration of Barometer 5 click board.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t barometer5_generic_read | ( | barometer5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Barometer 5 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t barometer5_generic_write | ( | barometer5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Barometer 5 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t barometer5_get_calibration_data | ( | barometer5_t * | ctx | ) |
Barometer 5 get calibration data function.
This function read and store calibration data of the MS5637 Low Voltage Barometric Pressure Sensor
on the Barometer 5 click board™.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t barometer5_get_data | ( | barometer5_t * | ctx, |
float * | temperature, | ||
float * | pressure ) |
Barometer 5 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 MS5637 Low Voltage Barometric Pressure Sensor
on the Barometer 5 click board™.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
[out] | temperature | : Temperature in degree Celsius. |
[out] | pressure | : Pressure in mbar.. |
0
- Success, -1
- Error.err_t barometer5_get_pressure | ( | barometer5_t * | ctx, |
float * | pressure ) |
Barometer 5 get pressure data function.
This function read pressure data and convert to the mbar of the MS5637 Low Voltage Barometric Pressure Sensor
on the Barometer 5 click board™.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
[out] | pressure | : Pressure in mbar. |
0
- Success, -1
- Error.err_t barometer5_get_raw_data | ( | barometer5_t * | ctx, |
uint32_t * | temp_data, | ||
uint32_t * | press_data ) |
Barometer 5 get raw data function.
This function read raw temperature and pressure data of the MS5637 Low Voltage Barometric Pressure Sensor
on the Barometer 5 click board™.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
[out] | temp_data | : Raw temperature data. |
[out] | press_data | : Raw pressure data. |
0
- Success, -1
- Error.err_t barometer5_get_temperature | ( | barometer5_t * | ctx, |
float * | temperature ) |
Barometer 5 get temperature data function.
This function read temperature data and convert to the degree Celsius of the MS5637 Low Voltage Barometric Pressure Sensor
on the Barometer 5 click board™.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
[out] | temperature | : Temperature in degree Celsius. |
0
- Success, -1
- Error.err_t barometer5_init | ( | barometer5_t * | ctx, |
barometer5_cfg_t * | cfg ) |
Barometer 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See barometer5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t barometer5_set_command | ( | barometer5_t * | ctx, |
uint8_t | cmd ) |
Barometer 5 set command function.
This function writes a desired command of the MS5637 Low Voltage Barometric Pressure Sensor
on the Barometer 5 click board™.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
[in] | cmd | : Desired command. |
0
- Success, -1
- Error.err_t barometer5_set_ratio | ( | barometer5_t * | ctx, |
uint8_t | temp_ratio, | ||
uint8_t | press_ratio ) |
Barometer 5 set data ratio function.
This function sets data ratio of the MS5637 Low Voltage Barometric Pressure Sensor
on the Barometer 5 click board™.
[in] | ctx | : Click context object. See barometer5_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 barometer5_sw_reset | ( | barometer5_t * | ctx | ) |
Barometer 5 software reset function.
This function performs a software reset of the MS5637 Low Voltage Barometric Pressure Sensor
on the Barometer 5 click board™.
[in] | ctx | : Click context object. See barometer5_t object definition for detailed explanation. |
0
- Success, -1
- Error.