Sog Yang
/
mbed_SPIS_multiByte_example_SOG
Sog update version
Fork of mbed_SPIS_multiByte_example by
main.cpp
- Committer:
- tsungta
- Date:
- 2017-05-31
- Revision:
- 1:58f0712d9aa2
- Parent:
- 0:b7415ae44dac
- Child:
- 2:c520d7c7739d
File content as of revision 1:58f0712d9aa2:
#include "mbed.h" #include "SPISlave_multiByte.h" SPISlave_multiByte device(A1, A2, A3, p3); // mosi, miso, sclk, ssel Serial uart(USBTX, USBRX); int main() { uart.printf("START!"); device.format(8,1); while(1) { if(device.receive()) { int v = device.read(); // Read byte from master uart.printf("v = %s ", v); } } }