1.1.2.4.36 DRV_G3_MACRT_EXCEPTION_CALLBACK Typedef
C
typedef void ( *DRV_G3_MACRT_EXCEPTION_CALLBACK )( DRV_G3_MACRT_EXCEPTION exception );
Summary
Pointer to a G3 MAC RT Driver Exceptions Event handler function.
Description
This data type defines the required function signature for the G3 MAC RT driver exceptions event handling callback function. A client must register a pointer using the callback register function whose function signature (parameter and return value types) match the types specified by this function pointer in order to receive transfer related event calls back from the driver.
Parameters
Param | Description |
---|---|
exception | Value (of type DRV_G3_MACRT_EXCEPTION Enum) identifying the exception code which occurs during SPI transfer |
Returns
None.
Example
void APP_MyExceptionEventHandler( DRV_G3_MACRT_EXCEPTION exception )
{
switch (exception)
{
case DRV_G3_MACRT_EXCEPTION_UNEXPECTED_KEY:
// SPI has detected an unexpected status, reset is recommended
break;
case DRV_G3_MACRT_EXCEPTION_RESET:
// PLC transceiver has been reset
break;
default:
// SPI has detected an unexpected status, reset is recommended
}
appData->macrt_exception = true;
}
Remarks
None.