pressure23 2.1.0.0
|
API for configuring and manipulating Pressure 23 Click driver. More...
Topics | |
Pressure 23 Registers List | |
List of registers of Pressure 23 Click driver. | |
Pressure 23 Command List | |
List of commands of Pressure 23 Click driver. | |
Pressure 23 Registers Settings | |
Settings for registers of Pressure 23 Click driver. | |
Pressure 23 MikroBUS Map | |
MikroBUS pin mapping of Pressure 23 Click driver. | |
Functions | |
void | pressure23_cfg_setup (pressure23_cfg_t *cfg) |
Pressure 23 configuration object setup function. | |
void | pressure23_drv_interface_selection (pressure23_cfg_t *cfg, pressure23_drv_t drv_sel) |
Pressure 23 driver interface setup function. | |
err_t | pressure23_init (pressure23_t *ctx, pressure23_cfg_t *cfg) |
Pressure 23 initialization function. | |
err_t | pressure23_default_cfg (pressure23_t *ctx) |
Pressure 23 default configuration function. | |
err_t | pressure23_generic_write (pressure23_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Pressure 23 data writing function. | |
err_t | pressure23_generic_read (pressure23_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Pressure 23 data reading function. | |
err_t | pressure23_set_command (pressure23_t *ctx, uint8_t cmd) |
Pressure 23 set the command function. | |
err_t | pressure23_sw_reset (pressure23_t *ctx) |
Pressure 23 software reset function. | |
err_t | pressure23_read_memory (pressure23_t *ctx, uint8_t reg, uint16_t *prom) |
Pressure 23 read memory function. | |
err_t | pressure23_start_conversion (pressure23_t *ctx, uint8_t sel_cnv) |
Pressure 23 start the conversion function. | |
err_t | pressure23_write_config (pressure23_t *ctx, pressure23_sensor_cfg_t config) |
Pressure 23 configuration data writing function. | |
err_t | pressure23_read_config (pressure23_t *ctx, uint8_t sel_cfg, pressure23_sensor_cfg_t *config) |
Pressure 23 configuration data reading function. | |
err_t | pressure23_read_adc (pressure23_t *ctx, uint8_t sel_data, uint32_t *adc_data) |
Pressure 23 ADC data reading function. | |
err_t | pressure23_write_op_reg (pressure23_t *ctx, uint8_t fifo_int_th, uint8_t fifo_mode, uint8_t delay) |
Pressure 23 operation register data writing function. | |
err_t | pressure23_read_op_reg (pressure23_t *ctx, uint8_t *fifo_int_th, uint8_t *fifo_mode, uint8_t *delay) |
Pressure 23 operation register data reading function. | |
err_t | pressure23_write_int_mask (pressure23_t *ctx, uint16_t int_mask_data) |
Pressure 23 interrupt mask data writing function. | |
err_t | pressure23_read_int_mask (pressure23_t *ctx, uint16_t *int_mask_data) |
Pressure 23 interrupt mask data reading function. | |
err_t | pressure23_write_int_reg (pressure23_t *ctx, uint16_t int_reg_data) |
Pressure 23 interrupt register data writing function. | |
err_t | pressure23_read_int_reg (pressure23_t *ctx, uint16_t *int_reg_data) |
Pressure 23 interrupt register data reading function. | |
err_t | pressure23_write_lim_reg (pressure23_t *ctx, uint8_t sel_adr, uint8_t sel_lim, uint16_t lim_reg_data) |
Pressure 23 limit register data writing function. | |
err_t | pressure23_read_lim_reg (pressure23_t *ctx, uint8_t sel_adr, uint8_t sel_lim, uint16_t *lim_reg_data) |
Pressure 23 limit register data reading function. | |
err_t | pressure23_get_adc_data_press (pressure23_t *ctx, uint32_t *pressure) |
Pressure 23 get the ADC pressure data function. | |
err_t | pressure23_get_adc_data_temp (pressure23_t *ctx, uint32_t *temperature) |
Pressure 23 get the ADC temperature data function. | |
err_t | pressure23_get_calibration_data (pressure23_t *ctx) |
Pressure 23 gets the calibration data function. | |
err_t | pressure23_get_measurement_data (pressure23_t *ctx, float *pressure, float *temperature) |
Pressure 23 gets the measurement data function. | |
uint8_t | pressure23_get_interrupt (pressure23_t *ctx) |
Pressure 23 gets the interrupt function. | |
API for configuring and manipulating Pressure 23 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void pressure23_cfg_setup | ( | pressure23_cfg_t * | cfg | ) |
Pressure 23 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See pressure23_cfg_t object definition for detailed explanation. |
err_t pressure23_default_cfg | ( | pressure23_t * | ctx | ) |
Pressure 23 default configuration function.
This function executes a default configuration of Pressure 23 click board.
[in] | ctx | : Click context object. See pressure23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void pressure23_drv_interface_selection | ( | pressure23_cfg_t * | cfg, |
pressure23_drv_t | drv_sel ) |
Pressure 23 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 pressure23_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See pressure23_drv_t object definition for detailed explanation. |
err_t pressure23_generic_read | ( | pressure23_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Pressure 23 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See pressure23_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 pressure23_generic_write | ( | pressure23_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Pressure 23 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See pressure23_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 pressure23_get_adc_data_press | ( | pressure23_t * | ctx, |
uint32_t * | pressure ) |
Pressure 23 get the ADC pressure data function.
This function reads a raw digital pressure value of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_get_adc_data_temp | ( | pressure23_t * | ctx, |
uint32_t * | temperature ) |
Pressure 23 get the ADC temperature data function.
This function reads a raw digital temperature value of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_get_calibration_data | ( | pressure23_t * | ctx | ) |
Pressure 23 gets the calibration data function.
This function reads and store calibration data, factory calibrated from the PROM memory of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t pressure23_get_interrupt | ( | pressure23_t * | ctx | ) |
Pressure 23 gets the interrupt function.
This function get states of the interrupt [INT] pin of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. err_t pressure23_get_measurement_data | ( | pressure23_t * | ctx, |
float * | pressure, | ||
float * | temperature ) |
Pressure 23 gets the measurement data function.
This function reads temperature and pressure data conversion of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_init | ( | pressure23_t * | ctx, |
pressure23_cfg_t * | cfg ) |
Pressure 23 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See pressure23_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See pressure23_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure23_read_adc | ( | pressure23_t * | ctx, |
uint8_t | sel_data, | ||
uint32_t * | adc_data ) |
Pressure 23 ADC data reading function.
This function reads a desired ADC register data, converted pressure or/and temperature value of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_read_config | ( | pressure23_t * | ctx, |
uint8_t | sel_cfg, | ||
pressure23_sensor_cfg_t * | config ) |
Pressure 23 configuration data reading function.
This function reads a sensor configuration of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_t object definition for detailed explanation. |
[out] | config | : Sensor configuration object. See pressure23_sensor_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure23_read_int_mask | ( | pressure23_t * | ctx, |
uint16_t * | int_mask_data ) |
Pressure 23 interrupt mask data reading function.
This function reads a interrupt mask data which may trigger the application to execute specific actions of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_read_int_reg | ( | pressure23_t * | ctx, |
uint16_t * | int_reg_data ) |
Pressure 23 interrupt register data reading function.
This function reads a interrupt register data which may trigger the application to execute specific actions of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_read_lim_reg | ( | pressure23_t * | ctx, |
uint8_t | sel_adr, | ||
uint8_t | sel_lim, | ||
uint16_t * | lim_reg_data ) |
Pressure 23 limit register data reading function.
This function reads a limit register data of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_read_memory | ( | pressure23_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | prom ) |
Pressure 23 read memory function.
This function reads memory is used to download coefficients programmed in the memory during factory calibration of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_read_op_reg | ( | pressure23_t * | ctx, |
uint8_t * | fifo_int_th, | ||
uint8_t * | fifo_mode, | ||
uint8_t * | delay ) |
Pressure 23 operation register data reading function.
This function reads a operation register data of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_set_command | ( | pressure23_t * | ctx, |
uint8_t | cmd ) |
Pressure 23 set the command function.
This function writes the desired command of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_t object definition for detailed explanation. |
[in] | cmd | : Command byte. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure23_start_conversion | ( | pressure23_t * | ctx, |
uint8_t | sel_cnv ) |
Pressure 23 start the conversion function.
This function start the desired conversion, pressure or temperature conversion of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_t object definition for detailed explanation. |
[in] | sel_cnv | : Conversion selection
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure23_sw_reset | ( | pressure23_t * | ctx | ) |
Pressure 23 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-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure23_write_config | ( | pressure23_t * | ctx, |
pressure23_sensor_cfg_t | config ) |
Pressure 23 configuration data writing function.
This function writes a desired sensor configuration of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_t object definition for detailed explanation. |
[in] | config | : Sensor configuration object. See pressure23_sensor_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure23_write_int_mask | ( | pressure23_t * | ctx, |
uint16_t | int_mask_data ) |
Pressure 23 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-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_write_int_reg | ( | pressure23_t * | ctx, |
uint16_t | int_reg_data ) |
Pressure 23 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-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_write_lim_reg | ( | pressure23_t * | ctx, |
uint8_t | sel_adr, | ||
uint8_t | sel_lim, | ||
uint16_t | lim_reg_data ) |
Pressure 23 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-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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 pressure23_write_op_reg | ( | pressure23_t * | ctx, |
uint8_t | fifo_int_th, | ||
uint8_t | fifo_mode, | ||
uint8_t | delay ) |
Pressure 23 operation register data writing function.
This function writes a operation register to control behavior of the FIFO and the automatic mode of the MS5849-30BA, Ultra-compact, chlorine resistant, absolute pressure sensor on the Pressure 23 Click board™.
[in] | ctx | : Click context object. See pressure23_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.