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

📄 timer.c

📁 Boot code for ADM5120 with serial console for Edimax router.
💻 C
字号:
/*****************************************************************************;;    Project : ADM5120;    Creator : Dan Everett;    File    : timer.c;    Abstract: ;;*****************************************************************************/#include <ctype.h>#include <mips4kc.h>#include <adm5120.h>static UINT32 timeticks = 0;/********************//* InitTimer:		*//********************/void InitTimer(void){	ADM5120_SW_REG(Timer_int_REG) = SW_TIMER_INT_DISABLE;	ADM5120_SW_REG(Timer_REG) = SW_TIMER_10MS_TICKS;	ADM5120_SW_REG(Timer_int_REG) = SW_TIMER_INT_DISABLE | SW_TIMER_INT;	ADM5120_SW_REG(Timer_REG) = SW_TIMER_10MS_TICKS | SW_TIMER_EN;	timeticks = 1;}/********************//* UpTime:			*//********************/UINT32 UpTime(void){	unsigned long status;	status = ADM5120_SW_REG(Timer_int_REG);	if (status & SW_TIMER_INT) {		/* Acknowledge the timer interrupt */		ADM5120_SW_REG(Timer_int_REG) = status;		timeticks++;	}	return timeticks;}void DisableTimer(void){	/* Entire function body was already commented out - DE */	/*buart_print("\n\rTimer irqdisable..");	irqDisconnect(INT_LVL_TIMER);	IrqDisable(INT_LVL_TIMER);*/	/* return 0; */}

⌨️ 快捷键说明

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