Uso del periférico SPI en modo Master.

Dependencies:   mbed

main.cpp

Committer:
CCastrop1012
Date:
2021-09-03
Revision:
0:54a0a19988e4

File content as of revision 0:54a0a19988e4:

#include "mbed.h"
 
SPI device(SPI_MOSI, SPI_MISO, SPI_SCK);
 
int main() {
    int i = 0;
    while(1) {
        device.write(0x55);
        device.write(i++);
        device.write(0xE0);
        wait_us(50);
    }
}