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.
Dependencies: mbed
main.cpp@10:3ecbf164c0d3, 2019-05-06 (annotated)
- Committer:
- MYY
- Date:
- Mon May 06 13:33:13 2019 +0000
- Revision:
- 10:3ecbf164c0d3
- Parent:
- 9:03aa2479b941
- Child:
- 11:ef3d6696ae84
Finally reduce the size of the code.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| MYY | 7:8d63dc3948c1 | 1 | #include "Level.h" |
| MYY | 10:3ecbf164c0d3 | 2 | #include "Initialization.h" |
| MYY | 0:4ada39fe4ffc | 3 | |
| MYY | 9:03aa2479b941 | 4 | |
| MYY | 0:4ada39fe4ffc | 5 | |
| MYY | 0:4ada39fe4ffc | 6 | N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); |
| MYY | 0:4ada39fe4ffc | 7 | |
| MYY | 9:03aa2479b941 | 8 | Menu Menu; |
| MYY | 7:8d63dc3948c1 | 9 | Level Level; |
| MYY | 0:4ada39fe4ffc | 10 | Rotate Rotate; |
| MYY | 1:7a3eed610fea | 11 | Release Release; |
| MYY | 4:b52a0d2925df | 12 | Detect detect; |
| MYY | 6:7d0e05c39c22 | 13 | Draw Draw; |
| MYY | 9:03aa2479b941 | 14 | logistic logistic; |
| MYY | 9:03aa2479b941 | 15 | TNT TNT; |
| MYY | 10:3ecbf164c0d3 | 16 | Timer_cal Timer_cal; |
| MYY | 10:3ecbf164c0d3 | 17 | Image Image; |
| MYY | 10:3ecbf164c0d3 | 18 | Initialization Initialization; |
| MYY | 0:4ada39fe4ffc | 19 | InterruptIn A(PTB9); |
| MYY | 9:03aa2479b941 | 20 | InterruptIn START(PTC5); |
| MYY | 1:7a3eed610fea | 21 | InterruptIn B(PTD0); |
| MYY | 9:03aa2479b941 | 22 | InterruptIn Back(PTB19); |
| MYY | 9:03aa2479b941 | 23 | Gamepad Gamepad; |
| MYY | 0:4ada39fe4ffc | 24 | |
| MYY | 10:3ecbf164c0d3 | 25 | void init(); |
| MYY | 10:3ecbf164c0d3 | 26 | void init_value(); |
| MYY | 5:fe1f5b231446 | 27 | |
| MYY | 0:4ada39fe4ffc | 28 | int main() |
| MYY | 0:4ada39fe4ffc | 29 | { |
| MYY | 10:3ecbf164c0d3 | 30 | Initialization.init(lcd, A, B, Back, START, Gamepad); |
| MYY | 10:3ecbf164c0d3 | 31 | Initialization.init_value(Rotate, Level); |
| MYY | 9:03aa2479b941 | 32 | while(1) { |
| MYY | 9:03aa2479b941 | 33 | switch(level) { |
| MYY | 9:03aa2479b941 | 34 | case 1: |
| MYY | 10:3ecbf164c0d3 | 35 | Level.level_1(Menu, Image, lcd, Rotate, Release, detect, Draw, START, B, Back, A, TNT, Gamepad, logistic, Timer_cal, Level); |
| MYY | 9:03aa2479b941 | 36 | break; |
| MYY | 9:03aa2479b941 | 37 | |
| MYY | 9:03aa2479b941 | 38 | case 2: |
| MYY | 9:03aa2479b941 | 39 | Menu.TNT_m(lcd, A, B); |
| MYY | 10:3ecbf164c0d3 | 40 | Level.level_2(Image, lcd, Rotate, Release, detect, Draw, A, B, TNT, logistic, Timer_cal, Level); |
| MYY | 9:03aa2479b941 | 41 | break; |
| MYY | 10:3ecbf164c0d3 | 42 | |
| MYY | 9:03aa2479b941 | 43 | case 3: |
| MYY | 9:03aa2479b941 | 44 | Menu.TNT_m(lcd, A, B); |
| MYY | 10:3ecbf164c0d3 | 45 | Level.level_3(Image, lcd, Rotate, Release, detect, Draw, A, B, TNT, logistic, Timer_cal, Level); |
| MYY | 10:3ecbf164c0d3 | 46 | break; |
| MYY | 9:03aa2479b941 | 47 | } |
| MYY | 0:4ada39fe4ffc | 48 | } |
| MYY | 0:4ada39fe4ffc | 49 | } |
| MYY | 0:4ada39fe4ffc | 50 |