aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/tool/mbed/mbed-sdk/libraries/tests/mbed/spi/main.cpp
blob: ce571cf1d9b10a60618e1d2879c08118cd329312 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "mbed.h"

SPI spi(p11, p12, p13);
DigitalOut latchpin(p10);

int main() {
    spi.format(8, 0);
    spi.frequency(16 * 1000 * 1000);

    latchpin = 0;
    while (1) {
        latchpin = 1;
        spi.write(0);
        latchpin = 0;
    }
}