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.
spi_slave.cpp
00001 #include "mbed.h" 00002 #include "spi_slave.h" 00003 00004 SPISlave slave(PC_1,PC_2,PB_10,PB_12); 00005 00006 void SLV_INIT(){ 00007 slave.format(8,0); 00008 slave.frequency(1000000); 00009 } 00010 00011 00012 void SLV_SEND(char msb_data, char mib_data, char lsb_data){ 00013 00014 if(slave.receive()){ 00015 slave.reply(msb_data); 00016 slave.reply(mib_data); 00017 slave.reply(lsb_data); 00018 } 00019 } 00020 00021
Generated on Thu Jul 14 2022 00:20:03 by
1.7.2