Cristian Castro
/
Nucleo_spi_master
Uso del periférico SPI en modo Master.
Revision 0:54a0a19988e4, committed 2021-09-03
- Comitter:
- CCastrop1012
- Date:
- Fri Sep 03 05:33:15 2021 +0000
- Commit message:
- Uso del periferico SPI en modo Master
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Sep 03 05:33:15 2021 +0000 @@ -0,0 +1,14 @@ +#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); + } +} + \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Sep 03 05:33:15 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file