42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
68#define WIFIESP_MAP_MIKROBUS( cfg, mikrobus ) \
69 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
70 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
71 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
72 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
79#define WIFIESP_DRV_RX_BUFFER_SIZE 610
80#define WIFIESP_DRV_TX_BUFFER_SIZE 150
87#define WIFIESP_CHECK "AT"
88#define WIFIESP_RESTORE "AT+RESTORE"
89#define WIFIESP_RST "AT+RST"
90#define WIFIESP_CHECK_FIRMWARE "AT+GMR"
91#define WIFIESP_SET_MODE "AT+CWMODE"
92#define WIFIESP_CONNECT "AT+CWJAP"
93#define WIFIESP_LIST_AP "AT+CWLAP"
94#define WIFIESP_QUIT_AP "AT+CWQAP"
95#define WIFIESP_SET_AP_PARAMETERS "AT+CWSAP"
96#define WIFIESP_JOIN_DEV_IP "AT+CWLIF"
97#define WIFIESP_CONNESTION_STATUS "AT+CIPSTATUS"
98#define WIFIESP_START "AT+CIPSTART"
99#define WIFIESP_MODE "AT+CIPMODE"
100#define WIFIESP_SEND "AT+CIPSEND"
101#define WIFIESP_CLOSE "AT+CIPCLOSE"
102#define WIFIESP_GET_IP "AT+CIFSR"
103#define WIFIESP_SET_MULTIPLE_CONNECTION "AT+CIPMUX"
104#define WIFIESP_SET_AS_SERVER "AT+CIPSERVER"
105#define WIFIESP_CHECK_SERVER_TIMEOUT "AT+CIPSTO?"
106#define WIFIESP_RECEIVE "+IPD"
113#define WIFIESP_RSP_OK "OK"
114#define WIFIESP_RSP_READY_FOR_SEND ">"
115#define WIFIESP_RSP_SEND_OK "SEND OK"
116#define WIFIESP_RSP_ERROR "ERROR"
117#define WIFIESP_RSP_CONNECT "CONNECT"
#define WIFIESP_DRV_TX_BUFFER_SIZE
Definition wifiesp.h:80
#define WIFIESP_DRV_RX_BUFFER_SIZE
Definition wifiesp.h:79
void wifiesp_cfg_setup(wifiesp_cfg_t *cfg)
Config Object Initialization function.
void wifiesp_default_cfg(wifiesp_t *ctx)
Click Default Configuration function.
int32_t wifiesp_generic_read(wifiesp_t *ctx, char *data_buf, int32_t max_len)
Generic read function.
void wifiesp_send_cmd(wifiesp_t *ctx, uint8_t *cmd, uint8_t *args)
Sends AT command to the module.
void wifiesp_generic_write(wifiesp_t *ctx, char *data_buf, uint16_t len)
Generic write function.
err_t wifiesp_init(wifiesp_t *ctx, wifiesp_cfg_t *cfg)
Initialization function.
wifiesp_return_value_t
WiFi ESP Click return value data.
Definition wifiesp.h:171
@ WIFIESP_ERROR_UNKNOWN
Definition wifiesp.h:176
@ WIFIESP_ERROR
Definition wifiesp.h:173
@ WIFIESP_ERROR_TIMEOUT
Definition wifiesp.h:174
@ WIFIESP_ERROR_CMD
Definition wifiesp.h:175
@ WIFIESP_OK
Definition wifiesp.h:172
Click configuration structure definition.
Definition wifiesp.h:148
uint32_t baud_rate
Definition wifiesp.h:158
bool uart_blocking
Definition wifiesp.h:159
uart_data_bits_t data_bit
Definition wifiesp.h:160
pin_name_t tx_pin
Definition wifiesp.h:151
pin_name_t rx_pin
Definition wifiesp.h:150
uart_stop_bits_t stop_bit
Definition wifiesp.h:162
uart_parity_t parity_bit
Definition wifiesp.h:161
pin_name_t rst
Definition wifiesp.h:154
pin_name_t cs
Definition wifiesp.h:155
Click ctx object definition.
Definition wifiesp.h:131
digital_out_t cs
Definition wifiesp.h:134
uart_t uart
Definition wifiesp.h:137
digital_out_t rst
Definition wifiesp.h:133