pressure17 2.0.0.0
|
API for configuring and manipulating Pressure 17 Click driver. More...
Topics | |
Pressure 17 Registers List | |
List of registers of Pressure 17 Click driver. | |
Pressure 17 Registers Settings | |
Settings for registers of Pressure 17 Click driver. | |
Pressure 17 MikroBUS Map | |
MikroBUS pin mapping of Pressure 17 Click driver. | |
Functions | |
void | pressure17_cfg_setup (pressure17_cfg_t *cfg) |
Pressure 17 configuration object setup function. | |
err_t | pressure17_init (pressure17_t *ctx, pressure17_cfg_t *cfg) |
Pressure 17 initialization function. | |
err_t | pressure17_default_cfg (pressure17_t *ctx) |
Pressure 17 default configuration function. | |
err_t | pressure17_generic_write (pressure17_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Pressure 17 I2C writing function. | |
err_t | pressure17_generic_read (pressure17_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Pressure 17 I2C reading function. | |
err_t | pressure17_write_register (pressure17_t *ctx, uint8_t reg, uint8_t data_in) |
Pressure 17 write register function. | |
err_t | pressure17_read_register (pressure17_t *ctx, uint8_t reg, uint8_t *data_out) |
Pressure 17 read register function. | |
err_t | pressure17_check_communication (pressure17_t *ctx) |
Pressure 17 check communication function. | |
err_t | pressure17_read_data (pressure17_t *ctx, float *pressure, float *temperature) |
Pressure 17 read data function. | |
uint8_t | pressure17_get_int_pin (pressure17_t *ctx) |
Pressure 17 get int pin function. | |
API for configuring and manipulating Pressure 17 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void pressure17_cfg_setup | ( | pressure17_cfg_t * | cfg | ) |
Pressure 17 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See pressure17_cfg_t object definition for detailed explanation. |
err_t pressure17_check_communication | ( | pressure17_t * | ctx | ) |
Pressure 17 check communication function.
This function checks the communication by reading and verifying the manufacturer and part IDs.
[in] | ctx | : Click context object. See pressure17_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t pressure17_default_cfg | ( | pressure17_t * | ctx | ) |
Pressure 17 default configuration function.
This function executes a default configuration of Pressure 17 click board.
[in] | ctx | : Click context object. See pressure17_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t pressure17_generic_read | ( | pressure17_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Pressure 17 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 pressure17_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t pressure17_generic_write | ( | pressure17_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Pressure 17 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 pressure17_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.uint8_t pressure17_get_int_pin | ( | pressure17_t * | ctx | ) |
Pressure 17 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See pressure17_t object definition for detailed explanation. |
err_t pressure17_init | ( | pressure17_t * | ctx, |
pressure17_cfg_t * | cfg ) |
Pressure 17 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See pressure17_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See pressure17_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t pressure17_read_data | ( | pressure17_t * | ctx, |
float * | pressure, | ||
float * | temperature ) |
Pressure 17 read data function.
This function checks if the data is ready and then reads the pressure and temperature raw data and converts them to millibar and Celsius respectfully.
[in] | ctx | : Click context object. See pressure17_t object definition for detailed explanation. |
[out] | pressure | : Pressure data [mbar]. |
[out] | temperature | : Temperature data [Celsius]. |
0
- Success, -1
- Error.err_t pressure17_read_register | ( | pressure17_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Pressure 17 read register function.
This function reads data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See pressure17_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t pressure17_write_register | ( | pressure17_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Pressure 17 write register function.
This function writes a data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See pressure17_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.