|
4 | 4 | * Copyright (C) 2011 Black Sphere Technologies Ltd. |
5 | 5 | * Written by Gareth McMullin <gareth@blacksphere.co.nz> |
6 | 6 | * Copyright (C) 2021 Uwe Bonnes (bon@elektron.ikp.physik.tu-darmstadt.de) |
7 | | - * Copyright (C) 2023 1BitSquared <info@1bitsquared.com> |
| 7 | + * Copyright (C) 2023-2025 1BitSquared <info@1bitsquared.com> |
8 | 8 | * Modified by Rachel Mant <git@dragonmux.network> |
9 | 9 | * |
10 | 10 | * This program is free software: you can redistribute it and/or modify |
@@ -70,6 +70,9 @@ static bool cmd_target_power(target_s *target, int argc, const char **argv); |
70 | 70 | #ifdef PLATFORM_HAS_BATTERY |
71 | 71 | static bool cmd_target_battery(target_s *t, int argc, const char **argv); |
72 | 72 | #endif |
| 73 | +#ifdef PLATFORM_HAS_WIFI |
| 74 | +static bool cmd_wifi(target_s *t, int argc, const char **argv); |
| 75 | +#endif |
73 | 76 | #ifdef PLATFORM_HAS_TRACESWO |
74 | 77 | static bool cmd_swo(target_s *target, int argc, const char **argv); |
75 | 78 | #endif |
@@ -109,6 +112,9 @@ const command_s cmd_list[] = { |
109 | 112 | #ifdef PLATFORM_HAS_BATTERY |
110 | 113 | {"battery", cmd_target_battery, "Reads the battery state"}, |
111 | 114 | #endif |
| 115 | +#ifdef PLATFORM_HAS_WIFI |
| 116 | + {"wifi", cmd_wifi, "Show/Set Wi-Fi connection [AP name,passphrase]"}, |
| 117 | +#endif |
112 | 118 | #ifdef ENABLE_RTT |
113 | 119 | {"rtt", cmd_rtt, |
114 | 120 | "[enable|disable|status|channel [0..15 ...]|ident [STR]|cblock|ram [RAM_START RAM_END]|poll [MAXMS MINMS " |
@@ -202,7 +208,7 @@ bool cmd_version(target_s *target, int argc, const char **argv) |
202 | 208 | #endif |
203 | 209 | gdb_outf(", Hardware Version %d\n", platform_hwversion()); |
204 | 210 | #endif |
205 | | - gdb_out("Copyright (C) 2010-2024 Black Magic Debug Project\n"); |
| 211 | + gdb_out("Copyright (C) 2010-2025 Black Magic Debug Project\n"); |
206 | 212 | gdb_out("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\n"); |
207 | 213 |
|
208 | 214 | return true; |
@@ -541,6 +547,15 @@ static bool cmd_target_battery(target_s *t, int argc, const char **argv) |
541 | 547 | return true; |
542 | 548 | } |
543 | 549 | #endif |
| 550 | +#ifdef PLATFORM_HAS_WIFI |
| 551 | +static bool cmd_wifi(target_s *t, int argc, const char **argv) |
| 552 | +{ |
| 553 | + (void)t; |
| 554 | + gdb_out(platform_wifi_state(argc, argv)); |
| 555 | + return true; |
| 556 | +} |
| 557 | +#endif |
| 558 | + |
544 | 559 | #ifdef ENABLE_RTT |
545 | 560 | static const char *on_or_off(const bool value) |
546 | 561 | { |
|
0 commit comments