|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
Receive a command string pushed to the plugin by the host. More...
Functions | |
| int | host_cmd_consume (char *out, size_t out_size) |
| Copy the pending command string into out, clearing it. | |
Receive a command string pushed to the plugin by the host.
When the host forwards a command (e.g. via the PLUGIN CMD <id> <args> serial subcommand) it fires the optional plugin_on_cmd export with the command length. The plugin pulls the bytes into its own buffer with host_cmd_consume, mirroring host_ui_consume_input_text.
| int host_cmd_consume | ( | char * | out, |
| size_t | out_size ) |
Copy the pending command string into out, clearing it.
| out | Caller buffer in plugin linear memory. |
| out_size | Size of out; the result is always null-terminated. |
Definition at line 12 of file host_api_cmd.cpp.
References cdc::plugin_manager::PluginManager::consumeCmd(), and cdc::plugin_manager::PluginManager::instance().
Referenced by cdc::plugin_manager::w_host_cmd_consume().