39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define ESP8684_CMD_AT "AT"
74#define ESP8684_CMD_RST "AT+RST"
75#define ESP8684_CMD_GMR "AT+GMR"
76#define ESP8684_CMD_CWINIT "AT+CWINIT"
77#define ESP8684_CMD_CWMODE "AT+CWMODE"
78#define ESP8684_CMD_CWJAP "AT+CWJAP"
79#define ESP8684_CMD_CWLAP "AT+CWLAP"
80#define ESP8684_CMD_CWAP "AT+CWQAP"
81#define ESP8684_CMD_CWSAP "AT+CWSAP"
82#define ESP8684_CMD_CWLIF "AT+CWLIF"
83#define ESP8684_CMD_CIPSTATE "AT+CIPSTATE"
84#define ESP8684_CMD_CIPSTART "AT+CIPSTART"
85#define ESP8684_CMD_CIPMODE "AT+CIPMODE"
86#define ESP8684_CMD_CIPSEND "AT+CIPSEND"
87#define ESP8684_CMD_CIPCLOSE "AT+CIPCLOSE"
88#define ESP8684_CMD_CIFSR "AT+CIFSR"
89#define ESP8684_CMD_CIPMUX "AT+CIPMUX"
90#define ESP8684_CMD_CIPSERVER "AT+CIPSERVER"
91#define ESP8684_CMD_CIPSTO "AT+CIPSTO"
92#define ESP8684_CMD_CIPRECVMODE "AT+CIPRECVMODE"
98#define ESP8684_RSP_RECEIVE "+IPD"
99#define ESP8684_READY_FOR_SEND ">"
100#define ESP8684_RSP_OK "OK"
101#define ESP8684_RSP_SEND_OK "SEND OK"
102#define ESP8684_RSP_ERROR "ERROR"
103#define ESP8684_RSP_READY "ready"
109#define ESP8684_PIN_STATE_HIGH 0x01
110#define ESP8684_PIN_STATE_LOW 0x00
118#define ESP8684_TX_DRV_BUFFER_SIZE 100
119#define ESP8684_RX_DRV_BUFFER_SIZE 300
137#define ESP8684_MAP_MIKROBUS( cfg, mikrobus ) \
138 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
139 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
140 cfg.bt = MIKROBUS( mikrobus, MIKROBUS_AN ); \
141 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
142 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
143 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT );
esp8684_return_value_t
ESP8684 Click return value data.
Definition esp8684.h:201
@ ESP8684_OK
Definition esp8684.h:202
@ ESP8684_TIMEOUT
Definition esp8684.h:205
@ ESP8684_ERROR
Definition esp8684.h:203
@ ESP8684_OVERFLOW
Definition esp8684.h:204
#define ESP8684_TX_DRV_BUFFER_SIZE
ESP8684 driver buffer size.
Definition esp8684.h:118
#define ESP8684_RX_DRV_BUFFER_SIZE
Definition esp8684.h:119
err_t esp8684_init(esp8684_t *ctx, esp8684_cfg_t *cfg)
ESP8684 initialization function.
uint8_t esp8684_get_cts_pin(esp8684_t *ctx)
ESP8684 get cts pin state function.
void esp8684_send_cmd(esp8684_t *ctx, uint8_t *cmd, uint8_t *args)
ESP8684 send command with arguments function.
void esp8684_set_rts_pin(esp8684_t *ctx, uint8_t pin_state)
ESP8684 set rts pin state function.
void esp8684_cfg_setup(esp8684_cfg_t *cfg)
ESP8684 configuration object setup function.
void esp8684_default_cfg(esp8684_t *ctx)
ESP8684 default configuration function.
err_t esp8684_generic_write(esp8684_t *ctx, uint8_t *data_in, uint16_t len)
ESP8684 data writing function.
void esp8684_set_rst_pin(esp8684_t *ctx, uint8_t pin_state)
ESP8684 set rst pin state function.
err_t esp8684_generic_read(esp8684_t *ctx, uint8_t *data_out, uint16_t len)
ESP8684 data reading function.
void esp8684_connect_for_trans(esp8684_t *ctx, uint8_t *type, uint8_t *link_id, uint8_t *remote_host, uint8_t *remote_port)
ESP8684 connect to remote host function.
void esp8684_send_test_cmd(esp8684_t *ctx, uint8_t *cmd)
ESP8684 test query command function.
void esp8684_connect_to_network(esp8684_t *ctx, uint8_t *ssid, uint8_t *password)
ESP8684 connect to network function.
void esp8684_send_query_cmd(esp8684_t *ctx, uint8_t *cmd)
ESP8684 send query command function.
void esp8684_set_bt_pin(esp8684_t *ctx, uint8_t pin_state)
ESP8684 set bt pin state function.
ESP8684 Click configuration object.
Definition esp8684.h:176
pin_name_t rts
Definition esp8684.h:184
uint32_t baud_rate
Definition esp8684.h:188
pin_name_t cts
Definition esp8684.h:185
pin_name_t bt
Definition esp8684.h:182
bool uart_blocking
Definition esp8684.h:189
uart_data_bits_t data_bit
Definition esp8684.h:190
pin_name_t tx_pin
Definition esp8684.h:179
pin_name_t rx_pin
Definition esp8684.h:178
uart_stop_bits_t stop_bit
Definition esp8684.h:192
uart_parity_t parity_bit
Definition esp8684.h:191
pin_name_t rst
Definition esp8684.h:183
ESP8684 Click context object.
Definition esp8684.h:153
digital_out_t rts
Definition esp8684.h:157
uart_t uart
Definition esp8684.h:163
digital_in_t cts
Definition esp8684.h:160
digital_out_t rst
Definition esp8684.h:156
digital_out_t bt
Definition esp8684.h:155