command: document enum command_mode
authorAntonio Borneo <borneo.antonio@gmail.com>
Wed, 22 Sep 2021 21:14:22 +0000 (23:14 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Mon, 25 Oct 2021 16:10:28 +0000 (16:10 +0000)
Add the description to doxygen documentation.

Change-Id: Iec04b4a37088e1b3b52ca84102820f450528b5b9
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6593
Tested-by: jenkins
src/helper/command.h

index fb9e50c85e86728ad4b0c7f8512b11d73a103828..796cd9d3b3860b10f465d0627ca9ad00cd4a5b10 100644 (file)
 #define PRINTF_ATTRIBUTE_FORMAT printf
 #endif
 
 #define PRINTF_ATTRIBUTE_FORMAT printf
 #endif
 
+/**
+ * OpenOCD command mode is COMMAND_CONFIG at start, then switches to COMMAND_EXEC
+ * during the execution of command 'init'.
+ * The field 'mode' in struct command_registration specifies in which command mode
+ * the command can be executed:
+ * - during COMMAND_CONFIG only,
+ * - during COMMAND_EXEC only,
+ * - in both modes (COMMAND_ANY).
+ */
 enum command_mode {
        COMMAND_EXEC,
        COMMAND_CONFIG,
 enum command_mode {
        COMMAND_EXEC,
        COMMAND_CONFIG,