ts-7000
[Top] [All Lists]

[ts-7000] Re: PWM on DIO's in TS7400

To:
Subject: [ts-7000] Re: PWM on DIO's in TS7400
From: "tmoraes10" <>
Date: Thu, 17 Apr 2008 19:29:27 -0000
--- 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/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU