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
|
#include <stdint.h>
#include "../event.h"
#define EOS_WIFI_MTYPE_STATUS 0
#define EOS_WIFI_MTYPE_SCAN 1
#define EOS_WIFI_MTYPE_START 2
#define EOS_WIFI_MTYPE_STOP 3
#define EOS_WIFI_MTYPE_CONNECT 4
#define EOS_WIFI_MTYPE_DISCONNECT 5
#define EOS_WIFI_MAX_MTYPE 2
#define EOS_WIFI_STATUS_OFF 0
#define EOS_WIFI_STATUS_DISCONNECTED 1
#define EOS_WIFI_STATUS_CONNECTED 2
#define EOS_WIFI_STATUS_GOT_IP 3
#define EOS_WIFI_SIZE_SSID 33
#define EOS_WIFI_SIZE_PWD 64
#define EOS_WIFI_MAX_SCAN_RECORDS 20
void eos_wifi_init(void);
void eos_wifi_set_handler(unsigned char mtype, eos_evt_handler_t handler);
eos_evt_handler_t eos_wifi_get_handler(unsigned char mtype);
int eos_wifi_status_parse(unsigned char *buffer, uint16_t len, uint8_t *status, uint8_t ip_addr[], char *ssid);
int eos_wifi_status(uint8_t *status, uint8_t ip_addr[], char *ssid, unsigned char *buffer);
int eos_wifi_start(unsigned char *buffer, int sync);
int eos_wifi_stop(unsigned char *buffer, int sync);
int eos_wifi_scan(unsigned char *buffer, int sync);
int eos_wifi_connect(char *ssid, char *pwd, unsigned char *buffer, int sync);
int eos_wifi_disconnect(unsigned char *buffer, int sync);
|