Dependencies:   mbed

Committer:
hugozijlmans
Date:
Thu Dec 02 20:55:45 2010 +0000
Revision:
2:f034e862af1f
Parent:
1:2c52307d223f
Added UART0 support over USB mBed1768

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 2:f034e862af1f 11 #define RIT_FREQ 10
hugozijlmans 1:2c52307d223f 12 #define RIT_DIV (SYSCLK/RIT_FREQ)-1
hugozijlmans 2:f034e862af1f 13 #define MCPWM_FREQ 48000
hugozijlmans 2:f034e862af1f 14 #define MCPWM_DIV (SYSCLK/MCPWM_FREQ)-1
hugozijlmans 1:2c52307d223f 15 #define LED_MASK 0x00B40000
hugozijlmans 1:2c52307d223f 16 #define LED1 0x00040000
hugozijlmans 1:2c52307d223f 17 #define LED2 0x00100000
hugozijlmans 1:2c52307d223f 18 #define LED3 0x00200000
hugozijlmans 1:2c52307d223f 19 #define LED4 0x00800000
hugozijlmans 1:2c52307d223f 20
hugozijlmans 1:2c52307d223f 21 typedef union
hugozijlmans 1:2c52307d223f 22 {
hugozijlmans 1:2c52307d223f 23 struct
hugozijlmans 1:2c52307d223f 24 {
hugozijlmans 1:2c52307d223f 25 unsigned Timer0_int:1;
hugozijlmans 1:2c52307d223f 26 unsigned RIT_int:1;
hugozijlmans 2:f034e862af1f 27 unsigned UART0_tx_idle:1;
hugozijlmans 2:f034e862af1f 28 unsigned UART0_rx_idle:1;
hugozijlmans 1:2c52307d223f 29 };
hugozijlmans 1:2c52307d223f 30 unsigned char All_Flags;
hugozijlmans 1:2c52307d223f 31 } Tinterrupt_flags;
hugozijlmans 1:2c52307d223f 32
hugozijlmans 1:2c52307d223f 33 extern Tinterrupt_flags i_flags;
hugozijlmans 1:2c52307d223f 34
hugozijlmans 1:2c52307d223f 35 #endif