ec_control_register_command2

March 26, 2020 Contributors

Name

ec_control_register_command2 — Register a command handler with the system

Synopsis

#include "control.h"

| void **ec_control_register_command2** ( | prefix, |   |
|   | closure, |   |
|   | func); |   |

const char * <var class="pdparam">prefix</var>;
void * <var class="pdparam">closure</var>;
ec_control_function2 <var class="pdparam">func</var>;

Description

Register a command handler with the system.

The command stays registered with the system, even across configuration generations.

Once registered, it cannot be removed, but may be replaced with another command registered at the same prefix.

Parameters

prefix

The command name.

closure

A void pointer to the closure.

func

A void pointer to the command action.

Return Values

This function returns void.

Threading

It is legal to call this function in any thread.

See Also

See ec_control_register_command3.