The function runs a hardware test with an external test plug. This test verifies the operation of the CAN drivers, the KL line driver and the switch.
long HwTest(unsigned long DeviceID)
| Definition | Description |
|---|---|
| STATUS_NOERROR | Function completed successfully |
| ERR_DEVICE_NOT_CONNECTED | No connection to the adapter. Possible causes: the adapter is turned off, there is no network, or the IP address is set incorrectly. |
| ERR_INVALID_DEVICE_ID | A non-existent adapter DeviceID was specified |
#include "j2534_lib.hpp"
unsigned long DeviceID;
unsigned long Ret;
Ret = HwTest(DeviceID);
if (Ret != STATUS_NOERROR)
{ // Error handling
}