Sille Van Landschoot
/
racing_robots
Racing Robots Session
Fork of racing_robots by
Diff: racing_robots.cpp
- Revision:
- 1:43c91152e9ce
- Parent:
- 0:c0ae66a0ec7a
- Child:
- 4:3743cbfe031b
--- a/racing_robots.cpp Mon Feb 23 12:24:31 2015 +0000 +++ b/racing_robots.cpp Mon Feb 23 12:48:22 2015 +0000 @@ -1,27 +1,28 @@ #include "racing_robots.h" -DigitalOut myled(LED1); - +// External functions called from our library +extern void init(void); extern void loop(void); -extern void init(void); - +/* + * System initialization. + * Also calls external init() function. + */ void _init(void) { // DO our init here init(); // Students init } -void racing_robots(void) { +/* + * Entry point. + * Also calls external loop function. + */ +int main (void) { // Initialize system _init(); while (true) { loop(); // Students loop } -} - - -int main (void) { - racing_robots(); } \ No newline at end of file