Plymouth ELEC351 Group T
/
ELEC351_Group_T
FINAL PROJECT isn't it
Fork of ELEC351 by
SPI.hpp@56:bc5345bc6650, 2018-07-16 (annotated)
- Committer:
- thomasmorris
- Date:
- Mon Jul 16 10:51:47 2018 +0000
- Revision:
- 56:bc5345bc6650
- Parent:
- 53:71f59e195f06
Moves added to serial;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 56:bc5345bc6650 | 1 | #ifndef SPI_HPP//Header Guards Prevents Multiple includes |
thomasmorris | 56:bc5345bc6650 | 2 | #define SPI_HPP |
thomasmorris | 56:bc5345bc6650 | 3 | |
thomasmorris | 53:71f59e195f06 | 4 | #include "mbed.h" |
thomasmorris | 56:bc5345bc6650 | 5 | #include "LED_LOGGING.hpp" |
thomasmorris | 56:bc5345bc6650 | 6 | #include "SERIAL.hpp" |
thomasmorris | 56:bc5345bc6650 | 7 | #include "COLOURS.hpp" |
thomasmorris | 53:71f59e195f06 | 8 | |
thomasmorris | 53:71f59e195f06 | 9 | /* |
thomasmorris | 53:71f59e195f06 | 10 | MOSI = Blue |
thomasmorris | 53:71f59e195f06 | 11 | MISO = White |
thomasmorris | 53:71f59e195f06 | 12 | SCLK = Yellow |
thomasmorris | 53:71f59e195f06 | 13 | Slave Select = Green |
thomasmorris | 53:71f59e195f06 | 14 | |
thomasmorris | 53:71f59e195f06 | 15 | */ |
thomasmorris | 53:71f59e195f06 | 16 | |
thomasmorris | 53:71f59e195f06 | 17 | static SPI spi(PC_12,PC_11,PC_10); // mosi, miso, sclk |
thomasmorris | 53:71f59e195f06 | 18 | static DigitalOut cs(PD_2); //Slave select |
thomasmorris | 56:bc5345bc6650 | 19 | void SPI_INIT(); |
thomasmorris | 56:bc5345bc6650 | 20 | void SPI_INTERFACE_SERIAL(); |
thomasmorris | 56:bc5345bc6650 | 21 | |
thomasmorris | 56:bc5345bc6650 | 22 | #endif |