From c2cedad5e36c88223e28433d69b5f2e6fbcf2160 Mon Sep 17 00:00:00 2001 From: Deomid Ryabkov Date: Fri, 24 Nov 2017 16:20:59 +0300 Subject: [PATCH] Rename mgos_wifi_set_config to mgos_wifi_setup And make public. Related to https://github.com/mongoose-os-libs/bt-common/issues/1 PUBLISHED_FROM=0ba0e42b4dd28bbc393f0646541ca9faa8654cb4 --- include/mgos_wifi.h | 2 ++ src/mgos_wifi.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/mgos_wifi.h b/include/mgos_wifi.h index 74eb148..2de9de4 100644 --- a/include/mgos_wifi.h +++ b/include/mgos_wifi.h @@ -17,6 +17,8 @@ bool mgos_wifi_setup_sta(const struct mgos_config_wifi_sta *cfg); bool mgos_wifi_setup_ap(const struct mgos_config_wifi_ap *cfg); +bool mgos_wifi_setup(const struct mgos_config_wifi *cfg); + bool mgos_wifi_connect(void); /* To the previously _setup network. */ bool mgos_wifi_disconnect(void); diff --git a/src/mgos_wifi.c b/src/mgos_wifi.c index 7cc1b1e..0ec97e9 100644 --- a/src/mgos_wifi.c +++ b/src/mgos_wifi.c @@ -296,7 +296,7 @@ void mgos_wifi_scan(mgos_wifi_scan_cb_t cb, void *arg) { wifi_unlock(); } -bool mgos_wifi_set_config(const struct mgos_config_wifi *cfg) { +bool mgos_wifi_setup(const struct mgos_config_wifi *cfg) { bool result = false, trigger_ap = false; int gpio = cfg->ap.trigger_on_gpio; @@ -332,5 +332,5 @@ bool mgos_wifi_init(void) { s_wifi_lock = mgos_new_rlock(); mgos_register_config_validator(validate_wifi_cfg); mgos_wifi_dev_init(); - return mgos_wifi_set_config(mgos_sys_config_get_wifi()); + return mgos_wifi_setup(mgos_sys_config_get_wifi()); }