pressure14 2.0.0.0
|
API for configuring and manipulating Pressure 14 Click driver. More...
Topics | |
Pressure 14 Status Registers List | |
List of registers of Pressure 14 Click driver. | |
Pressure 14 Registers Settings | |
Settings for registers of Pressure 14 Click driver. | |
Pressure 14 MikroBUS Map | |
MikroBUS pin mapping of Pressure 14 Click driver. | |
Pressure14_pressure_conversion_units | |
Pressure14_temperature_conversion_units | |
Pressure14_pressure_conversion_constants | |
Pressure14_temperature_conversion_constants | |
Pressure14_general_sensor_constants | |
Functions | |
void | pressure14_cfg_setup (pressure14_cfg_t *cfg) |
Pressure 14 configuration object setup function. | |
err_t | pressure14_init (pressure14_t *ctx, pressure14_cfg_t *cfg) |
Pressure 14 initialization function. | |
err_t | pressure14_generic_write (pressure14_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Pressure 14 I2C writing function. | |
err_t | pressure14_generic_read (pressure14_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Pressure 14 I2C reading function. | |
void | pressure14_measure_cmd (pressure14_t *ctx) |
Pressure 14 output Measurement Command function. | |
uint8_t | pressure14_check_busy_flag_int (pressure14_t *ctx) |
Pressure 14 checks INT pin state function. | |
void | pressure14_read_press_and_temp (pressure14_t *ctx, uint8_t *status_byte, uint32_t *pressure_data, uint32_t *temp_data) |
Pressure 14 read pressure and temperature function. | |
float | pressure14_get_pressure (uint32_t pressure_raw, uint8_t conv_unit) |
Pressure 14 calculate pressure function. | |
float | pressure14_get_temperature (uint32_t temperature_raw, uint8_t conv_unit) |
Pressure 14 calculate temperature function. | |
API for configuring and manipulating Pressure 14 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void pressure14_cfg_setup | ( | pressure14_cfg_t * | cfg | ) |
Pressure 14 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See pressure14_cfg_t object definition for detailed explanation. |
uint8_t pressure14_check_busy_flag_int | ( | pressure14_t * | ctx | ) |
Pressure 14 checks INT pin state function.
This function returns the INT pin state which indicates the End-of-conversion for ABP2 series pressure sensor on Pressure 14 click board.
[in] | ctx | : Click context object. See pressure14_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
err_t pressure14_generic_read | ( | pressure14_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Pressure 14 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 pressure14_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 pressure14_generic_write | ( | pressure14_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Pressure 14 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 pressure14_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.float pressure14_get_pressure | ( | uint32_t | pressure_raw, |
uint8_t | conv_unit ) |
Pressure 14 calculate pressure function.
This function calculates raw pressure data acquired from the ABP2 series pressure sensor on Pressure 14 click board, and converts the result into preferred unit.
[in] | pressure_raw | : Input parameter of raw pressure to be converted into a more meaningful value. |
[in] | conv_unit | : Preferred conversion unit for measured pressure. |
See #err_t definition for detailed explanation.
float pressure14_get_temperature | ( | uint32_t | temperature_raw, |
uint8_t | conv_unit ) |
Pressure 14 calculate temperature function.
This function calculates raw temperature data acquired from the ABP2 series pressure sensor on Pressure 14 click board, and converts the result into preferred unit.
[in] | temperature_raw | : input parameter of raw temperature to be converted into a more meaningful value. |
[out] | conv_unit | : Preferred conversion unit for measured temperature. |
See #err_t definition for detailed explanation.
err_t pressure14_init | ( | pressure14_t * | ctx, |
pressure14_cfg_t * | cfg ) |
Pressure 14 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See pressure14_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See pressure14_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void pressure14_measure_cmd | ( | pressure14_t * | ctx | ) |
Pressure 14 output Measurement Command function.
This function sends output measurement command that causes the ABP2 series pressure sensor to exit standby mode and enter operating mode.
[in] | ctx | : Click context object. See pressure14_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
void pressure14_read_press_and_temp | ( | pressure14_t * | ctx, |
uint8_t * | status_byte, | ||
uint32_t * | pressure_data, | ||
uint32_t * | temp_data ) |
Pressure 14 read pressure and temperature function.
This function reads 24-bit pressure, 24-bit temperature data and 8-bit status register from the ABP2 series pressure sensor on Pressure 14 click board.
[in] | ctx | : Click context object. See pressure14_t object definition for detailed explanation. |
[in] | status_byte | : Pointer to the memory location where the 8-bit status will be stored. |
[out] | pressure_data | : Pointer to the memory location where the raw pressure data will be stored. |
[in] | temp_data | : Pointer to the memory location where the raw temperature data will be stored. |
See #err_t definition for detailed explanation.