28#ifndef EZOCARRIERRTD_H
29#define EZOCARRIERRTD_H
39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_i2c_master.h"
74#define EZOCARRIERRTD_CMD_BAUD "Baud"
75#define EZOCARRIERRTD_CMD_CONT_READ "C"
76#define EZOCARRIERRTD_CMD_CAL "Cal"
77#define EZOCARRIERRTD_CMD_DATA_LOGGER "D"
78#define EZOCARRIERRTD_CMD_EXPORT "Export"
79#define EZOCARRIERRTD_CMD_FACTORY "Factory"
80#define EZOCARRIERRTD_CMD_FIND "Find"
81#define EZOCARRIERRTD_CMD_DEV_INFO "i"
82#define EZOCARRIERRTD_CMD_I2C "I2C"
83#define EZOCARRIERRTD_CMD_IMPORT "Import"
84#define EZOCARRIERRTD_CMD_LED "L"
85#define EZOCARRIERRTD_CMD_MEM_RECALL "M"
86#define EZOCARRIERRTD_CMD_NAME "Name"
87#define EZOCARRIERRTD_CMD_PROTOCOL_LOCK "Plock"
88#define EZOCARRIERRTD_CMD_SINGLE_READ "R"
89#define EZOCARRIERRTD_CMD_SCALE "S"
90#define EZOCARRIERRTD_CMD_SLEEP "Sleep"
91#define EZOCARRIERRTD_CMD_STATUS "Status"
92#define EZOCARRIERRTD_CMD_RESP_CODES "*OK"
93#define EZOCARRIERRTD_CMD_END_COMMAND "\r"
99#define EZOCARRIERRTD_RSP_OK "*OK"
100#define EZOCARRIERRTD_RSP_ERROR "*ER"
101#define EZOCARRIERRTD_RSP_OVER_VOLT "*OV"
102#define EZOCARRIERRTD_RSP_UNDER_VOLT "*UV"
103#define EZOCARRIERRTD_RSP_RESET "*RS"
104#define EZOCARRIERRTD_RSP_READY "*RE"
105#define EZOCARRIERRTD_RSP_SLEEP "*SL"
106#define EZOCARRIERRTD_RSP_WAKE_UP "*WA"
113#define EZOCARRIERRTD_TX_DRV_BUFFER_SIZE 100
114#define EZOCARRIERRTD_RX_DRV_BUFFER_SIZE 300
123#define EZOCARRIERRTD_DEVICE_ADDRESS 0x61
139#define EZOCARRIERRTD_MAP_MIKROBUS( cfg, mikrobus ) \
140 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
141 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
142 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
143 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX )
ezocarrierrtd_drv_t
EZO Carrier EC Click driver selector.
Definition ezocarrierrtd.h:153
@ EZOCARRIERRTD_DRV_SEL_UART
Definition ezocarrierrtd.h:155
@ EZOCARRIERRTD_DRV_SEL_I2C
Definition ezocarrierrtd.h:154
ezocarrierrtd_return_value_t
EZO Carrier RTD Click return value data.
Definition ezocarrierrtd.h:208
@ EZOCARRIERRTD_OK
Definition ezocarrierrtd.h:209
@ EZOCARRIERRTD_ERROR_TIMEOUT
Definition ezocarrierrtd.h:211
@ EZOCARRIERRTD_ERROR
Definition ezocarrierrtd.h:210
#define EZOCARRIERRTD_TX_DRV_BUFFER_SIZE
EZO Carrier RTD driver buffer size.
Definition ezocarrierrtd.h:113
#define EZOCARRIERRTD_RX_DRV_BUFFER_SIZE
Definition ezocarrierrtd.h:114
void ezocarrierrtd_drv_interface_sel(ezocarrierrtd_cfg_t *cfg, ezocarrierrtd_drv_t drv_sel)
EZO Carrier EC driver interface setup function.
void ezocarrierrtd_cfg_setup(ezocarrierrtd_cfg_t *cfg)
EZO Carrier RTD configuration object setup function.
err_t ezocarrierrtd_generic_read(ezocarrierrtd_t *ctx, uint8_t *data_out, uint16_t len)
EZO Carrier RTD data reading function.
void ezocarrierrtd_send_cmd_check(ezocarrierrtd_t *ctx, uint8_t *cmd)
Check the sent command.
void ezocarrierrtd_send_cmd(ezocarrierrtd_t *ctx, uint8_t *cmd)
Send command function.
err_t ezocarrierrtd_init(ezocarrierrtd_t *ctx, ezocarrierrtd_cfg_t *cfg)
EZO Carrier RTD initialization function.
err_t ezocarrierrtd_generic_write(ezocarrierrtd_t *ctx, uint8_t *data_in, uint16_t len)
EZO Carrier RTD data writing function.
void ezocarrierrtd_send_cmd_with_par(ezocarrierrtd_t *ctx, uint8_t *cmd, uint8_t *param_buf)
Send command function with parameter.
EZO Carrier RTD Click configuration object.
Definition ezocarrierrtd.h:184
uint32_t baud_rate
Definition ezocarrierrtd.h:192
uint32_t i2c_speed
Definition ezocarrierrtd.h:197
ezocarrierrtd_drv_t drv_sel
Definition ezocarrierrtd.h:199
bool uart_blocking
Definition ezocarrierrtd.h:193
uart_data_bits_t data_bit
Definition ezocarrierrtd.h:194
pin_name_t tx_pin
Definition ezocarrierrtd.h:187
pin_name_t rx_pin
Definition ezocarrierrtd.h:186
uart_stop_bits_t stop_bit
Definition ezocarrierrtd.h:196
pin_name_t scl
Definition ezocarrierrtd.h:188
uart_parity_t parity_bit
Definition ezocarrierrtd.h:195
pin_name_t sda
Definition ezocarrierrtd.h:189
uint8_t i2c_address
Definition ezocarrierrtd.h:198
EZO Carrier RTD Click context object.
Definition ezocarrierrtd.h:164
ezocarrierrtd_drv_t drv_sel
Definition ezocarrierrtd.h:175
uart_t uart
Definition ezocarrierrtd.h:166
i2c_master_t i2c
Definition ezocarrierrtd.h:167
uint8_t slave_address
Definition ezocarrierrtd.h:173