2.120.15 TSENS_CALLBACK Typedef
C
typedef void (*TSENS_CALLBACK)(TSENS_STATUS status, uintptr_t context);
Summary
Defines the data type and function signature for the TSENS peripheral callback function.
Description
This data type defines the function signature for the TSENS peripheral callback function. The TSENS peripheral will call back the client's function with this signature at the end of conversion.
Precondition
TSENS_Initialize() function must have been called first for the associated instance and TSENS_CallbackRegister() must have been called to set the function to be called.
Parameters
Param | Description |
---|---|
status | interrupt status |
context | Allows the caller to provide a context value (usually a pointer to the callers context for multi-instance clients) |
Returns
None.
Example
void TSENS_TemperatureCallback( TSENS_STATUS status, uintptr_t context ) { int32_t result = 0; result = TSENS_ConversionResultGet(); } TSENS_CallbackRegister(TSENS_TemperatureCallback, uintptr_t(NULL));
Remarks
The callback feature is only available when the library was generated with interrupt option (in MCC) enabled.