📄 2410lib.h
字号:
//===================================================================
// File Name : 2410lib.h
// Function : S3C2410
// Program : Shin, On Pil (SOP)
// Date : February 26, 2002
// Version : 0.0
// History
// 0.0 : Programming start (February 20,2002) -> SOP
//===================================================================
#ifndef __2410lib_h__
#define __2410lib_h__
#ifdef __cplusplus
extern "C" {
#endif
#define min(x1,x2) ((x1<x2)? x1:x2)
#define max(x1,x2) ((x1>x2)? x1:x2)
#define ONESEC0 (62500) //16us resolution, max 1.04 sec
#define ONESEC1 (31250) //32us resolution, max 2.09 sec
#define ONESEC2 (15625) //64us resolution, max 4.19 sec
#define ONESEC3 (7812) //128us resolution, max 8.38 sec
#define ONESEC4 (PCLK/128/(0xff+1)) //@60Mhz, 128*4us resolution, max 32.53 sec
#define EnterPWDN(clkcon) ((void (*)(int))0x20)(clkcon)
//Active is low.(LED On)
// GPF7 GPF4
//nLED_2 nLED_1
#define LED_RED_On rGPFDAT &=(~(1<<4))
#define LED_RED_Off rGPEDAT |= (1<<4)
#define LED_GREEN_On rGPEDAT &= (~(1<<7))
#define LED_GREEN_Off rGPEDAT |= (1<<7)
void Port_Init(void);
void Change_Mpll_Value(int m,int p,int s);
void Change_Clock_Divider(int hdivn,int pdivn);
void Delay(U32 time); //Watchdog Timer is used.
#ifdef __cplusplus
}
#endif
#endif //__2410lib_h__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -