Can_open_slavenode

Dependencies:   mbed

Revision:
2:e0be90742924
Parent:
0:6219434a0cb5
Child:
4:a0557653428b
--- a/framework/driver/mbed/can_mbed.cpp	Mon May 30 08:26:03 2011 +0000
+++ b/framework/driver/mbed/can_mbed.cpp	Mon May 30 09:56:35 2011 +0000
@@ -55,7 +55,7 @@
 ******************************************************************************/
 {
     // convert the message from a CANopen object to a mbed object
-    CANMessage msg(m->cob_id, (char*)m->data, m->len, static_cast<CANType>(m->rtr), CANStandard);
+    CANMessage msg(m->cob_id, (uint8_t*)m->data, m->len, static_cast<CANType>(m->rtr), CANStandard);
     // make sure the message was sent
     if (CANopen.write(msg) == 0){
         return 0;                               
@@ -82,20 +82,20 @@
     m->len = msg.len;
     m->rtr = static_cast<UNS8>(msg.type);
     // clear erroneous data from the last use
-	for (int i=0; i<=7; i++){
-		if (i <= (msg.len-1))
-			m->data[i] = msg.data[i];
-		else
-			m->data[i] = 0;
-	}
-	// messge processed
+    for (int i=0; i<=7; i++){
+        if (i <= (msg.len-1))
+            m->data[i] = msg.data[i];
+        else
+            m->data[i] = 0;
+    }
+    // messge processed
     return 1;
 }
 
 /***************************************************************************/
 unsigned char canChangeBaudRate_driver( CAN_HANDLE fd, char* baud)
 {
-	// not sure how baud is passed as a char* yet
+    // not sure how baud is passed as a char* yet
     return 0;
 }