ezocarrierorp 2.1.0.0
ezocarrierorp.h File Reference

This file contains API for EZO Carrier ORP 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  ezocarrierorp_t
 EZO Carrier ORP Click context object. More...
 
struct  ezocarrierorp_cfg_t
 EZO Carrier ORP Click configuration object. More...
 

Macros

#define EZOCARRIERORP_CMD_BAUD   "Baud"
 EZO Carrier ORP control commands.
 
#define EZOCARRIERORP_CMD_CONT_READ   "C"
 
#define EZOCARRIERORP_CMD_CAL   "Cal"
 
#define EZOCARRIERORP_CMD_EXPORT   "Export"
 
#define EZOCARRIERORP_CMD_FACTORY   "Factory"
 
#define EZOCARRIERORP_CMD_FIND   "Find"
 
#define EZOCARRIERORP_CMD_DEV_INFO   "i"
 
#define EZOCARRIERORP_CMD_I2C   "I2C"
 
#define EZOCARRIERORP_CMD_IMPORT   "Import"
 
#define EZOCARRIERORP_CMD_LED   "L"
 
#define EZOCARRIERORP_CMD_NAME   "Name"
 
#define EZOCARRIERORP_CMD_PROTOCOL_LOCK   "Plock"
 
#define EZOCARRIERORP_CMD_SINGLE_READ   "R"
 
#define EZOCARRIERORP_CMD_SLEEP   "Sleep"
 
#define EZOCARRIERORP_CMD_STATUS   "Status"
 
#define EZOCARRIERORP_CMD_RESP_CODES   "*OK"
 
#define EZOCARRIERORP_CMD_END_COMMAND   "\r"
 
#define EZOCARRIERORP_RSP_OK   "*OK"
 EZO Carrier ORP response codes.
 
#define EZOCARRIERORP_RSP_ERROR   "*ER"
 
#define EZOCARRIERORP_RSP_OVER_VOLT   "*OV"
 
#define EZOCARRIERORP_RSP_UNDER_VOLT   "*UV"
 
#define EZOCARRIERORP_RSP_RESET   "*RS"
 
#define EZOCARRIERORP_RSP_READY   "*RE"
 
#define EZOCARRIERORP_RSP_SLEEP   "*SL"
 
#define EZOCARRIERORP_RSP_WAKE_UP   "*WA"
 
#define EZOCARRIERORP_TX_DRV_BUFFER_SIZE   100
 EZO Carrier ORP driver buffer size.
 
#define EZOCARRIERORP_RX_DRV_BUFFER_SIZE   300
 
#define EZOCARRIERORP_DEVICE_ADDRESS   0x61
 EZO Carrier ORP device address setting.
 
#define EZOCARRIERORP_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  ezocarrierorp_drv_t { EZOCARRIERORP_DRV_SEL_I2C , EZOCARRIERORP_DRV_SEL_UART }
 EZO Carrier EC Click driver selector. More...
 
enum  ezocarrierorp_return_value_t { EZOCARRIERORP_OK = 0 , EZOCARRIERORP_ERROR = -1 , EZOCARRIERORP_ERROR_TIMEOUT = -2 }
 EZO Carrier ORP Click return value data. More...
 

Functions

void ezocarrierorp_cfg_setup (ezocarrierorp_cfg_t *cfg)
 EZO Carrier ORP configuration object setup function.
 
void ezocarrierorp_drv_interface_sel (ezocarrierorp_cfg_t *cfg, ezocarrierorp_drv_t drv_sel)
 EZO Carrier EC driver interface setup function.
 
err_t ezocarrierorp_init (ezocarrierorp_t *ctx, ezocarrierorp_cfg_t *cfg)
 EZO Carrier ORP initialization function.
 
err_t ezocarrierorp_generic_write (ezocarrierorp_t *ctx, uint8_t *data_in, uint16_t len)
 EZO Carrier ORP data writing function.
 
err_t ezocarrierorp_generic_read (ezocarrierorp_t *ctx, uint8_t *data_out, uint16_t len)
 EZO Carrier ORP data reading function.
 
void ezocarrierorp_send_cmd (ezocarrierorp_t *ctx, uint8_t *cmd)
 Send command function.
 
void ezocarrierorp_send_cmd_with_par (ezocarrierorp_t *ctx, uint8_t *cmd, uint8_t *param_buf)
 Send command function with parameter.
 
void ezocarrierorp_send_cmd_check (ezocarrierorp_t *ctx, uint8_t *cmd)
 Check the sent command.
 

Detailed Description

This file contains API for EZO Carrier ORP Click Driver.

Enumeration Type Documentation

◆ ezocarrierorp_drv_t

EZO Carrier EC Click driver selector.

Selects target driver interface of EZO Carrier EC Click driver.

Enumerator
EZOCARRIERORP_DRV_SEL_I2C 

I2C driver descriptor.

EZOCARRIERORP_DRV_SEL_UART 

UART driver descriptor.

◆ ezocarrierorp_return_value_t

EZO Carrier ORP Click return value data.

Predefined enum values for driver return values.

Enumerator
EZOCARRIERORP_OK 
EZOCARRIERORP_ERROR 
EZOCARRIERORP_ERROR_TIMEOUT