Demonstration of CPP error in CAN attach - fixed

Revision:
1:acbf76e0e272
Parent:
0:cd47a82f15aa
--- a/CAN_stack.cpp	Wed Jul 27 16:18:10 2011 +0000
+++ b/CAN_stack.cpp	Tue Aug 02 12:18:51 2011 +0000
@@ -1,5 +1,6 @@
 #include "CAN_stack.h"
 
+extern DigitalOut* myled;
 
 CAN_stack::CAN_stack(CAN* can_int)
 {
@@ -16,8 +17,19 @@
 
 void CAN_stack::can_callback ( void )
 {
+    if (myled->read())
+    {
+         myled->write(0);
+    } 
+    
+    else
+    {
+         myled->write(1);
+    } 
+    
     CANMessage msg;
     adapter->read(msg);
+    
     /*
         push msg to fifo etc
     */