Building a CAN API for Arduino DUE

Owais:
Just one more thing, as you have mentioned that the Can structure is from the file " component_can.h ", how/where do link this to our "due_can.h" so that the compiler knows where to look for Can structure?

Hello Owais,
I don't know which version of the IDE 1.5.x you are using but if you do a simple excercise of changing the name of the component_can.h file located at

...\arduino-1.5.x-windows\arduino-1.5.x\hardware\arduino\sam\system\CMSIS\Device\ATMEL\sam3xa\include\component

Let's say i.e. renaming as componen_can1.h, you will find the debugging chain showing the error. Here the simplify chain:

due_can.h->sn65hvd234.h->variant.h->Arduino.h->chip.h->sam.h->sam3.h->sam3xa.h->sam3x8e.h->component_can.h

Notice that it starts with due_can.h and then through the transceiver driver points to the variant file and so on until reach the component_can.h file that contains the Can structure.

Regards!