Skip to content

Commit 3ed3d25

Browse files
committed
Add a stub implementation fro Ubuntu
1 parent 8b85785 commit 3ed3d25

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

src/ubuntu/ubuntu_wifi.c

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Copyright (c) 2023 Allterco Robotics
3+
* All rights reserved
4+
*/
5+
6+
#include "mgos_wifi_hal.h"
7+
8+
#include "mgos.h"
9+
10+
bool mgos_wifi_dev_ap_setup(const struct mgos_config_wifi_ap *cfg UNUSED_ARG) {
11+
LOG(LL_ERROR, ("%s: not implemented", __func__));
12+
return true; // Pretend it succeded
13+
}
14+
15+
bool mgos_wifi_dev_sta_setup(const struct mgos_config_wifi_sta *cfg UNUSED_ARG) {
16+
LOG(LL_ERROR, ("%s: not implemented", __func__));
17+
return true; // Pretend it succeeded
18+
}
19+
20+
bool mgos_wifi_dev_sta_connect(void) {
21+
LOG(LL_ERROR, ("%s: not implemented", __func__));
22+
return false;
23+
}
24+
25+
bool mgos_wifi_dev_sta_disconnect(void) {
26+
return true;
27+
}
28+
29+
enum mgos_wifi_status mgos_wifi_dev_sta_get_status(void) {
30+
return MGOS_WIFI_DISCONNECTED;
31+
}
32+
33+
bool mgos_wifi_dev_start_scan(void) {
34+
LOG(LL_ERROR, ("%s: not implemented", __func__));
35+
return false;
36+
}
37+
38+
int mgos_wifi_sta_get_rssi(void) {
39+
return 0;
40+
}
41+
42+
bool mgos_wifi_dev_get_ip_info(int if_instance UNUSED_ARG,
43+
struct mgos_net_ip_info *ip_info UNUSED_ARG) {
44+
LOG(LL_ERROR, ("%s: not implemented", __func__));
45+
return false;
46+
}
47+
48+
void mgos_wifi_dev_init(void) {
49+
}
50+
51+
void mgos_wifi_dev_deinit(void) {
52+
}

0 commit comments

Comments
 (0)