Subversion Repositories Code-Repo

Rev

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

Rev 276 Rev 278
Line 176... Line 176...
176
//    SPI4_DATA spi_4_data;
176
//    SPI4_DATA spi_4_data;
177
//    SPI4_Init(&spi_4_data);
177
//    SPI4_Init(&spi_4_data);
178
 
178
 
179
    // Initialize the I2C1 module
179
    // Initialize the I2C1 module
180
    I2C1_DATA i2c_1_data;
180
    I2C1_DATA i2c_1_data;
181
    I2C1_Init(&i2c_1_data, I2C1_200KHZ, 0x20);
181
    I2C1_Init(&i2c_1_data, I2C1_400KHZ, 0x20);
182
 
182
 
183
//    // Initialize the UART1 module
183
//    // Initialize the UART1 module
184
//    UART1_DATA uart_data;
184
//    UART1_DATA uart_data;
185
//    UART1_Init(&uart_data, &Cube_Data_In);
185
//    UART1_Init(&uart_data, &Cube_Data_In);
186
 
186
 
Line 243... Line 243...
243
        case BOARD_MODE_TRON:
243
        case BOARD_MODE_TRON:
244
            // Change refresh rate to ~60Hz
244
            // Change refresh rate to ~60Hz
245
            TIMER5_Init(NULL, &Cube_Timer_Interrupt, 2000);
245
            TIMER5_Init(NULL, &Cube_Timer_Interrupt, 2000);
246
            TIMER5_Start();
246
            TIMER5_Start();
247
            // Poll the controllers at 1kHz
247
            // Poll the controllers at 1kHz
248
            Controller_Init(&ctrl_data, NULL);
248
            Controller_Init(NULL, &Tron_Update_Direction);
249
            TIMER4_Init(NULL, &Controller_Update, NULL, 0);
249
            TIMER4_Init(NULL, &Controller_Update, NULL, 0);
250
            // Initialize and start the game
250
            // Initialize and start the game
251
            Tron_Init(&tron_data);
251
            Tron_Init(&tron_data);
252
            TIMER4_Start();
-
 
253
            Tron_Main();
252
            Tron_Main();
254
            break;
253
            break;
255
        case BOARD_MODE_ETHERNET:
254
        case BOARD_MODE_ETHERNET:
256
            TIMER4_Stop();
255
            TIMER4_Stop();
257
            TIMER5_Start();
256
            TIMER5_Start();