barometer9
2.1.0.0
|
API for configuring and manipulating Barometer 9 Click driver. More...
Modules | |
Barometer 9 Registers List | |
List of registers of Barometer 9 Click driver. | |
Barometer 9 Registers Settings | |
Settings for registers of Barometer 9 Click driver. | |
Barometer 9 MikroBUS Map | |
MikroBUS pin mapping of Barometer 9 Click driver. | |
Functions | |
void | barometer9_cfg_setup (barometer9_cfg_t *cfg) |
Barometer 9 configuration object setup function. More... | |
void | barometer9_drv_interface_sel (barometer9_cfg_t *cfg, barometer9_drv_t drv_sel) |
Barometer 9 driver interface setup function. More... | |
err_t | barometer9_init (barometer9_t *ctx, barometer9_cfg_t *cfg) |
Barometer 9 initialization function. More... | |
err_t | barometer9_default_cfg (barometer9_t *ctx) |
Barometer 9 default configuration function. More... | |
err_t | barometer9_generic_write (barometer9_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Barometer 9 data writing function. More... | |
err_t | barometer9_generic_read (barometer9_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Barometer 9 data reading function. More... | |
err_t | barometer9_read_part_id (barometer9_t *ctx, uint16_t *part_id) |
Barometer 9 Device ID reading function. More... | |
err_t | barometer9_get_temperature (barometer9_t *ctx, float *temperature) |
Barometer 9 temperature reading function. More... | |
err_t | barometer9_get_pressure (barometer9_t *ctx, float *pressure) |
Barometer 9 pressure reading function. More... | |
err_t | barometer9_sw_reset (barometer9_t *ctx) |
Barometer 9 software reset function. More... | |
API for configuring and manipulating Barometer 9 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void barometer9_cfg_setup | ( | barometer9_cfg_t * | cfg | ) |
Barometer 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See barometer9_cfg_t object definition for detailed explanation. |
err_t barometer9_default_cfg | ( | barometer9_t * | ctx | ) |
Barometer 9 default configuration function.
This function executes a default configuration of Barometer 9 click board.
[in] | ctx | : Click context object. See barometer9_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void barometer9_drv_interface_sel | ( | barometer9_cfg_t * | cfg, |
barometer9_drv_t | drv_sel | ||
) |
Barometer 9 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 barometer9_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See barometer9_drv_t object definition for detailed explanation. |
err_t barometer9_generic_read | ( | barometer9_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Barometer 9 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See barometer9_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 barometer9_generic_write | ( | barometer9_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Barometer 9 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See barometer9_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 barometer9_get_pressure | ( | barometer9_t * | ctx, |
float * | pressure | ||
) |
Barometer 9 pressure reading function.
This function is used to read a pressure of Barometer 9 click board in Pascals.
[in] | ctx | : Click context object. See barometer9_t object definition for detailed explanation. |
[out] | pressure | : Pressure in Pascals. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer9_get_temperature | ( | barometer9_t * | ctx, |
float * | temperature | ||
) |
Barometer 9 temperature reading function.
This function is used to read a temperature of Barometer 9 click board in degree of Celsius.
[in] | ctx | : Click context object. See barometer9_t object definition for detailed explanation. |
[out] | temperature | : Temperature in degrees of Celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer9_init | ( | barometer9_t * | ctx, |
barometer9_cfg_t * | cfg | ||
) |
Barometer 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See barometer9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See barometer9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer9_read_part_id | ( | barometer9_t * | ctx, |
uint16_t * | part_id | ||
) |
Barometer 9 Device ID reading function.
This function is used to read a Device ID of Barometer 9 click board.
[in] | ctx | : Click context object. See barometer9_t object definition for detailed explanation. |
[out] | part_id | : Device ID value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer9_sw_reset | ( | barometer9_t * | ctx | ) |
Barometer 9 software reset function.
This function is used to perform software reset of Barometer 9 click board.
[in] | ctx | : Click context object. See barometer9_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.