lpwifi
2.0.0.0
|
API for configuring and manipulating LP WiFi Click driver. More...
Modules | |
LP WiFi Commands List | |
List of commands of LP WiFi Click driver. | |
LP WiFi Device Settings | |
Settings for registers of LP WiFi Click driver. | |
LP WiFi MikroBUS Map | |
MikroBUS pin mapping of LP WiFi Click driver. | |
Functions | |
void | lpwifi_cfg_setup (lpwifi_cfg_t *cfg) |
LP WiFi configuration object setup function. More... | |
err_t | lpwifi_init (lpwifi_t *ctx, lpwifi_cfg_t *cfg) |
LP WiFi initialization function. More... | |
void | lpwifi_default_cfg (lpwifi_t *ctx) |
LP WiFi default configuration function. More... | |
err_t | lpwifi_generic_write (lpwifi_t *ctx, char *data_buf, uint16_t len) |
LP WiFi data writing function. More... | |
err_t | lpwifi_generic_read (lpwifi_t *ctx, char *data_buf, uint16_t max_len) |
LP WiFi data reading function. More... | |
void | lpwifi_factory_reset_device (lpwifi_t *ctx) |
Device factory reset function. More... | |
void | lpwifi_send_cmd (lpwifi_t *ctx, char *cmd) |
Send command function. More... | |
void | lpwifi_send_cmd_with_parameter (lpwifi_t *ctx, char *at_cmd_buf, char *param_buf) |
Send command function with parameter. More... | |
void | lpwifi_send_cmd_check (lpwifi_t *ctx, char *at_cmd_buf) |
Send command to check commands current value. More... | |
void | lpwifi_connect_to_ap (lpwifi_t *ctx, char *ssid, char *password) |
Connect to AP function. More... | |
void | lpwifi_set_wifi_mode (lpwifi_t *ctx, uint8_t mode) |
Set WiFi mode function. More... | |
void | lpwifi_create_tcp_server (lpwifi_t *ctx, uint16_t port) |
Create TCP server function. More... | |
void | lpwifi_create_udp_socket (lpwifi_t *ctx, uint16_t port) |
Create UDP socket function. More... | |
API for configuring and manipulating LP WiFi Click driver.
void lpwifi_cfg_setup | ( | lpwifi_cfg_t * | cfg | ) |
LP WiFi configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See lpwifi_cfg_t object definition for detailed explanation. |
void lpwifi_connect_to_ap | ( | lpwifi_t * | ctx, |
char * | ssid, | ||
char * | password | ||
) |
Connect to AP function.
This function connects to the desired AP.
[in] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
[in] | ssid | SSID of AP. |
[in] | password | AP password ( NULL - if the AP is OPEN ). |
void lpwifi_create_tcp_server | ( | lpwifi_t * | ctx, |
uint16_t | port | ||
) |
Create TCP server function.
This function creates TCP server on the desired port.
[in] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
[in] | port | Local port: 1-65535. |
void lpwifi_create_udp_socket | ( | lpwifi_t * | ctx, |
uint16_t | port | ||
) |
Create UDP socket function.
This function creates UDP socket on the desired port.
[in] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
[in] | port | Local port: 1-65535. |
void lpwifi_default_cfg | ( | lpwifi_t * | ctx | ) |
LP WiFi default configuration function.
This function executes a default configuration of LP WiFi click board.
[in] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
void lpwifi_factory_reset_device | ( | lpwifi_t * | ctx | ) |
Device factory reset function.
This function factory resets the device.
ctx | Click object. See lpwifi_t object definition for detailed explanation. |
err_t lpwifi_generic_read | ( | lpwifi_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
LP WiFi data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.err_t lpwifi_generic_write | ( | lpwifi_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
LP WiFi data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.err_t lpwifi_init | ( | lpwifi_t * | ctx, |
lpwifi_cfg_t * | cfg | ||
) |
LP WiFi initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See lpwifi_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void lpwifi_send_cmd | ( | lpwifi_t * | ctx, |
char * | cmd | ||
) |
Send command function.
This function sends the specified command to the click module.
[in] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
[in] | cmd | Command variable. |
void lpwifi_send_cmd_check | ( | lpwifi_t * | ctx, |
char * | at_cmd_buf | ||
) |
Send command to check commands current value.
Send AT command (at_cmd_buf) and appends '?' to check commands value.
[in] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
[in] | at_cmd_buf | : AT command. |
void lpwifi_send_cmd_with_parameter | ( | lpwifi_t * | ctx, |
char * | at_cmd_buf, | ||
char * | param_buf | ||
) |
Send command function with parameter.
This function sends commands to the click module.
[in] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
[in] | param_buf | Parameter buffer. |
void lpwifi_set_wifi_mode | ( | lpwifi_t * | ctx, |
uint8_t | mode | ||
) |
Set WiFi mode function.
This function sets WiFi mode to STA or Soft-AP depending on the mode value.
[in] | ctx | : Click context object. See lpwifi_t object definition for detailed explanation. |
[in] | mode | 0 - STA, 1 - Soft-AP. |