|
@@ -43,6 +43,7 @@
|
43
|
43
|
|
44
|
44
|
#include "usbcfg.h"
|
45
|
45
|
#include "storage.h"
|
|
46
|
+#include "led.h"
|
46
|
47
|
|
47
|
48
|
|
48
|
49
|
/* Buffer for unwritten configuration */
|
|
@@ -131,7 +132,7 @@ static void cmd_get_tmpcfg(BaseSequentialStream *chp, int argc, char *argv[])
|
131
|
132
|
{
|
132
|
133
|
(void) argv;
|
133
|
134
|
if (argc > 0) {
|
134
|
|
- chprintf(chp, "Usage: get_tmpcfg [index]\r\n");
|
|
135
|
+ chprintf(chp, "Usage: get_tmpcfg\r\n");
|
135
|
136
|
return;
|
136
|
137
|
}
|
137
|
138
|
|
|
@@ -178,6 +179,18 @@ static void cmd_set_i(BaseSequentialStream *chp, int argc, char *argv[])
|
178
|
179
|
}
|
179
|
180
|
}
|
180
|
181
|
|
|
182
|
+static void cmd_identify(BaseSequentialStream *chp, int argc, char *argv[])
|
|
183
|
+{
|
|
184
|
+ (void) chp;
|
|
185
|
+ (void) argv;
|
|
186
|
+ if (argc > 0) {
|
|
187
|
+ chprintf(chp, "Usage: identify\r\n");
|
|
188
|
+ return;
|
|
189
|
+ }
|
|
190
|
+
|
|
191
|
+ chEvtSignal(pdb_led_thread, PDB_EVT_LED_FAST_BLINK_SLOW);
|
|
192
|
+}
|
|
193
|
+
|
181
|
194
|
static const struct pdb_shell_cmd commands[] = {
|
182
|
195
|
{"erase", cmd_erase, "Erase all stored configuration"},
|
183
|
196
|
{"write", cmd_write, "Write the changes to flash"},
|
|
@@ -189,6 +202,7 @@ static const struct pdb_shell_cmd commands[] = {
|
189
|
202
|
{"set_v", cmd_set_v, "Set the voltage in millivolts"},
|
190
|
203
|
{"set_i", cmd_set_i, "Set the current in milliamps"},
|
191
|
204
|
/* TODO {"set_v_range", cmd_set_v_range, "Set the minimum and maximum voltage in millivolts"},*/
|
|
205
|
+ {"identify", cmd_identify, "Blink the LED to identify the device"},
|
192
|
206
|
{NULL, NULL, NULL}
|
193
|
207
|
};
|
194
|
208
|
|