Functions for dealing with commands and callback functions.
More...
|
#define | ICSC_CATCH_ALL 0xFF |
|
Functions for dealing with commands and callback functions.
int icsc_register_command |
( |
icsc_ptr |
icsc, |
|
|
char |
command, |
|
|
callbackFunction |
func |
|
) |
| |
Register a new command callback.
- Parameters
-
icsc | Pointer to an icsc context created using icsc_init() or icsc_init_de() |
command | The character to use for the command |
func | The callback function to call when the command is received |
- Returns
- 0 if the command was registered successfully, otherwise -1 on an error.
int icsc_unregister_command |
( |
icsc_ptr |
icsc, |
|
|
char |
command |
|
) |
| |
Unregister an old command character.
- Parameters
-
- Returns
- 0 if the command was unregistered successfully, otherwise -1 on an error.