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.
Fork of RawSerial_ex_2 by
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut led1(LED1); 00004 DigitalOut led2(LED2); 00005 00006 Serial pc(USBTX, USBRX); 00007 00008 void callback_ex() { 00009 // Note: you need to actually read from the serial to clear the RX interrupt 00010 pc.putc(pc.getc()); 00011 led2 = !led2; 00012 } 00013 00014 int main() { 00015 pc.attach(&callback_ex); 00016 00017 while (1) { 00018 led1 = !led1; 00019 wait(0.5); 00020 } 00021 }
Generated on Sat Jul 30 2022 09:04:49 by
1.7.2
