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:
- AndyTran
- Date:
- 2015-12-07
- Revision:
- 0:5dea2dc6ac9e
File content as of revision 0:5dea2dc6ac9e:
#include "mbed.h"
SPISlave slave (p11,p12,p13,p14);
RawSerial pc(USBTX, USBRX);
int main() {
while (true) {
pc.baud (921600);
slave.format(10, 3);
slave.frequency(10000000);
slave.reply(0x00);
int check = slave.receive();
pc.printf("receive = %d\n\r",check);
if(check==1)
{
int mes = slave.read();
pc.printf("%d\n\r",mes);
}
}
}