📄 sysinit.c
字号:
/******************************************************************************
C H E A D E R F I L E
ALL RIGHTS RESERVED
*******************************************************************************
Project Name : BONO System Test Program
Project No. :
Title :
File Name : SysInit.c
Last Modified: 12/27/2005
(MM/DD/YYYY)
Description : Prototype definition header for BONO silicon system test program.
Assumptions :
Dependency Comments :
Project Specific Data :
History (MM/DD/YYYY) :
12/27/2005 - Initial Proposal
******************************************************************************/
#define SYS_DEFINE_GLOBALS
#include <stdio.h>
#include "common.h"
#include "bono_memory_map_defines.h"
#include "prototype.h"
extern void SetIntType(uint32_t IntNum, uint8_t type);
extern void SetAsynchMode(void);
/////////////////////////////////////////////////
// //
// Call by user program for interupt enable //
// //
/////////////////////////////////////////////////
void IrptInit(void)
{
uint32_t i;
//*(p_uint32_t)AITC_INTCNTL &= 0x00;
/* To set all interrupt source to normal interrupt source */
for (i=0; i<=63; i++)
{
SetIntType(i, 0);
}
/* Enable all int sources */
/* for (i=0; i<=31; i++)
{
EnableIntSource(i);
}
*/
}
void MemInit(void)
{
}
void LCDCInit(void)
{
}
void Enable_MMU (void)
{
__asm {
mrc p15,0,r0,c1,c0,0
mov r2, #0x00000001
orr r0,r2,r0
mcr p15,0,r0,c1,c0,0
}
printf("MMU enabled\n");
}
void Disable_MMU (void)
{
__asm {
mrc p15,0,r0,c1,c0,0
mov r2, #0xFFFFFFFE
and r0,r2,r0
mcr p15,0,r0,c1,c0,0
}
printf("MMU disabled\n");
}
void SysInit(void)
{
ARM_MMU_Init(ARM_MMUTableSetUp()); // MMU Table Initialization
Enable_MMU();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -