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. Master unit.

Dependencies:   mbed

Committer:
ggudgel
Date:
Fri Oct 31 22:13:47 2014 +0000
Revision:
0:855b6e84e744
First working revision. Test functionality of one mbed system controlling another through SPI, while utilizing CAN bus lines.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ggudgel 0:855b6e84e744 1 #ifndef _spiMaster_included_
ggudgel 0:855b6e84e744 2 #define _spiMaster_included_
ggudgel 0:855b6e84e744 3 #include "mbed.h"
ggudgel 0:855b6e84e744 4
ggudgel 0:855b6e84e744 5 class spiMasterProtocol
ggudgel 0:855b6e84e744 6 {
ggudgel 0:855b6e84e744 7 public:
ggudgel 0:855b6e84e744 8 spiMasterProtocol();
ggudgel 0:855b6e84e744 9 int get42(void);
ggudgel 0:855b6e84e744 10 int get84(void);
ggudgel 0:855b6e84e744 11
ggudgel 0:855b6e84e744 12 private:
ggudgel 0:855b6e84e744 13 SPI* spiLine;
ggudgel 0:855b6e84e744 14 DigitalOut* chipSelect;
ggudgel 0:855b6e84e744 15
ggudgel 0:855b6e84e744 16 int write(int);
ggudgel 0:855b6e84e744 17
ggudgel 0:855b6e84e744 18 };
ggudgel 0:855b6e84e744 19 #endif