pressure2307ba
2.1.0.0
|
API for configuring and manipulating Pressure 23 07BA Click driver. More...
Modules | |
Pressure 23 07BA Registers List | |
List of registers of Pressure 23 07BA Click driver. | |
Pressure 23 07BA Command List | |
List of commands of Pressure 23 07BA Click driver. | |
Pressure 23 07BA Registers Settings | |
Settings for registers of Pressure 23 07BA Click driver. | |
Pressure 23 07BA MikroBUS Map | |
MikroBUS pin mapping of Pressure 23 07BA Click driver. | |
Functions | |
void | pressure2307ba_cfg_setup (pressure2307ba_cfg_t *cfg) |
Pressure 23 07BA configuration object setup function. More... | |
void | pressure2307ba_drv_int_sel (pressure2307ba_cfg_t *cfg, pressure2307ba_drv_t drv_sel) |
Pressure 23 07BA driver interface setup function. More... | |
err_t | pressure2307ba_init (pressure2307ba_t *ctx, pressure2307ba_cfg_t *cfg) |
Pressure 23 07BA initialization function. More... | |
err_t | pressure2307ba_default_cfg (pressure2307ba_t *ctx) |
Pressure 23 07BA default configuration function. More... | |
err_t | pressure2307ba_generic_write (pressure2307ba_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Pressure 23 07BA data writing function. More... | |
err_t | pressure2307ba_generic_read (pressure2307ba_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Pressure 23 07BA data reading function. More... | |
err_t | pressure2307ba_set_command (pressure2307ba_t *ctx, uint8_t cmd) |
Pressure 23 07BA set the command function. More... | |
err_t | pressure2307ba_sw_reset (pressure2307ba_t *ctx) |
Pressure 23 07BA software reset function. More... | |
err_t | pressure2307ba_read_memory (pressure2307ba_t *ctx, uint8_t reg, uint16_t *prom) |
Pressure 23 07BA read memory function. More... | |
err_t | pressure2307ba_start_conversion (pressure2307ba_t *ctx, uint8_t sel_cnv) |
Pressure 23 07BA start the conversion function. More... | |
err_t | pressure2307ba_write_config (pressure2307ba_t *ctx, pressure2307ba_sensor_cfg_t config) |
Pressure 23 07BA configuration data writing function. More... | |
err_t | pressure2307ba_read_config (pressure2307ba_t *ctx, uint8_t sel_cfg, pressure2307ba_sensor_cfg_t *config) |
Pressure 23 07BA configuration data reading function. More... | |
err_t | pressure2307ba_read_adc (pressure2307ba_t *ctx, uint8_t sel_data, uint32_t *adc_data) |
Pressure 23 07BA ADC data reading function. More... | |
err_t | pressure2307ba_write_op_reg (pressure2307ba_t *ctx, uint8_t fifo_int_th, uint8_t fifo_mode, uint8_t delay) |
Pressure 23 07BA operation register data writing function. More... | |
err_t | pressure2307ba_read_op_reg (pressure2307ba_t *ctx, uint8_t *fifo_int_th, uint8_t *fifo_mode, uint8_t *delay) |
Pressure 23 07BA operation register data reading function. More... | |
err_t | pressure2307ba_write_int_mask (pressure2307ba_t *ctx, uint16_t int_mask_data) |
Pressure 23 07BA interrupt mask data writing function. More... | |
err_t | pressure2307ba_read_int_mask (pressure2307ba_t *ctx, uint16_t *int_mask_data) |
Pressure 23 07BA interrupt mask data reading function. More... | |
err_t | pressure2307ba_write_int_reg (pressure2307ba_t *ctx, uint16_t int_reg_data) |
Pressure 23 07BA interrupt register data writing function. More... | |
err_t | pressure2307ba_read_int_reg (pressure2307ba_t *ctx, uint16_t *int_reg_data) |
Pressure 23 07BA interrupt register data reading function. More... | |
err_t | pressure2307ba_write_lim_reg (pressure2307ba_t *ctx, uint8_t sel_adr, uint8_t sel_lim, uint16_t lim_reg_data) |
Pressure 23 07BA limit register data writing function. More... | |
err_t | pressure2307ba_read_lim_reg (pressure2307ba_t *ctx, uint8_t sel_adr, uint8_t sel_lim, uint16_t *lim_reg_data) |
Pressure 23 07BA limit register data reading function. More... | |
err_t | pressure2307ba_get_adc_data_press (pressure2307ba_t *ctx, uint32_t *pressure) |
Pressure 23 07BA get the ADC pressure data function. More... | |
err_t | pressure2307ba_get_adc_data_temp (pressure2307ba_t *ctx, uint32_t *temperature) |
Pressure 23 07BA get the ADC temperature data function. More... | |
err_t | pressure2307ba_get_calibration_data (pressure2307ba_t *ctx) |
Pressure 23 07BA gets the calibration data function. More... | |
err_t | pressure2307ba_get_measurement_data (pressure2307ba_t *ctx, float *pressure, float *temperature) |
Pressure 23 07BA gets the measurement data function. More... | |
uint8_t | pressure2307ba_get_interrupt (pressure2307ba_t *ctx) |
Pressure 23 07BA gets the interrupt function. More... | |
API for configuring and manipulating Pressure 23 07BA Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void pressure2307ba_cfg_setup | ( | pressure2307ba_cfg_t * | cfg | ) |
Pressure 23 07BA configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See pressure2307ba_cfg_t object definition for detailed explanation. |
err_t pressure2307ba_default_cfg | ( | pressure2307ba_t * | ctx | ) |
Pressure 23 07BA default configuration function.
This function executes a default configuration of Pressure 23 07BA Click board.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void pressure2307ba_drv_int_sel | ( | pressure2307ba_cfg_t * | cfg, |
pressure2307ba_drv_t | drv_sel | ||
) |
Pressure 23 07BA 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 pressure2307ba_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See pressure2307ba_drv_t object definition for detailed explanation. |
err_t pressure2307ba_generic_read | ( | pressure2307ba_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Pressure 23 07BA data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See pressure2307ba_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 pressure2307ba_generic_write | ( | pressure2307ba_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Pressure 23 07BA data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See pressure2307ba_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 pressure2307ba_get_adc_data_press | ( | pressure2307ba_t * | ctx, |
uint32_t * | pressure | ||
) |
Pressure 23 07BA get the ADC pressure data function.
This function reads a raw digital pressure value of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[out] | pressure | : Raw digital pressure value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_get_adc_data_temp | ( | pressure2307ba_t * | ctx, |
uint32_t * | temperature | ||
) |
Pressure 23 07BA get the ADC temperature data function.
This function reads a raw digital temperature value of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[out] | temperature | : Raw digital temperature value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_get_calibration_data | ( | pressure2307ba_t * | ctx | ) |
Pressure 23 07BA gets the calibration data function.
This function reads and store calibration data, factory calibrated from the PROM memory of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t pressure2307ba_get_interrupt | ( | pressure2307ba_t * | ctx | ) |
Pressure 23 07BA gets the interrupt function.
This function get states of the interrupt [INT] pin of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. err_t pressure2307ba_get_measurement_data | ( | pressure2307ba_t * | ctx, |
float * | pressure, | ||
float * | temperature | ||
) |
Pressure 23 07BA gets the measurement data function.
This function reads temperature and pressure data conversion of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[out] | pressure | : Pressure data ( mbar ). |
[out] | temperature | : Temperature data ( degree Celsius ). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_init | ( | pressure2307ba_t * | ctx, |
pressure2307ba_cfg_t * | cfg | ||
) |
Pressure 23 07BA initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See pressure2307ba_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_read_adc | ( | pressure2307ba_t * | ctx, |
uint8_t | sel_data, | ||
uint32_t * | adc_data | ||
) |
Pressure 23 07BA ADC data reading function.
This function reads a desired ADC register data, converted pressure or/and temperature value of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | sel_data | : ADC register data selection
|
[out] | adc_data | : Desired ADC raw data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_read_config | ( | pressure2307ba_t * | ctx, |
uint8_t | sel_cfg, | ||
pressure2307ba_sensor_cfg_t * | config | ||
) |
Pressure 23 07BA configuration data reading function.
This function reads a sensor configuration of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[out] | config | : Sensor configuration object. See pressure2307ba_sensor_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_read_int_mask | ( | pressure2307ba_t * | ctx, |
uint16_t * | int_mask_data | ||
) |
Pressure 23 07BA interrupt mask data reading function.
This function reads a interrupt mask data which may trigger the application to execute specific actions of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[out] | int_mask_data | : Interrupt mask data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_read_int_reg | ( | pressure2307ba_t * | ctx, |
uint16_t * | int_reg_data | ||
) |
Pressure 23 07BA interrupt register data reading function.
This function reads a interrupt register data which may trigger the application to execute specific actions of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[out] | int_reg_data | : Interrupt register data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_read_lim_reg | ( | pressure2307ba_t * | ctx, |
uint8_t | sel_adr, | ||
uint8_t | sel_lim, | ||
uint16_t * | lim_reg_data | ||
) |
Pressure 23 07BA limit register data reading function.
This function reads a limit register data of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | sel_adr | : Limit register data selection
|
[in] | sel_lim | : Limit selection
|
[out] | lim_reg_data | : Limit register data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_read_memory | ( | pressure2307ba_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | prom | ||
) |
Pressure 23 07BA read memory function.
This function reads memory is used to download coefficients programmed in the memory during factory calibration of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | prom | : Output read data from PROM. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_read_op_reg | ( | pressure2307ba_t * | ctx, |
uint8_t * | fifo_int_th, | ||
uint8_t * | fifo_mode, | ||
uint8_t * | delay | ||
) |
Pressure 23 07BA operation register data reading function.
This function reads a operation register data of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[out] | fifo_int_th | : FIFO Interrupt threshold [0-31]. |
[out] | fifo_mode | : FIFO mode [0-2]. |
[out] | delay | : Time between automatically triggered measurements [0-13]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_set_command | ( | pressure2307ba_t * | ctx, |
uint8_t | cmd | ||
) |
Pressure 23 07BA set the command function.
This function writes the desired command of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | cmd | : Command byte. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_start_conversion | ( | pressure2307ba_t * | ctx, |
uint8_t | sel_cnv | ||
) |
Pressure 23 07BA start the conversion function.
This function start the desired conversion, pressure or temperature conversion of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | sel_cnv | : Conversion selection
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_sw_reset | ( | pressure2307ba_t * | ctx | ) |
Pressure 23 07BA software reset function.
This function performs the reset sequence shall be sent once after power-on to make sure that the calibration data gets loaded into the internal register of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_write_config | ( | pressure2307ba_t * | ctx, |
pressure2307ba_sensor_cfg_t | config | ||
) |
Pressure 23 07BA configuration data writing function.
This function writes a desired sensor configuration of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | config | : Sensor configuration object. See pressure2307ba_sensor_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_write_int_mask | ( | pressure2307ba_t * | ctx, |
uint16_t | int_mask_data | ||
) |
Pressure 23 07BA interrupt mask data writing function.
This function writes a interrupt mask data to enable interruptions which may trigger the application to execute specific actions of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | int_mask_data | : Interrupt mask data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_write_int_reg | ( | pressure2307ba_t * | ctx, |
uint16_t | int_reg_data | ||
) |
Pressure 23 07BA interrupt register data writing function.
This function writes a interrupt register data to enable interruptions which may trigger the application to execute specific actions of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | int_reg_data | : Interrupt register data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_write_lim_reg | ( | pressure2307ba_t * | ctx, |
uint8_t | sel_adr, | ||
uint8_t | sel_lim, | ||
uint16_t | lim_reg_data | ||
) |
Pressure 23 07BA limit register data writing function.
This function writes a limit register data to allow to automatically rise an interrupt if one or both converted values does exceed the limits programmed in the registers which may trigger the application to execute specific actions of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | sel_adr | : Limit register data selection
|
[in] | sel_lim | : Limit selection
|
[in] | lim_reg_data | : Limit register data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure2307ba_write_op_reg | ( | pressure2307ba_t * | ctx, |
uint8_t | fifo_int_th, | ||
uint8_t | fifo_mode, | ||
uint8_t | delay | ||
) |
Pressure 23 07BA operation register data writing function.
This function writes a operation register to control behavior of the FIFO and the automatic mode of the MS5849-07BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 07BA Click board™.
[in] | ctx | : Click context object. See pressure2307ba_t object definition for detailed explanation. |
[in] | fifo_int_th | : FIFO Interrupt threshold [0-31]. |
[in] | fifo_mode | : FIFO mode [0-2]. |
[in] | delay | : Time between automatically triggered measurements [0-13]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.