Skip to content

Commit

Permalink
Add a stub implementation fro Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed Jan 18, 2023
1 parent 8b85785 commit 3ed3d25
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions src/ubuntu/ubuntu_wifi.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright (c) 2023 Allterco Robotics
* All rights reserved
*/

#include "mgos_wifi_hal.h"

#include "mgos.h"

bool mgos_wifi_dev_ap_setup(const struct mgos_config_wifi_ap *cfg UNUSED_ARG) {
LOG(LL_ERROR, ("%s: not implemented", __func__));
return true; // Pretend it succeded
}

bool mgos_wifi_dev_sta_setup(const struct mgos_config_wifi_sta *cfg UNUSED_ARG) {
LOG(LL_ERROR, ("%s: not implemented", __func__));
return true; // Pretend it succeeded
}

bool mgos_wifi_dev_sta_connect(void) {
LOG(LL_ERROR, ("%s: not implemented", __func__));
return false;
}

bool mgos_wifi_dev_sta_disconnect(void) {
return true;
}

enum mgos_wifi_status mgos_wifi_dev_sta_get_status(void) {
return MGOS_WIFI_DISCONNECTED;
}

bool mgos_wifi_dev_start_scan(void) {
LOG(LL_ERROR, ("%s: not implemented", __func__));
return false;
}

int mgos_wifi_sta_get_rssi(void) {
return 0;
}

bool mgos_wifi_dev_get_ip_info(int if_instance UNUSED_ARG,
struct mgos_net_ip_info *ip_info UNUSED_ARG) {
LOG(LL_ERROR, ("%s: not implemented", __func__));
return false;
}

void mgos_wifi_dev_init(void) {
}

void mgos_wifi_dev_deinit(void) {
}

0 comments on commit 3ed3d25

Please sign in to comment.