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@3:def8a92db030, 2015-06-24 (annotated)
- Committer:
- overkiller
- Date:
- Wed Jun 24 09:26:07 2015 +0000
- Revision:
- 3:def8a92db030
- Parent:
- 2:09cc6b203fe4
- Child:
- 4:cc391b3f3e57
Serial prompt stub
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| overkiller | 0:5cf38d7bbdd5 | 1 | #include "mbed.h" |
| overkiller | 1:90d75436758b | 2 | #include "include/EngineDriver.h" |
| overkiller | 3:def8a92db030 | 3 | #include "include/SerialPrompt.h" |
| overkiller | 2:09cc6b203fe4 | 4 | Serial pc(SERIAL_TX, SERIAL_RX); |
| overkiller | 2:09cc6b203fe4 | 5 | int initDrivingUnit(int testLoops) |
| overkiller | 2:09cc6b203fe4 | 6 | { |
| overkiller | 2:09cc6b203fe4 | 7 | pc.printf("Testing engines...\n\r"); |
| overkiller | 2:09cc6b203fe4 | 8 | enableAll(); |
| overkiller | 2:09cc6b203fe4 | 9 | int i = 0; |
| overkiller | 2:09cc6b203fe4 | 10 | while(i < testLoops) |
| overkiller | 2:09cc6b203fe4 | 11 | { |
| overkiller | 2:09cc6b203fe4 | 12 | testEngines(); |
| overkiller | 2:09cc6b203fe4 | 13 | applyStates(); |
| overkiller | 2:09cc6b203fe4 | 14 | i++; |
| overkiller | 2:09cc6b203fe4 | 15 | } |
| overkiller | 2:09cc6b203fe4 | 16 | resetEngines(); |
| overkiller | 2:09cc6b203fe4 | 17 | return 0; |
| overkiller | 2:09cc6b203fe4 | 18 | } |
| overkiller | 1:90d75436758b | 19 | int main() |
| overkiller | 1:90d75436758b | 20 | { |
| overkiller | 3:def8a92db030 | 21 | if(initDrivingUnit(1) == 0) |
| overkiller | 2:09cc6b203fe4 | 22 | { |
| overkiller | 3:def8a92db030 | 23 | pc.printf("Ready to accept commands.\n\r"); |
| overkiller | 3:def8a92db030 | 24 | displayPrompt(&pc); |
| overkiller | 2:09cc6b203fe4 | 25 | } |
| overkiller | 1:90d75436758b | 26 | while (true) |
| overkiller | 1:90d75436758b | 27 | { |
| overkiller | 0:5cf38d7bbdd5 | 28 | } |
| overkiller | 0:5cf38d7bbdd5 | 29 | } |