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 /* This demo code is intended to test SPI slave 00002 * functionality on STM32 DISCO-L072CZ-LRWAN1 00003 */ 00004 00005 #include "mbed.h" 00006 00007 #define SLAVE_MOSI (PB_15) 00008 #define SLAVE_MISO (PB_14) 00009 #define SLAVE_SCLK (PB_13) 00010 #define SLAVE_SSEL (PB_12) 00011 00012 00013 SPISlave spi_slave(SLAVE_MOSI, 00014 SLAVE_MISO, 00015 SLAVE_SCLK, 00016 SLAVE_SSEL); 00017 00018 int main() 00019 { 00020 spi_slave.reply(0); 00021 00022 for(;;) { 00023 if(spi_slave.receive()) { 00024 spi_slave.reply(spi_slave.read()); 00025 } 00026 } 00027 }
Generated on Sun Jul 24 2022 12:42:34 by
1.7.2