repl_wifi.h 1021 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*-----------------------------------------------------------------------------
 *  Author: Nelso G. Jost (nelsojost@gmail.com)
 *  License: GPLv2
 *  Purpose: Wrap wifi functions into REPL commands.
 *---------------------------------------------------------------------------*/
#ifndef REPL_WIFI_H
#define REPL_WIFI_H


#define CMD_REPL_WIFISCAN {\
    "wifiscan", REPL_WIFISCAN, "wifiscan", \
    "List all availables SSID in range for connection."}

#define CMD_REPL_WIFISTATUS {\
    "wifistatus", REPL_WIFISTATUS, "wifistatus", \
    "Print WiFi connection status (debug)."}

#define CMD_REPL_WIFICONNECT {\
    "wificonnect", REPL_WIFICONNECT, "wificonnect <ssid> <password>" \
    "Connect to a wifi network. If successful (threshold 10 sec), " \
    "it will autoconnect if board reseted."}


#define ALLCMD_REPL_WIFI \
    CMD_REPL_WIFISCAN, \
    CMD_REPL_WIFISTATUS, \
    CMD_REPL_WIFICONNECT


void REPL_WIFISCAN(REPL * repl);
void REPL_WIFISTATUS(REPL * repl);
void REPL_WIFICONNECT(REPL * repl);


#endif