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.
Diff: spiSlaveProtocol.h
- Revision:
- 0:a46303f3277c
diff -r 000000000000 -r a46303f3277c spiSlaveProtocol.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spiSlaveProtocol.h Fri Oct 31 22:14:03 2014 +0000 @@ -0,0 +1,19 @@ +#ifndef _spiSlave_included_ +#define _spiSlave_included_ +#include "mbed.h" + +class spiSlaveProtocol +{ + public: + spiSlaveProtocol(Serial*); + void run(void); + + private: + SPISlave* spiLine; + int state; + int commandBytes; + Serial* pc; + Timer* timout; + +}; +#endif \ No newline at end of file