Subversion Repositories Code-Repo

Rev

Rev 242 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 242 Rev 255
Line 38... Line 38...
38
#include "defines.h"
38
#include "defines.h"
39
#include "UART1.h"
39
#include "UART1.h"
40
#include "SPI1.h"
40
#include "SPI1.h"
41
#include "SPI4.h"
41
#include "SPI4.h"
42
#include "I2C1.h"
42
#include "I2C1.h"
-
 
43
#include "ETHERNET.h"
43
#include "TIMER4.h"
44
#include "TIMER4.h"
44
#include "TIMER5.h"
45
#include "TIMER5.h"
45
#include "CUBE.h"
46
#include "CUBE.h"
46
#include "BTN.h"
47
#include "BTN.h"
47
#include "ANIMATIONS.h"
48
#include "ANIMATIONS.h"
Line 140... Line 141...
140
    LED1_LAT = 0;
141
    LED1_LAT = 0;
141
    LED2_LAT = 0;
142
    LED2_LAT = 0;
142
    LED3_LAT = 0;
143
    LED3_LAT = 0;
143
    LED4_LAT = 0;
144
    LED4_LAT = 0;
144
 
145
 
-
 
146
    // Initialize the Ethernet module
-
 
147
    ETH_DATA eth_data;
-
 
148
    ETH_Init(&eth_data, NULL, &Cube_Ethernet_Frame_In);
-
 
149
 
145
    // Initialize the SPI1 module
150
    // Initialize the SPI1 module
146
    SPI1_DATA spi_1_data;
151
    SPI1_DATA spi_1_data;
147
    SPI1_Init(&spi_1_data, NULL);
152
    SPI1_Init(&spi_1_data, NULL);
148
 
153
 
149
    // Initialize the SPI4 module
154
    // Initialize the SPI4 module
Line 210... Line 215...
210
        case BOARD_MODE_TRON:
215
        case BOARD_MODE_TRON:
211
            Controller_Init(&ctrl_data, &Tron_Update_Direction);
216
            Controller_Init(&ctrl_data, &Tron_Update_Direction);
212
            Tron_Init(&tron_data);
217
            Tron_Init(&tron_data);
213
            Tron_Main();
218
            Tron_Main();
214
            break;
219
            break;
-
 
220
        case BOARD_MODE_ETHERNET:
-
 
221
            while(1);
-
 
222
            break;
215
        case BOARD_MODE_IDLE:
223
        case BOARD_MODE_IDLE:
216
        default:
224
        default:
217
            Idle_Animation_Sequence();
225
            Idle_Animation_Sequence();
218
            break;
226
            break;
219
    }
227
    }
Line 243... Line 251...
243
 
251
 
244
//    int8_t start_text[] = "Cube Initialized\r\n";
252
//    int8_t start_text[] = "Cube Initialized\r\n";
245
//    UART1_Write(start_text, 18);
253
//    UART1_Write(start_text, 18);
246
 
254
 
247
    // Set the overlay text
255
    // Set the overlay text
248
    uint8_t text_string[] = "Welcome to the AMP Lab     ";
256
    uint8_t text_string[] = "Welcome to the CCM Lab     ";
249
    Cube_Text_Init(text_string, 27, 0xFF, 0xFF, 0xFF);
257
    Cube_Text_Init(text_string, 27, 0xFF, 0xFF, 0xFF);
250
 
258
 
251
    // Loop through some preset animations
259
    // Loop through some preset animations
252
    while(1) {
260
    while(1) {
253
//        Animation_Solid_Colors(300);
261
//        Animation_Solid_Colors(300);