lpwifi  2.0.0.0
Macros | Functions
main.c File Reference

LP WiFi Click Example. More...

#include "board.h"
#include "log.h"
#include "lpwifi.h"
#include "string.h"
#include "generic_pointer.h"

Macros

#define AP_SSID   ""
 
#define AP_PASSWORD   ""
 
#define LOCAL_PORT   1
 
#define APP_OK   0
 
#define APP_ERROR_DRIVER   -1
 
#define APP_ERROR_OVERFLOW   -2
 
#define APP_ERROR_TIMEOUT   -3
 
#define RSP_OK   "OK"
 
#define RSP_ERROR   "ERROR"
 
#define PROCESS_BUFFER_SIZE   400
 
#define WAIT_FOR_CONNECTION   0
 
#define CONNECTED_TO_AP   1
 
#define NOT_CONNECTED_TO_AP   2
 
#define CONNECTED   "+WFJAP:1"
 
#define NOT_CONNECTED   "+WFJAP:0"
 
#define IP_DELIMITER   "',"
 

Functions

void application_init (void)
 
void application_task (void)
 
void main (void)
 

Detailed Description

LP WiFi Click Example.

Description

This example reads and processes data from LP WiFi clicks.

The demo application is composed of two sections :

Application Init

Initializes the driver and powers up the module, then connects to the desired AP and creates TCP and UDP servers on the desired local port.

Application Task

Logs all the data received from TCP/UDP clients on the USB UART.

Additional Function

Note
In order for the example to work, user needs to set the AP SSID, password, and Local port on which the TCP server and UDP socket will be created. Enter valid data for the following macros: AP_SSID, AP_PASSWORD and LOCAL_PORT.
Author
Stefan Filipovic

Macro Definition Documentation

◆ AP_PASSWORD

#define AP_PASSWORD   ""

◆ AP_SSID

#define AP_SSID   ""

◆ APP_ERROR_DRIVER

#define APP_ERROR_DRIVER   -1

◆ APP_ERROR_OVERFLOW

#define APP_ERROR_OVERFLOW   -2

◆ APP_ERROR_TIMEOUT

#define APP_ERROR_TIMEOUT   -3

◆ APP_OK

#define APP_OK   0

◆ CONNECTED

#define CONNECTED   "+WFJAP:1"

◆ CONNECTED_TO_AP

#define CONNECTED_TO_AP   1

◆ IP_DELIMITER

#define IP_DELIMITER   "',"

◆ LOCAL_PORT

#define LOCAL_PORT   1

◆ NOT_CONNECTED

#define NOT_CONNECTED   "+WFJAP:0"

◆ NOT_CONNECTED_TO_AP

#define NOT_CONNECTED_TO_AP   2

◆ PROCESS_BUFFER_SIZE

#define PROCESS_BUFFER_SIZE   400

◆ RSP_ERROR

#define RSP_ERROR   "ERROR"

◆ RSP_OK

#define RSP_OK   "OK"

◆ WAIT_FOR_CONNECTION

#define WAIT_FOR_CONNECTION   0

Function Documentation

◆ application_init()

void application_init ( void  )

< Logger config object.

< Click config object.

◆ application_task()

void application_task ( void  )

◆ main()

void main ( void  )