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@1:5440b3d7f435, 2015-06-02 (annotated)
- Committer:
- TakamiMa
- Date:
- Tue Jun 02 03:00:32 2015 +0000
- Revision:
- 1:5440b3d7f435
- Parent:
- 0:14317ed79bae
Update
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TakamiMa | 0:14317ed79bae | 1 | #include "mbed.h" |
| TakamiMa | 0:14317ed79bae | 2 | |
| TakamiMa | 0:14317ed79bae | 3 | Serial pc(SERIAL_TX, SERIAL_RX); |
| TakamiMa | 0:14317ed79bae | 4 | |
| TakamiMa | 0:14317ed79bae | 5 | void my_Interrupt(){ |
| TakamiMa | 0:14317ed79bae | 6 | char key; |
| TakamiMa | 0:14317ed79bae | 7 | key = pc.getc(); |
| TakamiMa | 0:14317ed79bae | 8 | pc.printf("Interrupted %c\r\n", key); |
| TakamiMa | 0:14317ed79bae | 9 | } |
| TakamiMa | 0:14317ed79bae | 10 | |
| TakamiMa | 0:14317ed79bae | 11 | int main() { |
| TakamiMa | 0:14317ed79bae | 12 | pc.attach(my_Interrupt, Serial::RxIrq); |
| TakamiMa | 0:14317ed79bae | 13 | while(1){} |
| TakamiMa | 0:14317ed79bae | 14 | } |