?? target.c
字號(hào):
//====================================================================
// File Name : 2410test.c
// Function : S3C2410 Test Main Menu
// Program :
// Date : May 30, 2002
// Version : 0.0
// History
// 0.0 : Programming start (February 20,2002) -> SOP
// 1.0 (20020530) : First release for customer
// 1.1 (20020801) : Strata NOR Flash Added and etc. -> SOP
//====================================================================
#include <stdlib.h>
#include <string.h>
#include "..\..\Application\inc\config.h"
/*
*************************************************************************************************************
-
- 程序段說(shuō)明 : 以下函數(shù)為各異常模式服務(wù)子程序。設(shè)成死循環(huán)是為調(diào)試用,一旦發(fā)生此類(lèi)異常,程序便跳入異常模式服務(wù)
- 子程序,終止程序運(yùn)行。
-
*************************************************************************************************************
*/
void HaltUndef(void)
{
Uart_Printf("Undefined instruction exception.\n");
while(1);
}
void HaltSwi(void)
{
Uart_Printf("SWI exception.\n");
while(1);
}
void HaltPabort(void)
{
Uart_Printf("Pabort exception.\n");
while(1);
}
void HaltDabort(void)
{
Uart_Printf("Dabort exception.\n");
while(1);
}
/*
*************************************************************************************************************
-
- 程序段說(shuō)明 : 以下函數(shù)均為初始化函數(shù)
-
*************************************************************************************************************
*/
/*
*************************************************************************************************************
- 函數(shù)名稱(chēng) : Exep_S3cint_Init(void)
- 函數(shù)說(shuō)明 : 異常及中斷控制器的初始化
- 輸入?yún)?shù) : 無(wú)
- 輸出參數(shù) : 無(wú)
*************************************************************************************************************
*/
void Isr_Init(void)
{
pISR_UNDEF = (unsigned)HaltUndef;
pISR_SWI = (unsigned)HaltSwi;
pISR_PABORT = (unsigned)HaltPabort;
pISR_DABORT = (unsigned)HaltDabort;
rINTMOD = 0x0; //All=IRQ mode
rINTMSK = BIT_ALLMSK; //All interrupt is masked.
rINTSUBMSK = BIT_SUB_ALLMSK; //All sub-interrupt is masked. <- April 01, 2002 SOP
}
/*
*************************************************************************************************************
- 函數(shù)名稱(chēng) : TargetInit(void)
- 函數(shù)說(shuō)明 : 目標(biāo)板初始化程序,主函數(shù)中只需調(diào)用此函數(shù),即可完成目標(biāo)板的初始化
- 輸入?yún)?shù) : 無(wú)
- 輸出參數(shù) : 無(wú)
*************************************************************************************************************
*/
void Target_Init(void)
{
MMU_Init();
ChangeClockDivider(1,1); // 1:2:4
ChangeMPllValue(0xa1,0x3,0x1); // FCLK=202.8MHz
Port_Init();
Isr_Init();
Uart_Init(0,115200);
Uart_Select(0);
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -