pressure15 2.0.0.0
|
API for configuring and manipulating Pressure 15 Click driver. More...
Topics | |
Pressure 15 Registers List | |
List of registers of Pressure 15 Click driver. | |
Pressure 15 Registers Settings | |
Settings for registers of Pressure 15 Click driver. | |
Pressure 15 MikroBUS Map | |
MikroBUS pin mapping of Pressure 15 Click driver. | |
Functions | |
void | pressure15_cfg_setup (pressure15_cfg_t *cfg) |
Pressure 15 configuration object setup function. | |
void | pressure15_drv_interface_selection (pressure15_cfg_t *cfg, pressure15_drv_t drv_sel) |
Pressure 15 driver interface setup function. | |
err_t | pressure15_init (pressure15_t *ctx, pressure15_cfg_t *cfg) |
Pressure 15 initialization function. | |
err_t | pressure15_default_cfg (pressure15_t *ctx) |
Pressure 15 default configuration function. | |
err_t | pressure15_generic_write (pressure15_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Pressure 15 data writing function. | |
err_t | pressure15_generic_read (pressure15_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Pressure 15 data reading function. | |
uint8_t | pressure15_get_int (pressure15_t *ctx) |
Get interrupt pin state. | |
err_t | pressure15_get_temperature (pressure15_t *ctx, float *temperature) |
Get temperature data. | |
err_t | pressure15_get_pressure (pressure15_t *ctx, float *pressure) |
Get pressure data. | |
API for configuring and manipulating Pressure 15 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void pressure15_cfg_setup | ( | pressure15_cfg_t * | cfg | ) |
Pressure 15 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See pressure15_cfg_t object definition for detailed explanation. |
err_t pressure15_default_cfg | ( | pressure15_t * | ctx | ) |
Pressure 15 default configuration function.
This function executes a default configuration of Pressure 15 click board.
[in] | ctx | : Click context object. See pressure15_t object definition for detailed explanation. |
0
- Success, -1
- Error.void pressure15_drv_interface_selection | ( | pressure15_cfg_t * | cfg, |
pressure15_drv_t | drv_sel ) |
Pressure 15 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 pressure15_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See pressure15_drv_t object definition for detailed explanation. |
err_t pressure15_generic_read | ( | pressure15_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Pressure 15 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See pressure15_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.err_t pressure15_generic_write | ( | pressure15_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Pressure 15 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See pressure15_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.uint8_t pressure15_get_int | ( | pressure15_t * | ctx | ) |
Get interrupt pin state.
Read state of interrupt pin.
[in] | ctx | : Click context object. See pressure15_t object definition for detailed explanation. |
err_t pressure15_get_pressure | ( | pressure15_t * | ctx, |
float * | pressure ) |
Get pressure data.
Read and calculate pressure data from device
[in] | ctx | : Click context object. See pressure15_t object definition for detailed explanation. |
[out] | pressure | : Pressure data in hPa unit. |
0
- Success, -1
- Error.err_t pressure15_get_temperature | ( | pressure15_t * | ctx, |
float * | temperature ) |
Get temperature data.
Read and calculate temperature data from device.
[in] | ctx | : Click context object. See pressure15_t object definition for detailed explanation. |
[out] | temperature | : Temperature data in degC unit. |
0
- Success, -1
- Error.err_t pressure15_init | ( | pressure15_t * | ctx, |
pressure15_cfg_t * | cfg ) |
Pressure 15 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See pressure15_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See pressure15_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.