BOOTLOADER
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
bootloader
drivers
interrupt.c
Go to the documentation of this file.
1
/******************************************************
2
* Function: s3c2440 interrupt driver
3
*
4
* File: interrupt.c
5
* Author: Book Chen
6
* Date: 2008.07.18
7
*******************************************************
8
*/
9
#include "
includes.h
"
10
11
#define InterruptIdleState 0
12
13
INTERRUPT_CONTROL
InterruptCtrl
;
14
15
void
F_InterruptInit
(
void
);
16
void
F_InterruptSvc
(
void
);
17
void
F_InterruptIrqEnable
(
INT32U
Bit);
18
void
F_InterruptIrqDisable
(
INT32U
Bit);
19
void
F_InterruptSubIrqEnable
(
INT32U
Bit);
20
void
F_InterruptSubIrqDisable
(
INT32U
Bit);
21
22
void
F_InterruptInit
(
void
){
23
InterruptCtrl.
pIntRegister
=(
INTERRUPT_REGISTER
*)0x4a000000;
24
InterruptCtrl.
pIntRegister
->
SRCPND
=0x00000000;
25
InterruptCtrl.
pIntRegister
->
INTMOD
=0x00000000;
26
InterruptCtrl.
pIntRegister
->
INTMSK
=0xffffffff;
27
//InterruptCtrl.pIntRegister->PRIORITY=0x7f;
28
InterruptCtrl.
pIntRegister
->
PRIORITY
=0x00;
29
InterruptCtrl.
pIntRegister
->
INTPND
=0x00000000;
30
InterruptCtrl.
pIntRegister
->
INTOFFSET
=0x00000000;
31
InterruptCtrl.
pIntRegister
->
SUBSRCPND
=0x00000000;
32
InterruptCtrl.
pIntRegister
->
INTSUBMSK
=0x00007fff;
33
InterruptCtrl.
State
=
InterruptIdleState
;
34
}
35
void
F_InterruptSvc
(
void
){}
36
void
F_InterruptIrqEnable
(
INT32U
Bit){
37
InterruptCtrl.
pIntRegister
->
INTMSK
&=~(Bit);
38
}
39
void
F_InterruptIrqDisable
(
INT32U
Bit){
40
InterruptCtrl.
pIntRegister
->
INTMSK
|=Bit;
41
}
42
void
F_InterruptSubIrqEnable
(
INT32U
Bit){
43
InterruptCtrl.
pIntRegister
->
INTSUBMSK
&=~(Bit);
44
}
45
void
F_InterruptSubIrqDisable
(
INT32U
Bit){
46
InterruptCtrl.
pIntRegister
->
INTSUBMSK
|=Bit;
47
}
Generated on Wed Jun 13 2012 00:03:08 for BOOTLOADER by
1.8.1.1