BOOTLOADER
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
2440lib.h
Go to the documentation of this file.
1 //===================================================================
2 // File Name : 2440lib.h
3 // Function : S3C2440
4 // Date : February 26, 2002
5 // Version : 0.0
6 // History
7 // 0.0 :Feb.20.2002:SOP : Programming start
8 // 0.01:Mar.29.2002:purnnamu: For POWEROFF_wake_up, the START... label is added
9 //===================================================================
10 
11 #ifndef __2440lib_h__
12 #define __2440lib_h__
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #define min(x1,x2) (((x1)<(x2))? (x1):(x2))
19 #define max(x1,x2) (((x1)>(x2))? (x1):(x2))
20 
21 #define ONESEC0 (62500) //16us resolution, max 1.04 sec
22 #define ONESEC1 (31250) //32us resolution, max 2.09 sec
23 #define ONESEC2 (15625) //64us resolution, max 4.19 sec
24 #define ONESEC3 (7812) //128us resolution, max 8.38 sec
25 #define ONESEC4 (PCLK/128/(0xff+1)) //@60Mhz, 128*4us resolution, max 32.53 sec
26 
27 #define NULL 0
28 
29 #define EnterPWDN(clkcon) ((void (*)(int))0x20)(clkcon)
30 void StartPointAfterPowerOffWakeUp(void); //purnnamu:Mar.29.2002
31 
32 // 2440lib.c
33 void Delay(int time); //Watchdog Timer is used.
34 
35 void *malloc(unsigned nbyte);
36 void free(void *pt);
37 
38 void Timer_Start(int divider); //Watchdog Timer is used.
39 int Timer_Stop(void); //Watchdog Timer is used.
40 
41 void Led_Display(int data);
42 
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif //__2440lib_h__