/* Closes the CAN channel. Note that the closing of the CAN channel takes a long time in the Lawicel CANUSB API, therefore this is not done in CanUsbDisconnect() for this CAN interface.  */
static bool CanUsbCloseChannel(void)
/* Closes the CAN channel. Note that the closing of the CAN channel takes a long time in the Lawicel CANUSB API, therefore this is not done in CanUsbDisconnect() for this CAN interface.  */
static bool CanUsbCloseChannel(void)
{
  bool result = false;
  if (canUsbCanHandle != 0)
  {
    if (CanUsbLibFuncClose(canUsbCanHandle) >= 0)
    {
      result = true;
    }
    canUsbCanHandle = 0;
  }
  return result;
}