2410usb.c

来自「广嵌GEC2410开发板学习教材源码」· C语言 代码 · 共 33 行

C
33
字号
#include "def.h"
#include "2410addr.h"
#include "2410lib.h"
#include "2410slib.h"
#include "mmu.h"
#include "uart.h"
#include "timer.h"
void UsbMain(void);
extern U32 downloadAddress, downloadFileSize;
U32	Console_Uart = 0;
U32	Console_Baud = 115200;
/******************************************************************************
【功能说明】系统主函数
******************************************************************************/
void Main()
{
	SetClockDivider(0, 1);
	SetSysFclk(FCLK_96M);		//to save power, use 48M
	
	Port_Init();
	Isr_Init();

	Uart_Init(0, Console_Baud);
	Uart_Select(Console_Uart);	
	EnableModuleClock(CLOCK_ALL);	
	rMISCCR &= ~(0x3007);		//USB port0,1 = normal, D0~D31 pull-up enable

    Uart_Printf("\nGEC2410 USB download file");
    UsbMain();
    while(1);
}

⌨️ 快捷键说明

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