diff options
Diffstat (limited to 'tests/unit/stubs/esp_wifi.h')
| -rw-r--r-- | tests/unit/stubs/esp_wifi.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/unit/stubs/esp_wifi.h b/tests/unit/stubs/esp_wifi.h new file mode 100644 index 0000000..6aa5787 --- /dev/null +++ b/tests/unit/stubs/esp_wifi.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | #ifndef STUBS_ESP_WIFI_H | ||
| 2 | #define STUBS_ESP_WIFI_H | ||
| 3 | |||
| 4 | #include <stdint.h> | ||
| 5 | #include <string.h> | ||
| 6 | #include "esp_err.h" | ||
| 7 | |||
| 8 | #define WIFI_IF_STA 0 | ||
| 9 | #define WIFI_IF_AP 1 | ||
| 10 | |||
| 11 | #define WIFI_AUTH_WPA2_PSK 3 | ||
| 12 | #define WIFI_AUTH_OPEN 0 | ||
| 13 | |||
| 14 | #define WIFI_MODE_APSTA 3 | ||
| 15 | |||
| 16 | typedef struct { | ||
| 17 | struct { | ||
| 18 | uint8_t ssid[32]; | ||
| 19 | uint8_t password[64]; | ||
| 20 | uint8_t channel; | ||
| 21 | uint8_t max_connection; | ||
| 22 | uint8_t ssid_hidden; | ||
| 23 | int authmode; | ||
| 24 | } ap; | ||
| 25 | struct { | ||
| 26 | uint8_t ssid[32]; | ||
| 27 | uint8_t password[64]; | ||
| 28 | int threshold; | ||
| 29 | struct { | ||
| 30 | int authmode; | ||
| 31 | } sta; | ||
| 32 | } sta; | ||
| 33 | } wifi_config_t; | ||
| 34 | |||
| 35 | static inline esp_err_t esp_wifi_set_mac(int ifx, const uint8_t *mac) { (void)ifx; (void)mac; return ESP_OK; } | ||
| 36 | static inline esp_err_t esp_wifi_set_config(int ifx, const wifi_config_t *cfg) { (void)ifx; (void)cfg; return ESP_OK; } | ||
| 37 | static inline esp_err_t esp_wifi_set_mode(uint8_t mode) { (void)mode; return ESP_OK; } | ||
| 38 | static inline esp_err_t esp_wifi_start(void) { return ESP_OK; } | ||
| 39 | |||
| 40 | #endif | ||