Added debug messages in can_peak_linux driver iface
authoretisserant
Mon, 21 Apr 2008 16:34:12 +0200
changeset 441 968697561674
parent 440 dfcec7403169
child 442 010c26b9ba89
Added debug messages in can_peak_linux driver iface
drivers/can_peak_linux/can_peak_linux.c
--- a/drivers/can_peak_linux/can_peak_linux.c	Tue Apr 01 10:17:11 2008 +0200
+++ b/drivers/can_peak_linux/can_peak_linux.c	Mon Apr 21 16:34:12 2008 +0200
@@ -56,6 +56,11 @@
   m->len = peakMsg.LEN;					/* count of data bytes (0..8) */
   for(data = 0  ; data < peakMsg.LEN ; data++)             			
     m->data[data] = peakMsg.DATA[data];         	/* data bytes, up to 8 */
+
+#if defined DEBUG_MSG_CONSOLE_ON
+  printf("in : ");
+  print_message(m);
+#endif
   
   return 0;
 }
@@ -76,6 +81,10 @@
   for(data = 0 ; data <  m->len; data ++)
   	peakMsg.DATA[data] = m->data[data];         	/* data bytes, up to 8 */
   
+#if defined DEBUG_MSG_CONSOLE_ON
+  printf("out : ");
+  print_message(m);
+#endif
   if((errno = CAN_Write(fd0, & peakMsg))) {
     perror("canSend_driver (Peak_Linux) : error of writing.\n");
     return 1;