Public Attributes

Menu::command Struct Reference

#include <menu.h>

List of all members.

Public Attributes

const char command [MENU_COMMAND_MAX]
int8_t(* func )(uint8_t argc, const struct arg *argv)
 callback function

Detailed Description

menu command description

Definition at line 68 of file menu.h.


Member Data Documentation

const char Menu::command::command[MENU_COMMAND_MAX]

Name of the command, as typed or received. Command names are limited in size to keep this structure compact.

Definition at line 72 of file menu.h.

int8_t(* Menu::command::func)(uint8_t argc, const struct arg *argv)

callback function

The function to call when the command is received.

The argc argument will be at least 1, and no more than MENU_ARGS_MAX. The argv array will be populated with arguments typed/received up to MENU_ARGS_MAX. The command name will always be in argv[0].

Commands may return -2 to cause the menu itself to exit. The "?", "help" and "exit" commands are always defined, but can be overridden by explicit entries in the command array.

Definition at line 85 of file menu.h.


The documentation for this struct was generated from the following file: