From 3ed3d25ce63e42963287c63ffb8c642231716813 Mon Sep 17 00:00:00 2001 From: "Deomid \"rojer\" Ryabkov" Date: Wed, 18 Jan 2023 20:33:03 +0000 Subject: [PATCH] Add a stub implementation fro Ubuntu --- src/ubuntu/ubuntu_wifi.c | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/ubuntu/ubuntu_wifi.c diff --git a/src/ubuntu/ubuntu_wifi.c b/src/ubuntu/ubuntu_wifi.c new file mode 100644 index 0000000..6221324 --- /dev/null +++ b/src/ubuntu/ubuntu_wifi.c @@ -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) { +}