Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * File: FinalProject_main.c
- * Author: COSMOS
- *
- * Created on August 2, 2016, 10:59 AM
- */
- #include <stdio.h>
- #include <stdlib.h>
- #include "BOARD.h"
- #include "events.h"
- #include "roach.h"
- #include "timers.h"
- /*
- *
- */
- int main(int argc, char** argv) {
- BOARD_Init();
- Roach_Init();
- TIMERS_Init();
- event_t currentEvent = NO_EVENT;
- RunStateMachine(NO_EVENT);
- while (1) {
- //if an event happens run the state machine
- currentEvent = CheckForEvents();
- if (currentEvent != NO_EVENT)
- RunStateMachine(currentEvent);
- }
- return (EXIT_SUCCESS);
- }
Add Comment
Please, Sign In to add comment