📄 time.c
字号:
/* * time.c Timer functions for Jasper */#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 jasper_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs){ // clear the interrupt char *timer_base = (char *)JASPER_TIMER_BASE; *(unsigned long *)(timer_base+TIMER_TMRSTAT) = TIMER0_INT_CLR; do_timer(regs);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -