📄 display.c
字号:
#include "C240.h"
ioport unsigned port0,port1,port2,port3,port4,port5;
void dsp_setup()
{
unsigned int temp;
/*********************************************/
/* Disable watchdog timer */
/*********************************************/
temp = WDCR;
temp = temp|0x68;
WDCR = temp;
/*********************************************/
/* initialize PLL module (20 MHz XTAL1) */
/*********************************************/
CKCR1 = 0x61; /* crystal=20MHz CPUCLK = 40MHz */
/* and 2x PLL mult ratio */
CKCR0 = 0xc3; /* low–power mode 0, */
/* ACLK enabled, */
/* PLL enabled, */
/* SYSCLK=CPUCLK/2 */
SYSCR = 0x40c0;
}
main()
{
dsp_setup();
for(;;)
{
port2=0x00;
port3=0x03;
port4=0x04;
port5=0x6;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -