Allan Wang / Mbed 2 deprecated speedregression

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 SPI spi(p11, p12, p13);
00004 DigitalOut latchpin(p10);
00005 
00006 int main() {
00007     spi.format(8, 0);
00008     spi.frequency(16 * 1000 * 1000);
00009     
00010     latchpin = 0;
00011     while (1) {
00012         latchpin = 1;
00013         spi.write(0);
00014         latchpin = 0;
00015     }
00016 }