barometer10 2.1.0.0
|
API for configuring and manipulating Barometer 10 Click driver. More...
Topics | |
Barometer 10 Registers List | |
List of registers of Barometer 10 Click driver. | |
Barometer 10 Registers Settings | |
Settings for registers of Barometer 10 Click driver. | |
Barometer 10 MikroBUS Map | |
MikroBUS pin mapping of Barometer 10 Click driver. | |
Functions | |
void | barometer10_cfg_setup (barometer10_cfg_t *cfg) |
Barometer 10 configuration object setup function. | |
err_t | barometer10_init (barometer10_t *ctx, barometer10_cfg_t *cfg) |
Barometer 10 initialization function. | |
err_t | barometer10_default_cfg (barometer10_t *ctx) |
Barometer 10 default configuration function. | |
err_t | barometer10_generic_write (barometer10_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Barometer 10 I2C writing function. | |
err_t | barometer10_generic_read (barometer10_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Barometer 10 I2C reading function. | |
err_t | barometer10_sw_reset (barometer10_t *ctx) |
Barometer 10 software reset function. | |
err_t | barometer10_get_device_id (barometer10_t *ctx, uint8_t *device_id) |
Barometer 10 gets device ID function. | |
err_t | barometer10_get_config (barometer10_t *ctx, barometer10_sensor_cfg_t *config) |
Barometer 10 gets configuration function. | |
err_t | barometer10_set_config (barometer10_t *ctx, barometer10_sensor_cfg_t config) |
Barometer 10 set configuration function. | |
err_t | barometer10_trigger_one_shot (barometer10_t *ctx) |
Barometer 10 trigger one-shot function. | |
err_t | barometer10_get_pressure_output (barometer10_t *ctx, int32_t *pressure_raw) |
Barometer 10 gets pressure output function. | |
err_t | barometer10_get_temperature_output (barometer10_t *ctx, int16_t *temperature_raw) |
Barometer 10 gets temperature output function. | |
err_t | barometer10_get_pressure (barometer10_t *ctx, float *pressure) |
Barometer 10 gets pressure function. | |
err_t | barometer10_get_temperature (barometer10_t *ctx, float *temperature) |
Barometer 10 gets temperature function. | |
uint8_t | barometer10_get_int_pin (barometer10_t *ctx) |
Barometer 10 gets interrupt function. | |
API for configuring and manipulating Barometer 10 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void barometer10_cfg_setup | ( | barometer10_cfg_t * | cfg | ) |
Barometer 10 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See barometer10_cfg_t object definition for detailed explanation. |
err_t barometer10_default_cfg | ( | barometer10_t * | ctx | ) |
Barometer 10 default configuration function.
This function executes a default configuration of Barometer 10 click board.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer10_generic_read | ( | barometer10_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Barometer 10 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 barometer10_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[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 barometer10_generic_write | ( | barometer10_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Barometer 10 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 barometer10_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[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 barometer10_get_config | ( | barometer10_t * | ctx, |
barometer10_sensor_cfg_t * | config ) |
Barometer 10 gets configuration function.
This function gets sensor configuration data object of the LPS28DFW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package on the Barometer 10 Click board™.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
[out] | config | : Sensor configuration object. See barometer10_sensor_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer10_get_device_id | ( | barometer10_t * | ctx, |
uint8_t * | device_id ) |
Barometer 10 gets device ID function.
This function reads a BAROMETER10_REG_WHO_AM_I register of the LPS28DFW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package on the Barometer 10 Click board™.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
[out] | device_id | : Device ID values. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t barometer10_get_int_pin | ( | barometer10_t * | ctx | ) |
Barometer 10 gets interrupt function.
This function get states of the Interrupt ( INT ) pin of the LPS28DFW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package on the Barometer 10 Click board™.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. See #err_t definition for detailed explanation. err_t barometer10_get_pressure | ( | barometer10_t * | ctx, |
float * | pressure ) |
Barometer 10 gets pressure function.
This function reads a pressure data in hPa/mbar of the LPS28DFW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package on the Barometer 10 Click board™.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
[out] | pressure | : Pressure data [hPa/mbar]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer10_get_pressure_output | ( | barometer10_t * | ctx, |
int32_t * | pressure_raw ) |
Barometer 10 gets pressure output function.
This function reads a pressure output raw values of the LPS28DFW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package on the Barometer 10 Click board™.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
[out] | pressure_raw | : Signed 24-bit pressure output raw values. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer10_get_temperature | ( | barometer10_t * | ctx, |
float * | temperature ) |
Barometer 10 gets temperature function.
This function reads a temperature data in degree Celsius of the LPS28DFW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package on the Barometer 10 Click board™.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
[out] | temperature | : Temperature data [deg C]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer10_get_temperature_output | ( | barometer10_t * | ctx, |
int16_t * | temperature_raw ) |
Barometer 10 gets temperature output function.
This function reads a temperature output raw values of the LPS28DFW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package on the Barometer 10 Click board™.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
[out] | pressure_raw | : Signed 16-bit temperature output raw values. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer10_init | ( | barometer10_t * | ctx, |
barometer10_cfg_t * | cfg ) |
Barometer 10 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See barometer10_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer10_set_config | ( | barometer10_t * | ctx, |
barometer10_sensor_cfg_t | config ) |
Barometer 10 set configuration function.
This function set sensor configuration data object of the LPS28DFW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package on the Barometer 10 Click board™.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
[in] | config | : Sensor configuration object. See barometer10_sensor_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer10_sw_reset | ( | barometer10_t * | ctx | ) |
Barometer 10 software reset function.
This function perform software reset of the LPS28DFW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package on the Barometer 10 Click board™.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer10_trigger_one_shot | ( | barometer10_t * | ctx | ) |
Barometer 10 trigger one-shot function.
This function sets the configuration for a one-shot trigger of the LPS28DFW, Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package on the Barometer 10 Click board™.
[in] | ctx | : Click context object. See barometer10_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.