Dependencies:   mbed

Committer:
hugozijlmans
Date:
Thu Dec 02 12:32:18 2010 +0000
Revision:
1:2c52307d223f
Child:
2:f034e862af1f
Added RIT & Timer0 interrupt routines

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hugozijlmans 1:2c52307d223f 1 #ifndef __main_h
hugozijlmans 1:2c52307d223f 2 #define __main_h
hugozijlmans 1:2c52307d223f 3
hugozijlmans 1:2c52307d223f 4 // BSP defines
hugozijlmans 1:2c52307d223f 5 #define SYSCLK 96000000
hugozijlmans 1:2c52307d223f 6 #define EXTCLK 12000000
hugozijlmans 1:2c52307d223f 7 #define PLLCLK 288000000
hugozijlmans 1:2c52307d223f 8 #define PLLMULT (PLLCLK/2/EXTCLK)-1
hugozijlmans 1:2c52307d223f 9 #define TIMER0_FREQ 2
hugozijlmans 1:2c52307d223f 10 #define TIMER0_DIV (SYSCLK/TIMER0_FREQ)-1
hugozijlmans 1:2c52307d223f 11 #define RIT_FREQ 2
hugozijlmans 1:2c52307d223f 12 #define RIT_DIV (SYSCLK/RIT_FREQ)-1
hugozijlmans 1:2c52307d223f 13 #define LED_MASK 0x00B40000
hugozijlmans 1:2c52307d223f 14 #define LED1 0x00040000
hugozijlmans 1:2c52307d223f 15 #define LED2 0x00100000
hugozijlmans 1:2c52307d223f 16 #define LED3 0x00200000
hugozijlmans 1:2c52307d223f 17 #define LED4 0x00800000
hugozijlmans 1:2c52307d223f 18
hugozijlmans 1:2c52307d223f 19 typedef union
hugozijlmans 1:2c52307d223f 20 {
hugozijlmans 1:2c52307d223f 21 struct
hugozijlmans 1:2c52307d223f 22 {
hugozijlmans 1:2c52307d223f 23 unsigned Timer0_int:1;
hugozijlmans 1:2c52307d223f 24 unsigned RIT_int:1;
hugozijlmans 1:2c52307d223f 25 };
hugozijlmans 1:2c52307d223f 26 unsigned char All_Flags;
hugozijlmans 1:2c52307d223f 27 } Tinterrupt_flags;
hugozijlmans 1:2c52307d223f 28
hugozijlmans 1:2c52307d223f 29 extern Tinterrupt_flags i_flags;
hugozijlmans 1:2c52307d223f 30
hugozijlmans 1:2c52307d223f 31 #endif