#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[])
{
long freq;
unsigned int tseg1, tseg2, sjw, noSamp, syncmode;
int j;
(void)argc;
(void)argv;
for(j = 0 ; j < 2 ; j++) {
if (hnd[j] < 0) {
printf("canOpenChannel (%d) failed\n", j);
return -1;
}
check("canSetBusParams", stat);
}
printf("\n");
for (j = 0; j < 2; j++) {
stat =
canGetBusParams(hnd[j], &freq, &tseg1, &tseg2, &sjw, &noSamp, &syncmode);
printf("hnd[%d]:freq %ld, tseg1 %u, tseg2 %u, sjw %u, noSamp %u, syncmode %u\n ",
j, freq, tseg1, tseg2, sjw, noSamp, syncmode);
check("canGetBusParams", stat);
}
check("canUnloadLibrary", stat);
return 0;
}