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
00001 #include "mbed.h" 00002 00003 Serial pc(USBTX, USBRX); 00004 SPI mst(p11, p12, p13); 00005 DigitalOut cs(p14); 00006 SPISlave slv(p5, p6, p7, p8); 00007 00008 int main() { 00009 mst.frequency(19200); 00010 mst.format(8,3); 00011 slv.frequency(19200); 00012 slv.format(8,3); 00013 pc.printf("start\r\n"); 00014 00015 cs = 0; 00016 for (int i=0; i<0xff; ++i) { 00017 mst.write(i); 00018 // if (slv.receive()) { // これが1にならない 00019 int v = slv.read(); 00020 pc.printf("%02x ",v); 00021 // } 00022 wait(0.1); 00023 } 00024 }
Generated on Sat Jul 16 2022 20:43:18 by
1.7.2