forked from marcomicera/followifier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwifi.h
46 lines (39 loc) · 997 Bytes
/
wifi.h
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
36
37
38
39
40
41
42
43
44
45
46
//
// Created by marcomicera on 9/12/19.
//
#ifndef FOLLOWIFIER_WIFI_H
#define FOLLOWIFIER_WIFI_H
#include <stdbool.h>
/**
* Wi-Fi info
*/
#define DEFAULT_SCAN_METHOD WIFI_FAST_SCAN
#define DEFAULT_SORT_METHOD WIFI_CONNECT_AP_BY_SIGNAL
#define DEFAULT_RSSI -127
#define DEFAULT_AUTHMODE WIFI_AUTH_OPEN
/**
* Initializes the Wi-Fi module.
*/
void init_wifi();
/**
* Turns on the Wi-Fi module.
* To be called after `init_wifi()`.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_INVALID_ARG: invalid argument
* - ESP_ERR_NO_MEM: out of memory
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_FAIL: other WiFi internal errors
*/
esp_err_t start_wifi();
/**
* Stops the Wi-Fi module.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
*/
esp_err_t stop_wifi();
#endif //FOLLOWIFIER_WIFI_H