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@2:39371bbdf5a6, 2011-10-21 (annotated)
- Committer:
- chris
- Date:
- Fri Oct 21 22:57:08 2011 +0000
- Revision:
- 2:39371bbdf5a6
- Parent:
- 1:2885d2e0189f
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| chris | 0:8ee2824fa192 | 1 | #include "mbed.h" |
| chris | 0:8ee2824fa192 | 2 | |
| chris | 0:8ee2824fa192 | 3 | DigitalOut led3(LED3); |
| chris | 0:8ee2824fa192 | 4 | InterruptIn din(p14); |
| chris | 0:8ee2824fa192 | 5 | |
| chris | 0:8ee2824fa192 | 6 | void int_handler () { |
| chris | 1:2885d2e0189f | 7 | led3 = !led3; |
| chris | 0:8ee2824fa192 | 8 | } |
| chris | 0:8ee2824fa192 | 9 | |
| chris | 0:8ee2824fa192 | 10 | int main () { |
| chris | 0:8ee2824fa192 | 11 | |
| chris | 0:8ee2824fa192 | 12 | din.rise(&int_handler); |
| chris | 0:8ee2824fa192 | 13 | |
| chris | 0:8ee2824fa192 | 14 | while (1) { |
| chris | 0:8ee2824fa192 | 15 | // do nothing |
| chris | 0:8ee2824fa192 | 16 | } |
| chris | 0:8ee2824fa192 | 17 | |
| chris | 0:8ee2824fa192 | 18 | } |