press 2.1.0.0
|
API for configuring and manipulating PRESS Click driver. More...
Topics | |
PRESS Registers List | |
List of registers of PRESS Click driver. | |
PRESS Registers Settings | |
Settings for registers of PRESS Click driver. | |
PRESS MikroBUS Map | |
MikroBUS pin mapping of PRESS Click driver. | |
Functions | |
void | press_cfg_setup (press_cfg_t *cfg) |
PRESS configuration object setup function. | |
err_t | press_init (press_t *ctx, press_cfg_t *cfg) |
PRESS initialization function. | |
err_t | press_default_cfg (press_t *ctx) |
PRESS default configuration function. | |
err_t | press_generic_write (press_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
PRESS I2C writing function. | |
err_t | press_generic_read (press_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
PRESS I2C reading function. | |
err_t | press_reg_write (press_t *ctx, uint8_t reg, uint8_t data_in) |
PRESS I2C register writing function. | |
err_t | press_reg_read (press_t *ctx, uint8_t reg, uint8_t *data_out) |
PRESS I2C register reading function. | |
err_t | press_sw_reset (press_t *ctx) |
PRESS software reset function. | |
err_t | press_config_ah_qvar (press_t *ctx, uint8_t ah_qvar_en) |
PRESS config AH and Qva function. | |
err_t | press_get_raw_data (press_t *ctx, uint32_t *press_data, uint32_t *qvar_data, uint16_t *temp_data) |
PRESS gets the raw data function. | |
err_t | press_get_measurement_data (press_t *ctx, float *pressure, float *temperature) |
PRESS gets the measurement data function. | |
err_t | press_get_ah_qvar_data (press_t *ctx, float *ah_qvar) |
PRESS gets the AH/Qvar data function. | |
API for configuring and manipulating PRESS Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void press_cfg_setup | ( | press_cfg_t * | cfg | ) |
PRESS configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See press_cfg_t object definition for detailed explanation. |
err_t press_config_ah_qvar | ( | press_t * | ctx, |
uint8_t | ah_qvar_en ) |
PRESS config AH and Qva function.
This function performs the enable or disable AH and Qvar of the ILPS28QSW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with Qvar detection in a water-resistant package on the PRESS Click board™.
[in] | ctx | : Click context object. See press_t object definition for detailed explanation. |
[in] | ah_qvar_en | : Config AH and Qva:
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t press_default_cfg | ( | press_t * | ctx | ) |
PRESS default configuration function.
This function executes a default configuration of PRESS click board.
[in] | ctx | : Click context object. See press_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t press_generic_read | ( | press_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
PRESS 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 press_t object definition for detailed explanation. |
[in] | reg | : Start register address. See #press_reg definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t press_generic_write | ( | press_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
PRESS 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 press_t object definition for detailed explanation. |
[in] | reg | : Start register address. See #press_reg definition for detailed explanation. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t press_get_ah_qvar_data | ( | press_t * | ctx, |
float * | ah_qvar ) |
PRESS gets the AH/Qvar data function.
This function reads Qvar data conversion of the ILPS28QSW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with Qvar detection in a water-resistant package on the PRESS Click board™.
[in] | ctx | : Click context object. See press_t object definition for detailed explanation. |
[out] | ah_qvar | : Qvar data ( mV ). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t press_get_measurement_data | ( | press_t * | ctx, |
float * | pressure, | ||
float * | temperature ) |
PRESS gets the measurement data function.
This function reads temperature and pressure data conversion of the ILPS28QSW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with Qvar detection in a water-resistant package on the PRESS Click board™.
[in] | ctx | : Click context object. See press_t object definition for detailed explanation. |
[out] | pressure | : Pressure data ( mbar ). |
[out] | temperature | : Temperature data ( degree Celsius ). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t press_get_raw_data | ( | press_t * | ctx, |
uint32_t * | press_data, | ||
uint32_t * | qvar_data, | ||
uint16_t * | temp_data ) |
PRESS gets the raw data function.
This function reads the pressure, temperature and Qvar raw data of the ILPS28QSW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with Qvar detection in a water-resistant package on the PRESS Click board™.
[in] | ctx | : Click context object. See press_t object definition for detailed explanation. |
[out] | press_data | : Pressure data. |
[out] | qvar_data | : Qvar data. |
[out] | temp_data | : Temperature data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t press_init | ( | press_t * | ctx, |
press_cfg_t * | cfg ) |
PRESS initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See press_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See press_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t press_reg_read | ( | press_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
PRESS I2C register reading function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See press_t object definition for detailed explanation. |
[in] | reg | : Start register address. See #press_reg definition for detailed explanation. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t press_reg_write | ( | press_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
PRESS I2C register writing function.
This function writes a desired data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See press_t object definition for detailed explanation. |
[in] | reg | : Register address. See #press_reg definition for detailed explanation. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t press_sw_reset | ( | press_t * | ctx | ) |
PRESS software reset function.
This function performs the software reset of the ILPS28QSW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with Qvar detection in a water-resistant package on the PRESS Click board™.
[in] | ctx | : Click context object. See press_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.