ph2 2.1.0.0
|
This file contains API for pH 2 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_analog_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | ph2_t |
pH 2 Click context object. More... | |
struct | ph2_cfg_t |
pH 2 Click configuration object. More... | |
Macros | |
#define | PH2_PH_CALCULATION_COEF 0.18 |
pH 2 description setting. More... | |
#define | PH2_ADC_RESOLUTION 0x0FFF |
pH 2 ADC setting. More... | |
#define | PH2_VREF_3V3 3.3 |
#define | PH2_VREF_5V 5.0 |
#define | PH2_SET_DEV_ADDR 0x4D |
pH 2 device address setting. More... | |
#define | PH2_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. More... | |
Enumerations | |
enum | ph2_drv_t { PH2_DRV_SEL_ADC , PH2_DRV_SEL_I2C } |
pH 2 Click driver selector. More... | |
enum | ph2_return_value_t { PH2_OK = 0 , PH2_ERROR = -1 } |
pH 2 Click return value data. More... | |
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... | |
This file contains API for pH 2 Click Driver.
enum ph2_drv_t |
enum ph2_return_value_t |