pressure18
2.1.0.0
|
API for configuring and manipulating Pressure 18 Click driver. More...
Modules | |
Pressure 18 Registers List | |
List of registers of Pressure 18 Click driver. | |
Pressure 18 Registers Settings | |
Settings for registers of Pressure 18 Click driver. | |
Pressure 18 MikroBUS Map | |
MikroBUS pin mapping of Pressure 18 Click driver. | |
Functions | |
void | pressure18_cfg_setup (pressure18_cfg_t *cfg) |
Pressure 18 configuration object setup function. More... | |
void | pressure18_drv_interface_selection (pressure18_cfg_t *cfg, pressure18_drv_t drv_sel) |
Pressure 18 driver interface setup function. More... | |
err_t | pressure18_init (pressure18_t *ctx, pressure18_cfg_t *cfg) |
Pressure 18 initialization function. More... | |
err_t | pressure18_default_cfg (pressure18_t *ctx) |
Pressure 18 default configuration function. More... | |
err_t | pressure18_generic_write (pressure18_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Pressure 18 data writing function. More... | |
err_t | pressure18_generic_read (pressure18_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Pressure 18 data reading function. More... | |
err_t | pressure18_write_register (pressure18_t *ctx, uint8_t reg, uint8_t data_in) |
Pressure 18 write register function. More... | |
err_t | pressure18_read_register (pressure18_t *ctx, uint8_t reg, uint8_t *data_out) |
Pressure 18 read register function. More... | |
err_t | pressure18_check_communication (pressure18_t *ctx) |
Pressure 18 check communication function. More... | |
uint8_t | pressure18_get_int_pin (pressure18_t *ctx) |
Pressure 18 get int pin function. More... | |
err_t | pressure18_soft_reset (pressure18_t *ctx) |
Pressure 18 soft reset function. More... | |
err_t | pressure18_read_data (pressure18_t *ctx, float *pressure, float *temperature) |
Pressure 18 read data function. More... | |
API for configuring and manipulating Pressure 18 Click driver.
void pressure18_cfg_setup | ( | pressure18_cfg_t * | cfg | ) |
Pressure 18 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See pressure18_cfg_t object definition for detailed explanation. |
err_t pressure18_check_communication | ( | pressure18_t * | ctx | ) |
Pressure 18 check communication function.
This function checks communication by reading and verifying the chip ID value.
[in] | ctx | : Click context object. See pressure18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure18_default_cfg | ( | pressure18_t * | ctx | ) |
Pressure 18 default configuration function.
This function executes a default configuration of Pressure 18 click board.
[in] | ctx | : Click context object. See pressure18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void pressure18_drv_interface_selection | ( | pressure18_cfg_t * | cfg, |
pressure18_drv_t | drv_sel | ||
) |
Pressure 18 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 pressure18_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See pressure18_drv_t object definition for detailed explanation. |
err_t pressure18_generic_read | ( | pressure18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Pressure 18 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See pressure18_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 pressure18_generic_write | ( | pressure18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Pressure 18 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See pressure18_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. uint8_t pressure18_get_int_pin | ( | pressure18_t * | ctx | ) |
Pressure 18 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See pressure18_t object definition for detailed explanation. |
err_t pressure18_init | ( | pressure18_t * | ctx, |
pressure18_cfg_t * | cfg | ||
) |
Pressure 18 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See pressure18_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See pressure18_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure18_read_data | ( | pressure18_t * | ctx, |
float * | pressure, | ||
float * | temperature | ||
) |
Pressure 18 read data function.
This function reads the sensor measurements data: pressure in Pascals and temperature in Celsius.
[in] | ctx | : Click context object. See pressure18_t object definition for detailed explanation. |
[out] | pressure | : Pressure in Pascals. |
[out] | temperature | : Temperature in Celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure18_read_register | ( | pressure18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
Pressure 18 read register function.
This function reads data from the selected register.
[in] | ctx | : Click context object. See pressure18_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure18_soft_reset | ( | pressure18_t * | ctx | ) |
Pressure 18 soft reset function.
This function performs the software reset feature.
[in] | ctx | : Click context object. See pressure18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure18_write_register | ( | pressure18_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
Pressure 18 write register function.
This function writes a desired data to the selected register.
[in] | ctx | : Click context object. See pressure18_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.