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

📄 time.h

📁 arm_uclinux_tools用于安装linux的编译器
💻 H
字号:
/* * time.h  * * Copyright (C) 2002 Arcturus Networks Inc.  * by Oleksandr Zhadan <oleks@arcturusnetworks.com> * */#ifndef __ASM_ARCH_TIME_H#define __ASM_ARCH_TIME_H#include <asm/uaccess.h>#include <asm/io.h>#include <asm/hardware.h>#include <asm/arch/timex.h>extern struct irqaction timer_irq;extern unsigned long s3c2510_gettimeoffset(void);extern void s3c2510_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs);extern __inline__ void setup_timer (void){    volatile struct s3c2510_timer* tt = (struct s3c2510_timer*) (TIMER_BASE);    unsigned long v, tmp;    gettimeoffset     = s3c2510_gettimeoffset;    timer_irq.handler = s3c2510_timer_interrupt;        /* I/O port is used for timer */    tmp = *(unsigned int *)IO_Ftn_cont1 | ((0x1 << KERNEL_TIMER) << 22);    *(unsigned int *)IO_Ftn_cont1 = tmp;    tt->td[2*KERNEL_TIMER] = (unsigned long)(ARM_CLK/HZ);    tmp = tt->tmr & ~(0x7 << (3*KERNEL_TIMER));    tt->tmr = tmp | (0x1 << (3*KERNEL_TIMER));/* choish modified forSMDK2510   timer0 32 --> 29*/	setup_arm_irq((KERNEL_TIMER+29), &timer_irq);    enable_irq ( (KERNEL_TIMER+29) );}#endif /* __ASM_ARCH_TIME_H */

⌨️ 快捷键说明

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