Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- tsungta
- Date:
- 2017-05-31
- Revision:
- 2:c520d7c7739d
- Parent:
- 1:58f0712d9aa2
- Child:
- 4:8e796b751cd3
File content as of revision 2:c520d7c7739d:
#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); device.reply((uint8_t*)"xyz", 3); while(1) { if(device.receive(3)) { int v = device.read(); // Read byte from master uart.printf("v = %s ", v); } } }