DACS_ERR_T dacs_errhandler_reg ( dacs_error_handler_t handler, uint32_t flags )
Call parameters | |
handler | A pointer to an error handling function. This function will be passed the error object containing the error information, and returns a boolean indicating whether termination is requested or not. For fatal internal errors the process will be terminated without consideration for the handler's return value. |
flags | Flags for error handling options. Note: In SDK 3.0 no
flags are supported; the flags value passed in must be 0 (zero).
|
The prototype of the handler is:
int (*dacs_error_handler_t)( dacs_error_t error )
The user-registered handler must accept a handle to an error object, and return 1 (one) or 0 (zero) to indicate whether the error is deemed fatal or not.
int my_errhandler(dacs_error_t error)then write the registration as
dacs_rc=dacs_errhandler_reg((dacs_error_handler_t)&my_errhandler,0);where dacs_rc has been declared as a variable of type DACS_ERROR_T.