uMIDI
The swiss army knife for quick and easy developement of MIDI applications.
Data Fields
serial_command Struct Reference

Command specification. More...

#include <serial_communication.h>

Collaboration diagram for serial_command:
Collaboration graph

Data Fields

PGM_P cmd_string
 The command as typed in the console. More...
 
PGM_P help_string
 
cmd_handler_t handler
 

Detailed Description

Command specification.

Note: The strings must be placed in program space. Unfortunately this is a two-step process: First you have to define the string in program space:

static const char cmd_string[] PROGMEM = "command";

You can then reference this string in the definition of a command struct. Please look at the USB-ready application template for an examplary command definition.

Field Documentation

◆ cmd_string

PGM_P serial_command::cmd_string

The command as typed in the console.

◆ handler

cmd_handler_t serial_command::handler

Handler to call when cmd_string is recognized

Parameters
cmdthe full command line
Returns
true if command execution succeeded, false otherwise

◆ help_string

PGM_P serial_command::help_string

Description of the command (used by the help command)

The description may contain newline characters, which will be automatically followed by white space in the help message output to ensure nice formatting. The first line specifies command parameters or options, which are printed directly after the cmd_string, so if your command does not take any, but the description does not fit in one line, you should specify an empty first line.


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