#include <stdio.h>
{
char buf[50];
buf[0] = '\0';
printf("%s: failed, stat=%d (%s)\n", id, (int)stat, buf);
}
}
int main(int argc, char *argv[])
{
printf(
"canOpenChannel in classic CAN mode failed with status: (%d)\n", (
canStatus)hndCan);
return -1;
}
check("canSetBusParamsTq", stat);
printf(
"canOpenChannel in CAN FD mode failed with status: (%d)\n", (
canStatus)hndCanFd);
return -1;
}
check("canSetBusParamsTq", stat);
check("canGetBusParamsTq", stat);
printf("\nClassic CAN: tq %u, phase1 %u, phase2 %u, sjw %u, prop %u, prescaler %u\n",
check("canGetBusParamsFdTq", stat);
printf("\nArbitration phase: tq %u, phase1 %u, phase2 %u, sjw %u, prop %u, prescaler %u\n",
arbitrationReturn.
tq, arbitrationReturn.
phase1, arbitrationReturn.
phase2,
printf("\nData phase: tq %u, phase1 %u, phase2 %u, sjw %u, prop %u, prescaler %u\n",
check("canUnloadLibrary", stat);
return 0;
}