⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 arm s3c2410 的中断测试程序。经过验证
💻 C
字号:
#include <string.h>
#include <stdarg.h>
#include "usbmain.h"
#include "INT.h"
#include "consol.h"
#include "S3c2410x.h"
#include "2410lib.h"
#include "lcdlib.h"

volatile int isUsbdSetConfiguration;
void delay(int time);
void WIN_USB(void);

int main(void)
{

	ChangeClockDivider(1,1);            // 1:2:4
	ChangeMPllValue(0xa1,0x3,0x1);      // FCLK=202.8MHz
	Port_Init();
	__vInitHaltHandlers();
	CONSOL_Select(0);
	CONSOL_Init(115200);
	LCD_Init(); 
	WIN_USB();

	ISRVector[25] = IsrUsbd;
	UsbdMain();
	while(1);
}


void WIN_USB(void)
{
	WIN_WaterTek("USB实验");		
//	drawletter(70,200,"请重新用USB线连接上PC机",1,0,RGB(255,255,0));
//	drawletter(30,180,"在PC机上请观察是否有USB未知设备",1,0,RGB(255,255,0));
	drawletter((g_xMax-184)/2,g_yMax-40,"请重新用USB线连接上PC机",1,0,RGB(255,255,0));
	drawletter((g_xMax-200)/2,g_yMax-60,"在PC机上观察是否有USB设备",1,0,RGB(255,255,0));
}


void delay(int time)
{
	int i;
	for(; time >= 0; time--)
		for(i = 0; i < 255; i++);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -