--- In Jim Jackson <> wrote:
>
>
>
> >
> > Hi Friends,
> > The MAX197, adc kernel is setting timers by registers, i want to use
> > timer on my board but, i use the kernel timer.
> > I was thinking about using the Ticks as reference, but I do not know
> > as to make it. Somebody has a example code so that i can guide me?
>
>
> alarm(2)
>
> getitimer(2) setitimer(2)
>
> e.g. at
>
> http://www.quepublishing.com/articles/article.asp?p=23618&seqNum=14&rl=1
>
> remember accuracy depends on the HZ setting for the kernel, which
for the
> TS board is by default 100Hz.
>
Hi friends,
I can not use this function in my kernel, I have to use the functions
of kernel timer, I made a driver but he is not printing on the screen
after the time (jiffies + 5*HZ)five seconds.
#include <linux/timer.h>
void hello_print(unsigned long ptr ){
printk("Hello World!!\n");
}
static void TIMER(){
struct timer_list hello_timer;
init_timer(&hello_timer);
hello_timer.function = hello_print;
hello_timer.data = (unsigned long)NULL;
hello_timer.expires=jiffies + 5*HZ; //5 seconds
printk("Timer in action\n");
add_timer(&hello_timer);
del_timer_sync(&hello_timer);
}
When i use this function in my driver, this soluction isn't working.
Somebody could help me with this, because i need to use this function
in my PWM driver. I need one example with this function.
Thanks,
Regards Thiago...
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|