You need to write a device driver, if you want to use interrupts.
I would suggest to buy the rubini book (Hope Alessandro
is going to give us some commission ;-))) ). Martin Kirsch adapted my
MCPMOD device driver. His driver should be a good base to start
programming a device driver. Have a look in the mailing list. I wrote
some lines about it about 3 weeks ago. Basically you need
to implement initialisation, open, close, write. Have a look
at the kernel tree. Don't be afraid of it. Do add your driver to the kernel
tree, you only need some "if then" statements.
Maybe you don't need an interrupt? Have a look at the SERVO CONTROL
discussion in the mailing list.
Am Sam, 21 Apr 2001 schrieben Sie:
> If that is so, the code the code from section 8 (Pulse-Width Modulator) of
> the MC68EZ328.pdf file included in the Datasheets directory of the uClinux
> CD is part of a device driver, am I right then??
> ----- Original Message -----
> From: "Tom Walsh" <firstname.lastname@example.org>
> To: <ucsimm@uClinux.com>
> Cc: <uclinux@uClinux.com>
> Sent: Friday, April 20, 2001 7:15 PM
> Subject: Re: [uCsimm] Interrupt Service Routines
> > > Gonzalo Vásquez Sáez wrote:
> > >
> > > Perhaps this is some kinda 'newbie' question, but that's just what I
> > > am...I haven't found the necesary code to asign some ISR function
> > > defined by me to attend a specified Interrupt Event (PWM in this
> > > case)....and I was wondering if someone withing this forum could be
> > > kind enough to help me.
> > >
> > What you are talking about is a device driver. It is not possible to
> > get to the interrupt vectors from a userland application (at least it
> > should not be allowed). I would suggest that you look into writing a
> > device driver for the application to use. A fine reference book on how
> > to write device drivers is from O'Reilly (http://www.oreilly.com) "Linux
> > Device Drivers" by Alessandro Rubini, the ISBN is: 1-56592-292-1.
> > Regards,
> > TomW
> > --
> > Tom Walsh - WN3L - Embedded Systems Consultant
> > 'www.openhardware.net', 'www.cyberiansoftware.com'
> > "Windows? No thanks, I have work to do..."
> > This message resent by the email@example.com list server
> This message resent by the firstname.lastname@example.org list server http://www.uClinux.com/
This message resent by the email@example.com list server http://www.uClinux.com/
This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:43 EST