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 Keyboard_Interrupt by
Diff: main.cpp
- Revision:
- 0:14317ed79bae
- Child:
- 1:5440b3d7f435
diff -r 000000000000 -r 14317ed79bae main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jun 02 02:57:51 2015 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" + +DigitalOut myled(LED1); +Serial pc(SERIAL_TX, SERIAL_RX); + +void my_Interrupt(){ + char key; + key = pc.getc(); + pc.printf("Interrupted %c\r\n", key); +} + +int main() { + pc.attach(my_Interrupt, Serial::RxIrq); + while(1){} +}