From: dnozner\@libero\.it <dn...@li...> - 2005-04-12 00:23:24
|
Since i am a newbie, i lost myself into the kernel tree without being abl= e to find a suitable example on how to use interrupts. Any hint will b= e appreciated. In particular is not clear to me how can i associate my i= nterrupt handler routine with the OSMR interrupt. Regards Renzo=0D = On Monday 11 April 2005 19:29, Craig Hughes wrote: > OSMR1 and 2 are n= ot used -- and you also have OSMR3 available if you > don't enable the w= atchdog you can just use it as another timer. As for > sample code, I t= hink the timers will just generate a regular old > interrupt, so you can= look at any of the drivers which do interrupt > processing on the 'stix= and mroe or less copy that. > > C > > On Apr 10, 2005, at 4:07 AM, d= no...@li... wrote: > > The registers OSMR0 and OSMR3 are respective= ly used for the system > > time and for > > the watchdog timer, but wha= t about OSMR2 and OSMR1? > > Are they used on the gumstix? > > Any exam= ple of a device driver that use the interrupts generated by the > > time= rs,will also be very helpful. > > -------------------------------------= ------------------ > SF email is sponsored by - The IT Product Guide > = Read honest & candid reviews on hundreds of IT Products from real users.=0D = > Discover which products truly live up to the hype. Start reading now.=0D = > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick > ______= _________________________________________ > gumstix-users mailing list=0D = > gum...@li... > https://lists.sourceforge.net/li= sts/listinfo/gumstix-users=0A=0A=0A=0A___________________________________= _________________________=0ANavighi a 4 MEGA e i primi 3 mesi sono GRATIS= . =0AScegli Libero Adsl Flat senza limiti su http://www.libero.it=0A |
From: Dave H. <dhy...@gm...> - 2005-04-12 01:43:19
|
Hi Renzo, > Since i am a newbie, i lost myself into the kernel tree without being able to > find a suitable example on how to use interrupts. > Any hint will be appreciated. > In particular is not clear to me how can i associate my interrupt handler > routine with the OSMR interrupt. The OSMR0 interrupt handler can be found here: gumstix-buildroot/build_arm/linux-2.6.11gum/arch/arm/mach-pxa/time.c Most of the machine specific stuff will be found in this directory and in gumstix-buildroot/build_arm/linux-2.6.11gum/include/asm/arch-pxa/ Also, if you're interested in background material and whatnot on writing linux device drivers, then I'd recommend looking at the LInux Device Drivers - 3rd edition book. It's available online here: http://lwn.net/Kernel/LDD3/ The sample code that goes along with the book can be found over here: http://examples.oreilly.com/linuxdrive3/ I also have a copy where I merged all of the PDF chapters together and cropped out the printers marks around the edges (it's 7.7 Mb). -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |