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.
Revision 0:ce4f87a989a6, committed 2016-02-09
- Comitter:
- Mahran
- Date:
- Tue Feb 09 18:16:28 2016 +0000
- Commit message:
- SPI
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r ce4f87a989a6 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Feb 09 18:16:28 2016 +0000
@@ -0,0 +1,25 @@
+#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);
+}
+
+}
+
+}
diff -r 000000000000 -r ce4f87a989a6 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Feb 09 18:16:28 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/f141b2784e32 \ No newline at end of file