ezocarrierdo 2.1.0.0
ezocarrierdo.h File Reference

This file contains API for EZO Carrier DO 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  ezocarrierdo_t
 EZO Carrier DO Click context object. More...
 
struct  ezocarrierdo_cfg_t
 EZO Carrier DO Click configuration object. More...
 

Macros

#define EZOCARRIERDO_CMD_BAUD   "Baud"
 EZO Carrier DO control commands.
 
#define EZOCARRIERDO_CMD_CONT_READ   "C"
 
#define EZOCARRIERDO_CMD_CAL   "Cal"
 
#define EZOCARRIERDO_CMD_EXPORT   "Export"
 
#define EZOCARRIERDO_CMD_FACTORY   "Factory"
 
#define EZOCARRIERDO_CMD_FIND   "Find"
 
#define EZOCARRIERDO_CMD_DEV_INFO   "i"
 
#define EZOCARRIERDO_CMD_I2C   "I2C"
 
#define EZOCARRIERDO_CMD_IMPORT   "Import"
 
#define EZOCARRIERDO_CMD_LED   "L"
 
#define EZOCARRIERDO_CMD_NAME   "Name"
 
#define EZOCARRIERDO_CMD_PARAMETERS   "O"
 
#define EZOCARRIERDO_CMD_PRES_COMPENSATION   "P"
 
#define EZOCARRIERDO_CMD_PROTOCOL_LOCK   "Plock"
 
#define EZOCARRIERDO_CMD_SINGLE_READ   "R"
 
#define EZOCARRIERDO_CMD_SALINITY_COMPENSATION   "S"
 
#define EZOCARRIERDO_CMD_SLEEP   "Sleep"
 
#define EZOCARRIERDO_CMD_STATUS   "Status"
 
#define EZOCARRIERDO_CMD_TEMP_COMPENSATION   "T"
 
#define EZOCARRIERDO_CMD_RESP_CODES   "*OK"
 
#define EZOCARRIERDO_CMD_END_COMMAND   "\r"
 
#define EZOCARRIERDO_RSP_OK   "*OK"
 EZO Carrier DO response codes.
 
#define EZOCARRIERDO_RSP_ERROR   "*ER"
 
#define EZOCARRIERDO_RSP_OVER_VOLT   "*OV"
 
#define EZOCARRIERDO_RSP_UNDER_VOLT   "*UV"
 
#define EZOCARRIERDO_RSP_RESET   "*RS"
 
#define EZOCARRIERDO_RSP_READY   "*RE"
 
#define EZOCARRIERDO_RSP_SLEEP   "*SL"
 
#define EZOCARRIERDO_RSP_WAKE_UP   "*WA"
 
#define EZOCARRIERDO_TX_DRV_BUFFER_SIZE   100
 EZO Carrier DO driver buffer size.
 
#define EZOCARRIERDO_RX_DRV_BUFFER_SIZE   300
 
#define EZOCARRIERDO_DEVICE_ADDRESS   0x61
 EZO Carrier DO device address setting.
 
#define EZOCARRIERDO_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  ezocarrierdo_drv_t { EZOCARRIERDO_DRV_SEL_I2C , EZOCARRIERDO_DRV_SEL_UART }
 EZO Carrier DO Click driver selector. More...
 
enum  ezocarrierdo_return_value_t { EZOCARRIERDO_OK = 0 , EZOCARRIERDO_ERROR = -1 , EZOCARRIERDO_ERROR_TIMEOUT = -2 }
 EZO Carrier DO Click return value data. More...
 

Functions

void ezocarrierdo_cfg_setup (ezocarrierdo_cfg_t *cfg)
 EZO Carrier DO configuration object setup function.
 
void ezocarrierdo_drv_interface_sel (ezocarrierdo_cfg_t *cfg, ezocarrierdo_drv_t drv_sel)
 EZO Carrier DO driver interface setup function.
 
err_t ezocarrierdo_init (ezocarrierdo_t *ctx, ezocarrierdo_cfg_t *cfg)
 EZO Carrier DO initialization function.
 
err_t ezocarrierdo_generic_write (ezocarrierdo_t *ctx, uint8_t *data_in, uint16_t len)
 EZO Carrier DO data writing function.
 
err_t ezocarrierdo_generic_read (ezocarrierdo_t *ctx, uint8_t *data_out, uint16_t len)
 EZO Carrier DO data reading function.
 
void ezocarrierdo_send_cmd (ezocarrierdo_t *ctx, uint8_t *cmd)
 Send command function.
 
void ezocarrierdo_send_cmd_with_par (ezocarrierdo_t *ctx, uint8_t *cmd, uint8_t *param_buf)
 Send command function with parameter.
 
void ezocarrierdo_send_cmd_check (ezocarrierdo_t *ctx, uint8_t *cmd)
 Check the sent command.
 

Detailed Description

This file contains API for EZO Carrier DO Click Driver.

Enumeration Type Documentation

◆ ezocarrierdo_drv_t

EZO Carrier DO Click driver selector.

Selects target driver interface of EZO Carrier DO Click driver.

Enumerator
EZOCARRIERDO_DRV_SEL_I2C 

I2C driver descriptor.

EZOCARRIERDO_DRV_SEL_UART 

UART driver descriptor.

◆ ezocarrierdo_return_value_t

EZO Carrier DO Click return value data.

Predefined enum values for driver return values.

Enumerator
EZOCARRIERDO_OK 
EZOCARRIERDO_ERROR 
EZOCARRIERDO_ERROR_TIMEOUT