libicsc  1.0.0
 All Data Structures Files Functions Modules
Macros | Functions
Callbacks

Functions for dealing with commands and callback functions. More...

Macros

#define ICSC_CATCH_ALL   0xFF
 

Functions

int icsc_register_command (icsc_ptr icsc, char command, callbackFunction func)
 Register a new command callback. More...
 
int icsc_unregister_command (icsc_ptr icsc, char command)
 Unregister an old command character. More...
 

Detailed Description

Functions for dealing with commands and callback functions.

Function Documentation

int icsc_register_command ( icsc_ptr  icsc,
char  command,
callbackFunction  func 
)

Register a new command callback.

Parameters
icscPointer to an icsc context created using icsc_init() or icsc_init_de()
commandThe character to use for the command
funcThe 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
icscPointer to an icsc context created using icsc_init() or icsc_init_de()
commandThe command character to unregister
Returns
0 if the command was unregistered successfully, otherwise -1 on an error.