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

📄 time.c

📁 microwindows移植到S3C44B0的源码
💻 C
字号:
/* * time.c  Timer functions for Atmel AT91 */#include <linux/time.h>#include <linux/timex.h>#include <linux/types.h>#include <linux/sched.h>#include <asm/io.h>#include <asm/arch/hardware.h>unsigned long atmel_gettimeoffset (void){	struct at91_timers* tt = (struct trio_timers*) (AT91_TC_BASE);	struct at91_timer_channel* tc = &tt->chans[KERNEL_TIMER].ch;	return tc->cv * (1000*1000)/(ARM_CLK/128);}void atmel_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs){	struct at91_timers* tt = (struct trio_timers*) (AT91_TC_BASE);	volatile struct  at91_timer_channel* tc = &tt->chans[KERNEL_TIMER].ch;	unsigned long v = tc->sr;        do_timer(regs);}

⌨️ 快捷键说明

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