Each LPC1768 is capable of controlling 2 CAN bus lines. Linking multiple chips together via SPI allows for more bus lines to be monitored simultaneously. Slave unit.
main.cpp
- Committer:
- ggudgel
- Date:
- 2014-10-31
- Revision:
- 0:a46303f3277c
File content as of revision 0:a46303f3277c:
#include "mbed.h" #include "rtos.h" #include "spiSlaveProtocol.h" #include "CAN_thread.h" int main() { Thread thread(CAN_thread); Serial* pc = new Serial(USBTX, USBRX); // tx, rx spiSlaveProtocol* device = new spiSlaveProtocol(pc); while (1) { device->run(); } }