#include <stdio.h>
{
char buf[50];
buf[0] = '\0';
printf("%s: failed, stat=%d (%s)\n", id, (int)stat, buf);
}
}
void main(int argc, char* argv[]){
int channel_number = 0;
char msg[8] = {1, 2, 3, 4, 5, 6, 7, 8};
printf("Opening channel %d\n", channel_number);
if(hnd < 0){
exit(1);
}
printf("Setting bitrate and going bus on\n");
Check("canSetBusParams", stat);
Check("canBusOn", stat);
printf("Writing a message to the channel and waiting for it to be sent \n");
Check("canWrite", stat);
Check("canWriteSync", stat);
printf("Going off bus and closing channel");
Check("canBusOff", stat);
Check("canClose", stat);
}