Subversion Repositories Code-Repo

Rev

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

Rev 235 Rev 237
Line 31... Line 31...
31
#define LED3_TRIS TRISGbits.TRISG14
31
#define LED3_TRIS TRISGbits.TRISG14
32
#define LED3_LAT LATGbits.LATG14
32
#define LED3_LAT LATGbits.LATG14
33
#define LED4_TRIS TRISGbits.TRISG15
33
#define LED4_TRIS TRISGbits.TRISG15
34
#define LED4_LAT LATGbits.LATG15
34
#define LED4_LAT LATGbits.LATG15
35
 
35
 
-
 
36
// Reset conditions
-
 
37
#define RESET_POR   0x01    // Power on reset
-
 
38
#define RESET_BOR   0x02    // Brown out reset
-
 
39
#define RESET_SWR   0x03    // Software reset
-
 
40
#define RESET_WDT   0x04    // Watchdog timer reset
-
 
41
#define RESET_PIN   0x05    // MCLR pin reset
-
 
42
#define RESET_CFG   0x06    // Config mismatch reset
-
 
43
 
-
 
44
// Board 'modes' (idle/games/etc)
-
 
45
#define BOARD_MODE_IDLE    0x01
-
 
46
#define BOARD_MODE_SNAKE   0x02
-
 
47
#define BOARD_MODE_TRON    0x03
-
 
48
 
-
 
49
typedef struct {
-
 
50
    uint8_t cube_mode;
-
 
51
} BOARD_STATE;
-
 
52
 
36
void Delay_MS(uint32_t delay_ms);
53
void Delay_MS(uint32_t delay_ms);
37
void Delay_US(uint32_t delay_us);
54
void Delay_US(uint32_t delay_us);
-
 
55
uint8_t Get_Reset_Condition(void);
-
 
56
void Reset_Board(void);
-
 
57
void Idle_Animation_Sequence(void);
38
 
58
 
39
#endif /* DEFINES_H */
59
#endif /* DEFINES_H */
40
60