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.
Error.cpp@0:d60c26d5fddc, 2016-09-14 (annotated)
- Committer:
- youle1119
- Date:
- Wed Sep 14 08:55:41 2016 +0000
- Revision:
- 0:d60c26d5fddc
tiz
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| youle1119 | 0:d60c26d5fddc | 1 | #include "Error.h" |
| youle1119 | 0:d60c26d5fddc | 2 | |
| youle1119 | 0:d60c26d5fddc | 3 | void raise_error(ErrorCode ec) |
| youle1119 | 0:d60c26d5fddc | 4 | { |
| youle1119 | 0:d60c26d5fddc | 5 | DigitalOut led(LED1); |
| youle1119 | 0:d60c26d5fddc | 6 | while(1) |
| youle1119 | 0:d60c26d5fddc | 7 | { |
| youle1119 | 0:d60c26d5fddc | 8 | for(int i=0; i<=ec; i++) |
| youle1119 | 0:d60c26d5fddc | 9 | { |
| youle1119 | 0:d60c26d5fddc | 10 | led=1; |
| youle1119 | 0:d60c26d5fddc | 11 | wait(0.3); |
| youle1119 | 0:d60c26d5fddc | 12 | led=0; |
| youle1119 | 0:d60c26d5fddc | 13 | wait(0.3); |
| youle1119 | 0:d60c26d5fddc | 14 | } |
| youle1119 | 0:d60c26d5fddc | 15 | wait(2); |
| youle1119 | 0:d60c26d5fddc | 16 | } |
| youle1119 | 0:d60c26d5fddc | 17 | } |