1.8.1.6 ACC_CALLBACK Typedef
C
typedef void (*ACC_CALLBACK) (bool output, uintptr_t context);
Summary
Pointer to a ACC callback function
Description
This data type defines the required function signature for the ACC callback function. Application must register a pointer to a callback function whose function signature (parameter and return value types) match the types specified by this function pointer in order to receive callback from the PLIB.
The parameters and return values are described here and a partial example implementation is provided.
Parameters
Param | Description |
---|---|
output | Comparator output |
context | Client context handle |
Returns
None.
Example
ACC_CallbackRegister (&APP_ACC_CallbackFunction, NULL); void APP_ACC_CallbackFunction (bool output, uintptr_t context) { //Application related tasks }
Remarks
The context parameter contains the a handle to the client context, provided at the time the callback function was registered using the ACC_CallbackRegister function. This context handle value is passed back to the client as the "context" parameter. It can be any value (such as a pointer to the client's data) necessary to identify the client context or instance of the client that made the data transfer request. The callback function executes in the PLIB's interrupt context. It is recommended of the application to not perform process intensive or blocking operations with in this function.