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 LPWIFI_CMD_AT "AT"
74#define LPWIFI_CMD_ATZ "ATZ"
75#define LPWIFI_CMD_ATE "ATE"
76#define LPWIFI_CMD_ATF "ATF"
82#define LPWIFI_CMD_WFMODE "AT+WFMODE"
83#define LPWIFI_CMD_WFJAPA "AT+WFJAPA"
89#define LPWIFI_CMD_TRTS "AT+TRTS"
90#define LPWIFI_CMD_TRUSE "AT+TRUSE"
96#define LPWIFI_CMD_PWMINIT "AT+PWMINIT"
97#define LPWIFI_CMD_PWMSTART "AT+PWMSTART"
98#define LPWIFI_CMD_PWMSTOP "AT+PWMSTOP"
104#define LPWIFI_CMD_I2CINIT "AT+I2CINIT"
105#define LPWIFI_CMD_I2CREAD "AT+I2CREAD"
106#define LPWIFI_CMD_I2CWRITE "AT+I2CWRITE"
124#define LPWIFI_MODE_STA 0
125#define LPWIFI_MODE_SOFT_AP 1
132#define DRV_BUFFER_SIZE 400
150#define LPWIFI_MAP_MIKROBUS( cfg, mikrobus ) \
151 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
152 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
153 cfg.wkp = MIKROBUS( mikrobus, MIKROBUS_RST ); \
154 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
155 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
#define DRV_BUFFER_SIZE
LP WiFi driver buffer size.
Definition lpwifi.h:132
err_t lpwifi_generic_write(lpwifi_t *ctx, char *data_buf, uint16_t len)
LP WiFi data writing function.
void lpwifi_send_cmd(lpwifi_t *ctx, char *cmd)
Send command function.
void lpwifi_set_wifi_mode(lpwifi_t *ctx, uint8_t mode)
Set WiFi mode function.
void lpwifi_factory_reset_device(lpwifi_t *ctx)
Device factory reset function.
void lpwifi_create_udp_socket(lpwifi_t *ctx, uint16_t port)
Create UDP socket function.
void lpwifi_cfg_setup(lpwifi_cfg_t *cfg)
LP WiFi configuration object setup function.
err_t lpwifi_generic_read(lpwifi_t *ctx, char *data_buf, uint16_t max_len)
LP WiFi data reading function.
void lpwifi_send_cmd_with_parameter(lpwifi_t *ctx, char *at_cmd_buf, char *param_buf)
Send command function with parameter.
void lpwifi_create_tcp_server(lpwifi_t *ctx, uint16_t port)
Create TCP server function.
void lpwifi_send_cmd_check(lpwifi_t *ctx, char *at_cmd_buf)
Send command to check commands current value.
void lpwifi_default_cfg(lpwifi_t *ctx)
LP WiFi default configuration function.
err_t lpwifi_init(lpwifi_t *ctx, lpwifi_cfg_t *cfg)
LP WiFi initialization function.
void lpwifi_connect_to_ap(lpwifi_t *ctx, char *ssid, char *password)
Connect to AP function.
lpwifi_return_value_t
LP WiFi Click return value data.
Definition lpwifi.h:218
@ LPWIFI_OK
Definition lpwifi.h:219
@ LPWIFI_ERROR
Definition lpwifi.h:220
LP WiFi Click configuration object.
Definition lpwifi.h:191
uint32_t baud_rate
Definition lpwifi.h:205
pin_name_t wkp
Definition lpwifi.h:199
bool uart_blocking
Definition lpwifi.h:206
uart_data_bits_t data_bit
Definition lpwifi.h:207
pin_name_t tx_pin
Definition lpwifi.h:195
pin_name_t rx_pin
Definition lpwifi.h:194
uart_stop_bits_t stop_bit
Definition lpwifi.h:209
pin_name_t int_pin
Definition lpwifi.h:200
uart_parity_t parity_bit
Definition lpwifi.h:208
pin_name_t cs
Definition lpwifi.h:201
LP WiFi Click context object.
Definition lpwifi.h:165
digital_out_t cs
Definition lpwifi.h:169
uart_t uart
Definition lpwifi.h:177
digital_in_t int_pin
Definition lpwifi.h:173
digital_out_t wkp
Definition lpwifi.h:168