barometer12 2.1.0.0
|
API for configuring and manipulating Barometer 12 Click driver. More...
Modules | |
Barometer 12 Registers Settings | |
Settings for registers of Barometer 12 Click driver. | |
Barometer 12 MikroBUS Map | |
MikroBUS pin mapping of Barometer 12 Click driver. | |
Functions | |
void | barometer12_cfg_setup (barometer12_cfg_t *cfg) |
Barometer 12 configuration object setup function. More... | |
err_t | barometer12_init (barometer12_t *ctx, barometer12_cfg_t *cfg) |
Barometer 12 initialization function. More... | |
err_t | barometer12_default_cfg (barometer12_t *ctx) |
Barometer 12 default configuration function. More... | |
err_t | barometer12_generic_write (barometer12_t *ctx, uint16_t cmd, uint16_t *data_in, uint8_t len) |
Barometer 12 I2C writing function. More... | |
err_t | barometer12_generic_read (barometer12_t *ctx, uint16_t cmd, uint16_t *data_out, uint8_t len) |
Barometer 12 I2C reading function. More... | |
err_t | barometer12_set_command (barometer12_t *ctx, uint16_t cmd) |
Barometer 12 set command function. More... | |
err_t | barometer12_soft_reset (barometer12_t *ctx) |
Barometer 12 software reset function. More... | |
err_t | barometer12_get_device_id (barometer12_t *ctx, uint16_t *device_id) |
Barometer 12 get device ID function. More... | |
err_t | barometer12_set_up_otp_read (barometer12_t *ctx) |
Barometer 12 set up OTP read function. More... | |
err_t | barometer12_get_otp (barometer12_t *ctx, uint16_t *otp_data) |
Barometer 12 get OTP function. More... | |
err_t | barometer12_inv_invpres_calibration (barometer12_t *ctx, barometer12_invpres_t *cfg_data) |
Barometer 12 inverse process data function. More... | |
err_t | barometer12_get_raw_data (barometer12_t *ctx, uint16_t measurement_comd, uint32_t *pressure, uint16_t *temperature) |
Barometer 12 get RAW data function. More... | |
err_t | barometer12_get_pressure_and_temperature (barometer12_t *ctx, float *pressure, float *temperature) |
Barometer 12 get pressure and temperature function. More... | |
API for configuring and manipulating Barometer 12 Click driver.
void barometer12_cfg_setup | ( | barometer12_cfg_t * | cfg | ) |
Barometer 12 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See barometer12_cfg_t object definition for detailed explanation. |
err_t barometer12_default_cfg | ( | barometer12_t * | ctx | ) |
Barometer 12 default configuration function.
This function executes a default configuration of Barometer 12 click board.
[in] | ctx | : Click context object. See barometer12_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer12_generic_read | ( | barometer12_t * | ctx, |
uint16_t | cmd, | ||
uint16_t * | data_out, | ||
uint8_t | len | ||
) |
Barometer 12 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 barometer12_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 barometer12_generic_write | ( | barometer12_t * | ctx, |
uint16_t | cmd, | ||
uint16_t * | data_in, | ||
uint8_t | len | ||
) |
Barometer 12 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 barometer12_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 barometer12_get_device_id | ( | barometer12_t * | ctx, |
uint16_t * | device_id | ||
) |
Barometer 12 get device ID function.
This function read device ID of the Barometer 12 click board™.
[in] | ctx | : Click context object. See barometer12_t object definition for detailed explanation. |
[out] | device_id | : Device ID value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer12_get_otp | ( | barometer12_t * | ctx, |
uint16_t * | otp_data | ||
) |
Barometer 12 get OTP function.
This function read OTP values of the Barometer 12 click board™.
[in] | ctx | : Click context object. See barometer12_t object definition for detailed explanation. |
[out] | otp_data | : OTP values. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer12_get_pressure_and_temperature | ( | barometer12_t * | ctx, |
float * | pressure, | ||
float * | temperature | ||
) |
Barometer 12 get pressure and temperature function.
This function read pressure ( Pa ) and temperature ( degree Celsius ) of the Barometer 12 click board™.
[in] | ctx | : Click context object. See barometer12_t object definition for detailed explanation. |
[out] | pressure | : Pressure data ( Pa ). |
[out] | temperature | : Temperature data ( degree Celsius ). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer12_get_raw_data | ( | barometer12_t * | ctx, |
uint16_t | measurement_comd, | ||
uint32_t * | pressure, | ||
uint16_t * | temperature | ||
) |
Barometer 12 get RAW data function.
This function read RAW data of the Barometer 12 click board™.
[in] | ctx | : Click context object. See barometer12_t object definition for detailed explanation. |
[in] | measurement_comd | : Operation mode measurement commands. |
[out] | pressure | : RAW pressure data. |
[out] | temperature | : RAW temperature data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer12_init | ( | barometer12_t * | ctx, |
barometer12_cfg_t * | cfg | ||
) |
Barometer 12 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See barometer12_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See barometer12_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer12_inv_invpres_calibration | ( | barometer12_t * | ctx, |
barometer12_invpres_t * | cfg_data | ||
) |
Barometer 12 inverse process data function.
This function performs a inverse process data of the Barometer 12 click board™.
[in] | ctx | : Click context object. See barometer12_t object definition for detailed explanation. |
[in] | cfg_data | : Data structure to hold pressure sensor related parameters. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer12_set_command | ( | barometer12_t * | ctx, |
uint16_t | cmd | ||
) |
Barometer 12 set command function.
This function sets desired command of the Barometer 12 click board™.
[in] | ctx | : Click context object. See barometer12_t object definition for detailed explanation. |
[in] | cmd | : Desired command. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer12_set_up_otp_read | ( | barometer12_t * | ctx | ) |
Barometer 12 set up OTP read function.
This function performs a OTP read mode of the Barometer 12 click board™.
[in] | ctx | : Click context object. See barometer12_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t barometer12_soft_reset | ( | barometer12_t * | ctx | ) |
Barometer 12 software reset function.
This function performs a software reset of the Barometer 12 click board™.
[in] | ctx | : Click context object. See barometer12_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.