EasyManua.ls Logo

Sys Tec Electronic GW-003 - Page 91

Default Icon
108 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Software Support
© SYS TEC electronic GmbH 2007 L-1032e_9 83
#define RESET_CAN_CONTROLLER 0x04
These constants can be combined bit by bit so that, depending on the
application, it is possible to reset specific or all CAN components.
Note:
No CAN messages can be sent or received while the CAN interface is
being reset or if the buffer is being erased!
Return Values:
(see Section 7.3.3)
ETHCAN_SUCCESSFUL
ETHCAN_ERR_ILLHANDLE
ETHCAN_ERR_ILLPARAM
ETHCAN_ERR_HWNOINIT
ETHCAN_ERR_HWNOTCONNECTED
Application Example:
tEthCanHandle EthCanHandle;
DWORD dwResetCode;
DWORD dwRetcode;
//Reset all buffers and reset the CAN interface
//of the CAN-Ethernet Gateway
dwResetCode = (RESET_ALL_QUEUES & RESET_CAN_CONTROLLER);
//Reset the CAN interface
dwRetcode = EthCanResetCan(EthCanHandle,dwResetCode);
if(dwRetcode == ETHCAN_SUCCESSFUL)
{
//CAN interface was reset successfully
}
else
{
//An error occurred while resetting the CAN interface
}

Table of Contents