![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
LALALALA
main.cpp
- Committer:
- AndyTran
- Date:
- 2015-12-07
- Revision:
- 0:fd16813614c5
File content as of revision 0:fd16813614c5:
#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); } }