barometer6 2.0.0.0
|
API for configuring and manipulating Barometer 6 Click driver. More...
Topics | |
Barometer 6 Registers List | |
List of registers of Barometer 6 Click driver. | |
Barometer 6 Registers Settings | |
Settings for registers of Barometer 6 Click driver. | |
Barometer 6 MikroBUS Map | |
MikroBUS pin mapping of Barometer 6 Click driver. | |
Functions | |
void | barometer6_cfg_setup (barometer6_cfg_t *cfg) |
Barometer 6 configuration object setup function. | |
void | barometer6_drv_interface_selection (barometer6_cfg_t *cfg, barometer6_drv_t drv_sel) |
Barometer 6 driver interface setup function. | |
err_t | barometer6_init (barometer6_t *ctx, barometer6_cfg_t *cfg) |
Barometer 6 initialization function. | |
void | barometer6_default_cfg (barometer6_t *ctx) |
Barometer 6 default configuration function. | |
err_t | barometer6_generic_write (barometer6_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Barometer 6 data writing function. | |
err_t | barometer6_generic_read (barometer6_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Barometer 6 data reading function. | |
void | barometer6_write_register (barometer6_t *ctx, uint8_t reg, uint8_t data_in) |
Barometer 6 data writing function. | |
void | barometer6_read_register (barometer6_t *ctx, uint8_t reg, uint16_t *data_out) |
Barometer 6 data reading function. | |
void | barometer6_read_id (barometer6_t *ctx, uint8_t *data_out) |
Barometer 6 Id reading function. | |
void | barometer6_software_reset (barometer6_t *ctx) |
Barometer 6 software reset function. | |
void | barometer6_hardware_reset (barometer6_t *ctx) |
Barometer 6 hardware reset function. | |
void | barometer6_set_avrege (barometer6_t *ctx, uint8_t temp_avg, uint8_t pressure_avg) |
Barometer 6 set average data function. | |
void | barometer6_set_mode (barometer6_t *ctx, uint8_t mode) |
Barometer 6 set operation mode function. | |
void | barometer6_set_standby_time (barometer6_t *ctx, uint8_t t_standby) |
Barometer 6 set standby time function. | |
uint8_t | barometer6_check_ready (barometer6_t *ctx) |
Barometer 6 check if data is ready function. | |
void | barometer6_read_raw_temp (barometer6_t *ctx, int32_t *data_out) |
Barometer 6 read raw temperature function. | |
void | barometer6_read_raw_pressure (barometer6_t *ctx, float *data_out) |
Barometer 6 read raw pressure function. | |
void | barometer6_read_conp_coef (barometer6_t *ctx, uint8_t reg, int16_t *data_out) |
Barometer 6 read conpensation coefficients data function. | |
void | barometer6_get_conp_coef (barometer6_t *ctx, uint8_t reg, float a_coef, float s_coef, float *data_out) |
Barometer 6 calculate conpensation coefficients data function. | |
void | barometer6_get_a0_b00_coef (barometer6_t *ctx, float *coef_a0, float *coef_b00) |
Barometer 6 calculate a0 and b00 conpensation coefficients data function. | |
void | barometer6_get_conpesation_coe (barometer6_t *ctx) |
Barometer 6 get all conpensation coefficients data function. | |
void | barometer6_get_temperature_data (barometer6_t *ctx, float *temp_out) |
Barometer 6 get temperature data function. | |
void | barometer6_read_temperature_value (barometer6_t *ctx, float *temp_out) |
Barometer 6 get temperature value function. | |
void | barometer6_read_preassure_data (barometer6_t *ctx, float *press_out) |
Barometer 6 get preassure data function. | |
void | barometer6_read_preassure_value (barometer6_t *ctx, float *press_out) |
Barometer 6 get preassure mBar function. | |
API for configuring and manipulating Barometer 6 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void barometer6_cfg_setup | ( | barometer6_cfg_t * | cfg | ) |
Barometer 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See barometer6_cfg_t object definition for detailed explanation. |
uint8_t barometer6_check_ready | ( | barometer6_t * | ctx | ) |
Barometer 6 check if data is ready function.
This function is used for checking if data is ready to be read.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
0
- Data not ready, 1
- Data is ready. void barometer6_default_cfg | ( | barometer6_t * | ctx | ) |
Barometer 6 default configuration function.
This function executes a default configuration of Barometer 6 click board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
void barometer6_drv_interface_selection | ( | barometer6_cfg_t * | cfg, |
barometer6_drv_t | drv_sel ) |
Barometer 6 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 barometer6_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See barometer6_drv_t object definition for detailed explanation. |
err_t barometer6_generic_read | ( | barometer6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Barometer 6 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See barometer6_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 barometer6_generic_write | ( | barometer6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Barometer 6 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See barometer6_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.void barometer6_get_a0_b00_coef | ( | barometer6_t * | ctx, |
float * | coef_a0, | ||
float * | coef_b00 ) |
Barometer 6 calculate a0 and b00 conpensation coefficients data function.
This function is used for calculate a0 and b00 conpensation coefficient's data of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[out] | coef_a0 | : Conversion factor a0. |
[out] | coef_b00 | : Conversion factor b00. |
void barometer6_get_conp_coef | ( | barometer6_t * | ctx, |
uint8_t | reg, | ||
float | a_coef, | ||
float | s_coef, | ||
float * | data_out ) |
Barometer 6 calculate conpensation coefficients data function.
This function is used for calculate conpensation coefficient's data of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | a_coef | : Conversion factor A. |
[in] | s_coef | : Conversion factor S. |
[out] | data_out | : Output read data. |
void barometer6_get_conpesation_coe | ( | barometer6_t * | ctx | ) |
Barometer 6 get all conpensation coefficients data function.
This function is used for getting all conpensation coefficients data of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
void barometer6_get_temperature_data | ( | barometer6_t * | ctx, |
float * | temp_out ) |
Barometer 6 get temperature data function.
This function is used for temperature data of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[out] | temp_out | : Output read data. |
void barometer6_hardware_reset | ( | barometer6_t * | ctx | ) |
Barometer 6 hardware reset function.
This function is used for performing hardware reset of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
err_t barometer6_init | ( | barometer6_t * | ctx, |
barometer6_cfg_t * | cfg ) |
Barometer 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See barometer6_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void barometer6_read_conp_coef | ( | barometer6_t * | ctx, |
uint8_t | reg, | ||
int16_t * | data_out ) |
Barometer 6 read conpensation coefficients data function.
This function is used for reading conpensation coefficient's data of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
void barometer6_read_id | ( | barometer6_t * | ctx, |
uint8_t * | data_out ) |
Barometer 6 Id reading function.
This function reads a chip id from the CHIP_ID register.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
void barometer6_read_preassure_data | ( | barometer6_t * | ctx, |
float * | press_out ) |
Barometer 6 get preassure data function.
This function is used for preassure data in degrees celsius of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[out] | press_out | : Output read data. |
void barometer6_read_preassure_value | ( | barometer6_t * | ctx, |
float * | press_out ) |
Barometer 6 get preassure mBar function.
This function is used for preassure mBar in degrees celsius of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[out] | press_out | : Output read data in mBar. |
void barometer6_read_raw_pressure | ( | barometer6_t * | ctx, |
float * | data_out ) |
Barometer 6 read raw pressure function.
This function is used for reading raw pressure walue of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[out] | data_out | : Raw pressure data. |
void barometer6_read_raw_temp | ( | barometer6_t * | ctx, |
int32_t * | data_out ) |
Barometer 6 read raw temperature function.
This function is used for reading raw temperature walue of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[out] | data_out | : Raw temperature data. |
void barometer6_read_register | ( | barometer6_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out ) |
Barometer 6 data reading function.
This function reads a 16 bits of data starting from the selected register.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
void barometer6_read_temperature_value | ( | barometer6_t * | ctx, |
float * | temp_out ) |
Barometer 6 get temperature value function.
This function is used for temperature value in degrees celsius of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[out] | temp_out | : Output read data in degrees celsius. |
void barometer6_set_avrege | ( | barometer6_t * | ctx, |
uint8_t | temp_avg, | ||
uint8_t | pressure_avg ) |
Barometer 6 set average data function.
This function is used for setting average data of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[in] | temp_avg | : Average data for the temperaature. |
[in] | pressure_avg | : Average data for the preassure. |
void barometer6_set_mode | ( | barometer6_t * | ctx, |
uint8_t | mode ) |
Barometer 6 set operation mode function.
This function is used for setting operating mode of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[in] | mode | : Selected operation mode. |
void barometer6_set_standby_time | ( | barometer6_t * | ctx, |
uint8_t | t_standby ) |
Barometer 6 set standby time function.
This function is used for setting standby time of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[in] | t_standby | : Selected standby time. |
void barometer6_software_reset | ( | barometer6_t * | ctx | ) |
Barometer 6 software reset function.
This function is used for performing software reset of the Barometer 6 Clock Board.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
void barometer6_write_register | ( | barometer6_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Barometer 6 data writing function.
This function writes a byte data into the selected register.
[in] | ctx | : Click context object. See barometer6_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |