LALALALA

Dependencies:   SWSPI mbed

Files at this revision

API Documentation at this revision

Comitter:
AndyTran
Date:
Mon Dec 07 04:09:11 2015 +0000
Commit message:
SPI_sender

Changed in this revision

SWSPI.lib Show annotated file Show diff for this revision Revisions of this file
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 fd16813614c5 SWSPI.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SWSPI.lib	Mon Dec 07 04:09:11 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/davervw/code/SWSPI/#6a500a08c7fd
diff -r 000000000000 -r fd16813614c5 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Dec 07 04:09:11 2015 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+#include "SWSPI.h"
+
+
+RawSerial pc(USBTX, USBRX);
+SPI spi(p5, p6, p7);
+     // mosi, miso, sclk
+DigitalOut b_cs (p8);
+
+ 
+int main()
+{
+    pc.baud(921600);
+    spi.format(10, 3);
+    spi.frequency(10000000);
+    while(true)
+    {
+    b_cs.write(0);// = 0;
+    spi.write(0x9f);
+    //int jedecid = (spi.write(0) << 16) | (spi.write(0) << 8) | spi.write(0);
+    b_cs.write(1);// = 1;
+    pc.printf("done send\n\r");
+    //wait(30);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r fd16813614c5 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Dec 07 04:09:11 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/165afa46840b
\ No newline at end of file