ezocarrierph 2.1.0.0
ezocarrierph.h File Reference

This file contains API for EZO Carrier pH Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  ezocarrierph_t
 EZO Carrier pH Click context object. More...
 
struct  ezocarrierph_cfg_t
 EZO Carrier pH Click configuration object. More...
 

Macros

#define EZOCARRIERPH_CMD_BAUD   "Baud"
 EZO Carrier pH control commands.
 
#define EZOCARRIERPH_CMD_CONT_READ   "C"
 
#define EZOCARRIERPH_CMD_CAL   "Cal"
 
#define EZOCARRIERPH_CMD_EXPORT   "Export"
 
#define EZOCARRIERPH_CMD_FACTORY   "Factory"
 
#define EZOCARRIERPH_CMD_FIND   "Find"
 
#define EZOCARRIERPH_CMD_DEV_INFO   "i"
 
#define EZOCARRIERPH_CMD_I2C   "I2C"
 
#define EZOCARRIERPH_CMD_IMPORT   "Import"
 
#define EZOCARRIERPH_CMD_LED   "L"
 
#define EZOCARRIERPH_CMD_NAME   "Name"
 
#define EZOCARRIERPH_CMD_EXTENDED_PH   "pHext"
 
#define EZOCARRIERPH_CMD_PROTOCOL_LOCK   "Plock"
 
#define EZOCARRIERPH_CMD_SINGLE_READ   "R"
 
#define EZOCARRIERPH_CMD_SLEEP   "Sleep"
 
#define EZOCARRIERPH_CMD_SLOPE   "Slope"
 
#define EZOCARRIERPH_CMD_STATUS   "Status"
 
#define EZOCARRIERPH_CMD_TEMP_COMPENSATION   "T"
 
#define EZOCARRIERPH_CMD_RESP_CODES   "*OK"
 
#define EZOCARRIERPH_CMD_END_COMMAND   "\r"
 
#define EZOCARRIERPH_RSP_OK   "*OK"
 EZO Carrier pH response codes.
 
#define EZOCARRIERPH_RSP_ERROR   "*ER"
 
#define EZOCARRIERPH_RSP_OVER_VOLT   "*OV"
 
#define EZOCARRIERPH_RSP_UNDER_VOLT   "*UV"
 
#define EZOCARRIERPH_RSP_RESET   "*RS"
 
#define EZOCARRIERPH_RSP_READY   "*RE"
 
#define EZOCARRIERPH_RSP_SLEEP   "*SL"
 
#define EZOCARRIERPH_RSP_WAKE_UP   "*WA"
 
#define EZOCARRIERPH_TX_DRV_BUFFER_SIZE   100
 EZO Carrier pH driver buffer size.
 
#define EZOCARRIERPH_RX_DRV_BUFFER_SIZE   300
 
#define EZOCARRIERPH_DEVICE_ADDRESS   0x61
 EZO Carrier pH device address setting.
 
#define EZOCARRIERPH_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  ezocarrierph_drv_t { EZOCARRIERPH_DRV_SEL_I2C , EZOCARRIERPH_DRV_SEL_UART }
 EZO Carrier pH Click driver selector. More...
 
enum  ezocarrierph_return_value_t { EZOCARRIERPH_OK = 0 , EZOCARRIERPH_ERROR = -1 , EZOCARRIERPH_ERROR_TIMEOUT = -2 }
 EZO Carrier pH Click return value data. More...
 

Functions

void ezocarrierph_cfg_setup (ezocarrierph_cfg_t *cfg)
 EZO Carrier pH configuration object setup function.
 
void ezocarrierph_drv_interface_sel (ezocarrierph_cfg_t *cfg, ezocarrierph_drv_t drv_sel)
 EZO Carrier pH driver interface setup function.
 
err_t ezocarrierph_init (ezocarrierph_t *ctx, ezocarrierph_cfg_t *cfg)
 EZO Carrier pH initialization function.
 
err_t ezocarrierph_generic_write (ezocarrierph_t *ctx, uint8_t *data_in, uint16_t len)
 EZO Carrier pH data writing function.
 
err_t ezocarrierph_generic_read (ezocarrierph_t *ctx, uint8_t *data_out, uint16_t len)
 EZO Carrier pH data reading function.
 
void ezocarrierph_send_cmd (ezocarrierph_t *ctx, uint8_t *cmd)
 Send command function.
 
void ezocarrierph_send_cmd_with_par (ezocarrierph_t *ctx, uint8_t *cmd, uint8_t *param_buf)
 Send command function with parameter.
 
void ezocarrierph_send_cmd_check (ezocarrierph_t *ctx, uint8_t *cmd)
 Check the sent command.
 

Detailed Description

This file contains API for EZO Carrier pH Click Driver.

Enumeration Type Documentation

◆ ezocarrierph_drv_t

EZO Carrier pH Click driver selector.

Selects target driver interface of EZO Carrier pH Click driver.

Enumerator
EZOCARRIERPH_DRV_SEL_I2C 

I2C driver descriptor.

EZOCARRIERPH_DRV_SEL_UART 

UART driver descriptor.

◆ ezocarrierph_return_value_t

EZO Carrier pH Click return value data.

Predefined enum values for driver return values.

Enumerator
EZOCARRIERPH_OK 
EZOCARRIERPH_ERROR 
EZOCARRIERPH_ERROR_TIMEOUT