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.
Fork of SPICommSTM32f4 by
main.cpp
- Committer:
- Mahran
- Date:
- 2016-02-09
- Revision:
- 0:ce4f87a989a6
- Child:
- 1:32e0accab04d
File content as of revision 0:ce4f87a989a6:
#include "mbed.h"
SPISlave SPINUCLEO(PA_7,PA_6,PA_5,PA_4);
DigitalOut myled(LED1);
int main() {
int a=0;
myled = 0;
SPINUCLEO.frequency(21000000);
SPINUCLEO.reply(0x00);
while (1)
{
if (SPINUCLEO.receive())
{
a=SPINUCLEO.read();
SPINUCLEO.reply(a);
myled = 1;
wait(2);
myled = 0;
wait(2);
}
}
}
