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@0:e62fc62bc488, 2011-12-11 (annotated)
- Committer:
- Renegr
- Date:
- Sun Dec 11 22:04:59 2011 +0000
- Revision:
- 0:e62fc62bc488
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Renegr | 0:e62fc62bc488 | 1 | #include "mbed.h" |
| Renegr | 0:e62fc62bc488 | 2 | #include "FunctionPointers.h" |
| Renegr | 0:e62fc62bc488 | 3 | |
| Renegr | 0:e62fc62bc488 | 4 | DigitalOut myled(LED1); |
| Renegr | 0:e62fc62bc488 | 5 | FPtr1ArgT<void,int> fp; |
| Renegr | 0:e62fc62bc488 | 6 | |
| Renegr | 0:e62fc62bc488 | 7 | int main() { |
| Renegr | 0:e62fc62bc488 | 8 | fp.attach( myled, &DigitalOut::write); |
| Renegr | 0:e62fc62bc488 | 9 | while(1) { |
| Renegr | 0:e62fc62bc488 | 10 | fp(1); |
| Renegr | 0:e62fc62bc488 | 11 | wait(0.2); |
| Renegr | 0:e62fc62bc488 | 12 | fp(0); |
| Renegr | 0:e62fc62bc488 | 13 | wait(0.2); |
| Renegr | 0:e62fc62bc488 | 14 | } |
| Renegr | 0:e62fc62bc488 | 15 | } |