📄 option.h
字号:
// ************* OPTIONS **************
#ifndef __OPTION_H__
#define __OPTION_H__
#define MCLK_FREQ (30000000)
#define EXTCLK_FREQ (20000000)
#if (MCLK_FREQ==50000000)
#define PLL_M (0x5c)
#define PLL_P (0x12)
#define PLL_S (0x1)
#endif
#if (MCLK_FREQ==45000000)
#define PLL_M (0x52)
#define PLL_P (0x12)
#define PLL_S (0x1)
#endif
#if (MCLK_FREQ==40000000)
#define PLL_M (0x60)
#define PLL_P (0xb)
#define PLL_S (0x2)
#endif
#if (MCLK_FREQ==37000000)
#define PLL_M (0x42)
#define PLL_P (0x8)
#define PLL_S (0x2)
#endif
#if (MCLK_FREQ==35000000)
#define PLL_M (0x61)
#define PLL_P (0xd)
#define PLL_S (0x2)
#endif
#if (MCLK_FREQ==33000000)
#define PLL_M (0x3a)
#define PLL_P (0x8)
#define PLL_S (0x2)
#endif
#if (MCLK_FREQ==30000000)
#define PLL_M (0x5e)
#define PLL_P (0xf)
#define PLL_S (0x2)
#endif
#if (MCLK_FREQ==25000000)
#define PLL_M (0x5c)
#define PLL_P (0x12)
#define PLL_S (0x2)
#endif
#if (MCLK_FREQ==20000000)
#define PLL_M (0x60)
#define PLL_P (0xb)
#define PLL_S (0x3)
#endif
#if (MCLK_FREQ==15000000)
#define PLL_M (0x5e)
#define PLL_P (0xf)
#define PLL_S (0x3)
#endif
#if (MCLK_FREQ==10000000)
#define PLL_M (0x48)
#define PLL_P (0x12)
#define PLL_S (0x3)
#endif
//#define DELAY_START_VAL 1000 //for external ROM
#define DELAY_START_VAL 10000 //for internal ROM
#define TRUE (1)
#define FALSE (0)
#define INTERNAL_SRAM TRUE
#if (INTERNAL_SRAM)
//Internal 8KB SRAM
#define _RAM_STARTADDRESS 0x1ff0000
#define _ISR_STARTADDRESS 0x1ff1f80
#else
//External 256KB SRAM(CS1)
#define _RAM_STARTADDRESS 0x0800000
#define _ISR_STARTADDRESS 0x083ff80
#endif
// NOTE: rom.mak,option.a have to be changed
#endif /* OPTION.H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -