Dodge/Chrysler Radio Emulator Connect to Interior CAN bus
Dependencies: mbed SDFileSystem
main.cpp@0:9bc41d70bdd3, 2011-01-31 (annotated)
- Committer:
- rtgree01
- Date:
- Mon Jan 31 05:13:04 2011 +0000
- Revision:
- 0:9bc41d70bdd3
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rtgree01 | 0:9bc41d70bdd3 | 1 | #include "mbed.h" |
rtgree01 | 0:9bc41d70bdd3 | 2 | #include "radioEmulator.h" |
rtgree01 | 0:9bc41d70bdd3 | 3 | #include "WatchDogTimer.h" |
rtgree01 | 0:9bc41d70bdd3 | 4 | |
rtgree01 | 0:9bc41d70bdd3 | 5 | RadioEmulator *radio; |
rtgree01 | 0:9bc41d70bdd3 | 6 | |
rtgree01 | 0:9bc41d70bdd3 | 7 | WatchDogTimer wdt; |
rtgree01 | 0:9bc41d70bdd3 | 8 | |
rtgree01 | 0:9bc41d70bdd3 | 9 | int main() |
rtgree01 | 0:9bc41d70bdd3 | 10 | { |
rtgree01 | 0:9bc41d70bdd3 | 11 | wdt.kick(2); |
rtgree01 | 0:9bc41d70bdd3 | 12 | radio = new RadioEmulator(); |
rtgree01 | 0:9bc41d70bdd3 | 13 | |
rtgree01 | 0:9bc41d70bdd3 | 14 | while (1) |
rtgree01 | 0:9bc41d70bdd3 | 15 | { |
rtgree01 | 0:9bc41d70bdd3 | 16 | radio->readCANbus(); |
rtgree01 | 0:9bc41d70bdd3 | 17 | radio->HostComm(); |
rtgree01 | 0:9bc41d70bdd3 | 18 | |
rtgree01 | 0:9bc41d70bdd3 | 19 | wdt.kick(); |
rtgree01 | 0:9bc41d70bdd3 | 20 | } |
rtgree01 | 0:9bc41d70bdd3 | 21 | } |