pressure22 2.1.0.0
|
API for configuring and manipulating Pressure 22 Click driver. More...
Topics | |
Pressure 22 Commands List | |
List of commands of Pressure 22 Click driver. | |
Pressure 22 Registers Settings | |
Settings for registers of Pressure 22 Click driver. | |
Pressure 22 MikroBUS Map | |
MikroBUS pin mapping of Pressure 22 Click driver. | |
Functions | |
void | pressure22_cfg_setup (pressure22_cfg_t *cfg) |
Pressure 22 configuration object setup function. | |
err_t | pressure22_init (pressure22_t *ctx, pressure22_cfg_t *cfg) |
Pressure 22 initialization function. | |
err_t | pressure22_default_cfg (pressure22_t *ctx) |
Pressure 22 default configuration function. | |
err_t | pressure22_generic_write (pressure22_t *ctx, uint8_t cmd, uint8_t *data_in, uint8_t len) |
Pressure 22 I2C writing function. | |
err_t | pressure22_generic_read (pressure22_t *ctx, uint8_t cmd, uint8_t *data_out, uint8_t len) |
Pressure 22 I2C reading function. | |
err_t | pressure22_set_command (pressure22_t *ctx, uint8_t cmd) |
Pressure 22 set the command function. | |
err_t | pressure22_sw_reset (pressure22_t *ctx) |
Pressure 22 sw reset function. | |
err_t | pressure22_get_adc_data (pressure22_t *ctx, uint32_t *adc) |
Pressure 22 gets the ADC data function. | |
err_t | pressure22_get_prom_data (pressure22_t *ctx, uint8_t cmd_prom, uint16_t *prom) |
Pressure 22 gets the PROM data function. | |
err_t | pressure22_get_calibration_data (pressure22_t *ctx) |
Pressure 22 gets the calibration data function. | |
err_t | pressure22_check_data_validity (pressure22_t *ctx) |
Pressure 22 checks data validity function. | |
void | pressure22_set_conversion (pressure22_t *ctx, pressure22_press_conv_t press_conv, pressure22_temp_conv_t temp_conv) |
Pressure 22 set conversion function. | |
err_t | pressure22_get_measurement_data (pressure22_t *ctx, float *temperature, float *pressure) |
Pressure 22 get the measurement data function. | |
API for configuring and manipulating Pressure 22 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void pressure22_cfg_setup | ( | pressure22_cfg_t * | cfg | ) |
Pressure 22 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See pressure22_cfg_t object definition for detailed explanation. |
err_t pressure22_check_data_validity | ( | pressure22_t * | ctx | ) |
Pressure 22 checks data validity function.
This function checks CRC to check the data validity in memory of the MS5839-02BA, Ultra-compact, chlorine resistant, digital pressure and temperature sensor on the Pressure 22 Click board™.
[in] | ctx | : Click context object. See pressure22_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure22_default_cfg | ( | pressure22_t * | ctx | ) |
Pressure 22 default configuration function.
This function executes a default configuration of Pressure 22 click board.
[in] | ctx | : Click context object. See pressure22_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure22_generic_read | ( | pressure22_t * | ctx, |
uint8_t | cmd, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Pressure 22 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 pressure22_t object definition for detailed explanation. |
[in] | cmd | : Command byte. |
[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 pressure22_generic_write | ( | pressure22_t * | ctx, |
uint8_t | cmd, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Pressure 22 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 pressure22_t object definition for detailed explanation. |
[in] | cmd | : Command byte. |
[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 pressure22_get_adc_data | ( | pressure22_t * | ctx, |
uint32_t * | adc ) |
Pressure 22 gets the ADC data function.
This function reads temperature or pressure ADC data of the MS5839-02BA, Ultra-compact, chlorine resistant, digital pressure and temperature sensor on the Pressure 22 Click board™.
[in] | ctx | : Click context object. See pressure22_t object definition for detailed explanation. |
[out] | adc | : ADC read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure22_get_calibration_data | ( | pressure22_t * | ctx | ) |
Pressure 22 gets the calibration data function.
This function reads and store calibration data, factory calibrated from the PROM memory of the MS5839-02BA, Ultra-compact, chlorine resistant, digital pressure and temperature sensor on the Pressure 22 Click board™.
[in] | ctx | : Click context object. See pressure22_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure22_get_measurement_data | ( | pressure22_t * | ctx, |
float * | temperature, | ||
float * | pressure ) |
Pressure 22 get the measurement data function.
This function reads temperature and pressure data conversion of the MS5839-02BA, Ultra-compact, chlorine resistant, digital pressure and temperature sensor on the Pressure 22 Click board™.
[in] | ctx | : Click context object. See pressure22_t object definition for detailed explanation. |
[out] | temperature | : Temperature data ( degree Celsius ). |
[out] | pressure | : Pressure data ( mbar ). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure22_get_prom_data | ( | pressure22_t * | ctx, |
uint8_t | cmd_prom, | ||
uint16_t * | prom ) |
Pressure 22 gets the PROM data function.
This function reads calibration data, factory calibrated from the PROM memory of the MS5839-02BA, Ultra-compact, chlorine resistant, digital pressure and temperature sensor on the Pressure 22 Click board™.
[in] | ctx | : Click context object. See pressure22_t object definition for detailed explanation. |
[in] | cmd_prom | : PROM command. |
[out] | prom | : PROM read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure22_init | ( | pressure22_t * | ctx, |
pressure22_cfg_t * | cfg ) |
Pressure 22 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See pressure22_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See pressure22_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure22_set_command | ( | pressure22_t * | ctx, |
uint8_t | cmd ) |
Pressure 22 set the command function.
This function writes the desired command of the MS5839-02BA, Ultra-compact, chlorine resistant, digital pressure and temperature sensor on the Pressure 22 Click board™.
[in] | ctx | : Click context object. See pressure22_t object definition for detailed explanation. |
[in] | cmd | : Command byte. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void pressure22_set_conversion | ( | pressure22_t * | ctx, |
pressure22_press_conv_t | press_conv, | ||
pressure22_temp_conv_t | temp_conv ) |
Pressure 22 set conversion function.
This function sets the desired temperature and pressure data conversion of the MS5839-02BA, Ultra-compact, chlorine resistant, digital pressure and temperature sensor on the Pressure 22 Click board™.
[in] | ctx | : Click context object. See pressure22_t object definition for detailed explanation. |
[in] | press_conv | : Pressure conversion object. See pressure22_press_conv_t definition for detailed explanation. |
[in] | temp_conv | : Temperature conversion object. See pressure22_temp_conv_t definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t pressure22_sw_reset | ( | pressure22_t * | ctx | ) |
Pressure 22 sw reset function.
This function performs the software reset of the MS5839-02BA, Ultra-compact, chlorine resistant, digital pressure and temperature sensor on the Pressure 22 Click board™.
[in] | ctx | : Click context object. See pressure22_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.