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:e3540e9cd7cb, 2017-01-02 (annotated)
- Committer:
- shaoziyang
- Date:
- Mon Jan 02 15:53:50 2017 +0000
- Revision:
- 0:e3540e9cd7cb
Add PORTG support
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| shaoziyang | 0:e3540e9cd7cb | 1 | #include "mbed.h" |
| shaoziyang | 0:e3540e9cd7cb | 2 | |
| shaoziyang | 0:e3540e9cd7cb | 3 | DigitalOut LED(PG_12); |
| shaoziyang | 0:e3540e9cd7cb | 4 | |
| shaoziyang | 0:e3540e9cd7cb | 5 | |
| shaoziyang | 0:e3540e9cd7cb | 6 | int main() |
| shaoziyang | 0:e3540e9cd7cb | 7 | { |
| shaoziyang | 0:e3540e9cd7cb | 8 | |
| shaoziyang | 0:e3540e9cd7cb | 9 | while(1) |
| shaoziyang | 0:e3540e9cd7cb | 10 | { |
| shaoziyang | 0:e3540e9cd7cb | 11 | LED = 0; |
| shaoziyang | 0:e3540e9cd7cb | 12 | wait(1); |
| shaoziyang | 0:e3540e9cd7cb | 13 | LED = 1; |
| shaoziyang | 0:e3540e9cd7cb | 14 | wait(1); |
| shaoziyang | 0:e3540e9cd7cb | 15 | } |
| shaoziyang | 0:e3540e9cd7cb | 16 | } |