47,6 → 47,7 |
#include "ANIMATIONS.h" |
#include "CONTROLLERS.h" |
#include "SNAKE.h" |
#include "TRON.h" |
|
void BTN1_Interrupt(void); |
void BTN2_Interrupt(void); |
179,9 → 180,10 |
|
// Initialize controllers |
CONTROLLER_DATA ctrl_data; |
Controller_Init(&ctrl_data, &Snake_Update_Direction); |
Controller_Init(&ctrl_data, NULL); |
|
SNAKE_DATA snake_data; |
TRON_DATA tron_data; |
|
// Determine what to do at this point. We either choose to idle (on POR) |
// or go into a mode specified prior to the software reset event |
205,12 → 207,15 |
/* ------------------------ BEGIN DISPLAY ------------------------ */ |
|
switch (op_state.cube_mode) { |
case BOARD_MODE_SNAKE: |
case BOARD_MODE_SNAKE:; |
Controller_Init(&ctrl_data, &Snake_Update_Direction); |
Snake_Init(&snake_data); |
Snake_Main(); |
break; |
case BOARD_MODE_TRON: |
while(1); |
Controller_Init(&ctrl_data, &Tron_Update_Direction); |
Tron_Init(&tron_data); |
Tron_Main(); |
break; |
case BOARD_MODE_IDLE: |
default: |