lpwifi 2.0.0.0
lpwifi.h File Reference

This file contains API for LP WiFi Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  lpwifi_t
 LP WiFi Click context object. More...
 
struct  lpwifi_cfg_t
 LP WiFi Click configuration object. More...
 

Macros

#define LPWIFI_CMD_AT   "AT"
 LP WiFi - Basic AT commands.
 
#define LPWIFI_CMD_ATZ   "ATZ"
 
#define LPWIFI_CMD_ATE   "ATE"
 
#define LPWIFI_CMD_ATF   "ATF"
 
#define LPWIFI_CMD_WFMODE   "AT+WFMODE"
 LP WiFi - WiFi AT commands.
 
#define LPWIFI_CMD_WFJAPA   "AT+WFJAPA"
 
#define LPWIFI_CMD_TRTS   "AT+TRTS"
 LP WiFi - Transfer AT commands.
 
#define LPWIFI_CMD_TRUSE   "AT+TRUSE"
 
#define LPWIFI_CMD_PWMINIT   "AT+PWMINIT"
 LP WiFi - PWM output test commands.
 
#define LPWIFI_CMD_PWMSTART   "AT+PWMSTART"
 
#define LPWIFI_CMD_PWMSTOP   "AT+PWMSTOP"
 
#define LPWIFI_CMD_I2CINIT   "AT+I2CINIT"
 LP WiFi - I2C read/write test commands.
 
#define LPWIFI_CMD_I2CREAD   "AT+I2CREAD"
 
#define LPWIFI_CMD_I2CWRITE   "AT+I2CWRITE"
 
#define LPWIFI_MODE_STA   0
 LP WiFi - WiFi mode setting.
 
#define LPWIFI_MODE_SOFT_AP   1
 
#define DRV_BUFFER_SIZE   400
 LP WiFi driver buffer size.
 
#define LPWIFI_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  lpwifi_return_value_t { LPWIFI_OK = 0 , LPWIFI_ERROR = -1 }
 LP WiFi Click return value data. More...
 

Functions

void lpwifi_cfg_setup (lpwifi_cfg_t *cfg)
 LP WiFi configuration object setup function.
 
err_t lpwifi_init (lpwifi_t *ctx, lpwifi_cfg_t *cfg)
 LP WiFi initialization function.
 
void lpwifi_default_cfg (lpwifi_t *ctx)
 LP WiFi default configuration function.
 
err_t lpwifi_generic_write (lpwifi_t *ctx, char *data_buf, uint16_t len)
 LP WiFi data writing function.
 
err_t lpwifi_generic_read (lpwifi_t *ctx, char *data_buf, uint16_t max_len)
 LP WiFi data reading function.
 
void lpwifi_factory_reset_device (lpwifi_t *ctx)
 Device factory reset function.
 
void lpwifi_send_cmd (lpwifi_t *ctx, char *cmd)
 Send command function.
 
void lpwifi_send_cmd_with_parameter (lpwifi_t *ctx, char *at_cmd_buf, char *param_buf)
 Send command function with parameter.
 
void lpwifi_send_cmd_check (lpwifi_t *ctx, char *at_cmd_buf)
 Send command to check commands current value.
 
void lpwifi_connect_to_ap (lpwifi_t *ctx, char *ssid, char *password)
 Connect to AP function.
 
void lpwifi_set_wifi_mode (lpwifi_t *ctx, uint8_t mode)
 Set WiFi mode function.
 
void lpwifi_create_tcp_server (lpwifi_t *ctx, uint16_t port)
 Create TCP server function.
 
void lpwifi_create_udp_socket (lpwifi_t *ctx, uint16_t port)
 Create UDP socket function.
 

Detailed Description

This file contains API for LP WiFi Click Driver.

Enumeration Type Documentation

◆ lpwifi_return_value_t

LP WiFi Click return value data.

Predefined enum values for driver return values.

Enumerator
LPWIFI_OK 
LPWIFI_ERROR