Karl Urban
/
SPI_setup_practice
WORK please
main.cpp
- Committer:
- kurba005
- Date:
- 2020-10-05
- Revision:
- 0:b183b7569045
File content as of revision 0:b183b7569045:
/* Program Example: Set up the mbed as SPI master*/ #include "mbed.h" SPI ser_port(p11, p12, p13); // mosi, miso, sclk char switch_word; //word we will send int main() { ser_port.format(12,1); // Setup the SPI for 12 bit data, Mode 1 operation ser_port.frequency(4000000); // Clock frequency is 4MHz }