ph2 2.1.0.0
|
API for configuring and manipulating pH 2 Click driver. More...
Modules | |
pH 2 Registers List | |
List of registers of pH 2 Click driver. | |
pH 2 Registers Settings | |
Settings for registers of pH 2 Click driver. | |
pH 2 MikroBUS Map | |
MikroBUS pin mapping of pH 2 Click driver. | |
Functions | |
void | ph2_cfg_setup (ph2_cfg_t *cfg) |
pH 2 configuration object setup function. More... | |
void | ph2_drv_interface_selection (ph2_cfg_t *cfg, ph2_drv_t drv_sel) |
pH 2 driver interface setup function. More... | |
err_t | ph2_init (ph2_t *ctx, ph2_cfg_t *cfg) |
pH 2 initialization function. More... | |
err_t | ph2_read_raw_adc (ph2_t *ctx, uint16_t *raw_adc) |
pH 2 read raw ADC value function. More... | |
err_t | ph2_read_voltage (ph2_t *ctx, float *voltage) |
pH 2 read voltage level function. More... | |
err_t | ph2_set_vref (ph2_t *ctx, float vref) |
pH 2 set vref function. More... | |
err_t | ph2_calibrate (ph2_t *ctx, float pH_value) |
Ph 2 calibrate function. More... | |
err_t | ph2_calculate_ph (ph2_t *ctx, float *pH_value) |
Ph 2 calculate pH value function. More... | |
void | ph2_calibrate_offset (ph2_t *ctx) |
Ph 2 calibrate offset function. More... | |
void | ph2_enable_st1 (ph2_t *ctx) |
Ph 2 enable LED STAT1 function. More... | |
void | ph2_disable_st1 (ph2_t *ctx) |
Ph 2 disable LED STAT1 function. More... | |
void | ph2_enable_st2 (ph2_t *ctx) |
Ph 2 enable LED STAT2 function. More... | |
void | ph2_disable_st2 (ph2_t *ctx) |
Ph 2 disable LED STAT2 function. More... | |
API for configuring and manipulating pH 2 Click driver.
err_t ph2_calculate_ph | ( | ph2_t * | ctx, |
float * | pH_value | ||
) |
Ph 2 calculate pH value function.
This function is reading pH value wof substance where pH probe is placed.
[in] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
[out] | pH_value | : pH value of the substance. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ph2_calibrate | ( | ph2_t * | ctx, |
float | pH_value | ||
) |
Ph 2 calibrate function.
This function is performing calibration of Ph 2 click driver with known pH value substance.
[in] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
[out] | pH_value | : pH value of the substance where calibration is performed. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void ph2_calibrate_offset | ( | ph2_t * | ctx | ) |
Ph 2 calibrate offset function.
This function is used to calibrate offset of Ph 2 click driver.
[in] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
void ph2_cfg_setup | ( | ph2_cfg_t * | cfg | ) |
pH 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ph2_cfg_t object definition for detailed explanation. |
void ph2_disable_st1 | ( | ph2_t * | ctx | ) |
Ph 2 disable LED STAT1 function.
This function is used turn off STAT1 LED of Ph 2 click driver.
[in] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
void ph2_disable_st2 | ( | ph2_t * | ctx | ) |
Ph 2 disable LED STAT2 function.
This function is used turn off STAT2 LED of Ph 2 click driver.
[in] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
pH 2 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 ph2_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See ph2_drv_t object definition for detailed explanation. |
void ph2_enable_st1 | ( | ph2_t * | ctx | ) |
Ph 2 enable LED STAT1 function.
This function is used turn on STAT1 LED of Ph 2 click driver.
[in] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
void ph2_enable_st2 | ( | ph2_t * | ctx | ) |
Ph 2 enable LED STAT2 function.
This function is used turn on STAT2 LED of Ph 2 click driver.
[in] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
pH 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ph2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ph2_read_raw_adc | ( | ph2_t * | ctx, |
uint16_t * | raw_adc | ||
) |
pH 2 read raw ADC value function.
This function reads raw ADC value.
[in] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
[out] | raw_adc | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ph2_read_voltage | ( | ph2_t * | ctx, |
float * | voltage | ||
) |
pH 2 read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
[in] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ph2_set_vref | ( | ph2_t * | ctx, |
float | vref | ||
) |
pH 2 set vref function.
This function sets the voltage reference for pH 2 click driver.
[in] | ctx | : Click context object. See ph2_t object definition for detailed explanation. |
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.