File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,12 @@ char *mgos_wifi_get_status_str(void);
176
176
*/
177
177
char * mgos_wifi_get_connected_ssid (void );
178
178
179
+ /*
180
+ * Get a `struct mgos_config_wifi_sta` to which we are currently connected
181
+ * or `NULL` if not connected.
182
+ */
183
+ const struct mgos_config_wifi_sta * mgos_wifi_get_connected_sta_cfg (void );
184
+
179
185
/*
180
186
* Return default DNS server IP address. The caller should free it.
181
187
*/
Original file line number Diff line number Diff line change @@ -678,6 +678,12 @@ char *mgos_wifi_get_connected_ssid(void) {
678
678
return strdup (s_cur_entry -> cfg -> ssid );
679
679
}
680
680
681
+ const struct mgos_config_wifi_sta * mgos_wifi_get_connected_sta_cfg (void ) {
682
+ if (s_cur_entry == NULL ) return NULL ;
683
+ return s_cur_entry -> cfg ;
684
+ }
685
+
686
+
681
687
void mgos_wifi_sta_init (void ) {
682
688
mgos_event_add_group_handler (MGOS_WIFI_EV_BASE , mgos_wifi_ev_handler , NULL );
683
689
mgos_event_add_handler (MGOS_EVENT_REBOOT_AFTER ,
You can’t perform that action at this time.
0 commit comments