Subversion Repositories Code-Repo

Rev

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

Rev 240 Rev 255
Line 6... Line 6...
6
#include <xc.h>
6
#include <xc.h>
7
#include <plib.h>
7
#include <plib.h>
8
#include <stdint.h>
8
#include <stdint.h>
9
 
9
 
10
// Uncomment ONE of the following:
10
// Uncomment ONE of the following:
11
//#define CEREBOT_32MX7
11
#define CEREBOT_32MX7
12
 #define CEREBOT_MX7CK
12
// #define CEREBOT_MX7CK
13
 
13
 
14
// Power supply must be 5V for proper operation of the board!
14
// Power supply must be 5V for proper operation of the board!
15
 
15
 
16
#define CPU_CLOCK_HZ    80000000UL
16
#define CPU_CLOCK_HZ    80000000UL
17
#define PERIPHERAL_CLOCK_HZ 80000000UL
17
#define PERIPHERAL_CLOCK_HZ 80000000UL
Line 40... Line 40...
40
#define RESET_WDT   0x04    // Watchdog timer reset
40
#define RESET_WDT   0x04    // Watchdog timer reset
41
#define RESET_PIN   0x05    // MCLR pin reset
41
#define RESET_PIN   0x05    // MCLR pin reset
42
#define RESET_CFG   0x06    // Config mismatch reset
42
#define RESET_CFG   0x06    // Config mismatch reset
43
 
43
 
44
// Board 'modes' (idle/games/etc)
44
// Board 'modes' (idle/games/etc)
45
#define BOARD_MODE_IDLE    0x01
45
#define BOARD_MODE_IDLE     0x01
46
#define BOARD_MODE_SNAKE   0x02
46
#define BOARD_MODE_SNAKE    0x02
47
#define BOARD_MODE_TRON    0x03
47
#define BOARD_MODE_TRON     0x03
-
 
48
#define BOARD_MODE_ETHERNET 0x04
48
 
49
 
49
typedef struct {
50
typedef struct {
50
    uint8_t cube_mode;
51
    uint8_t cube_mode;
51
} BOARD_STATE;
52
} BOARD_STATE;
52
 
53