This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: why not interrupt?
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: li hui <lhbyron at yahoo dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Wed, 28 Nov 2001 09:18:28 +0100
- Subject: Re: [ECOS] why not interrupt?
- References: <20011128012151.45363.qmail@web14703.mail.yahoo.com>
A tip about open source mailing lists. If no one replys to the first
message it unlikly repeatint it time and time again will get a reply.
Why not just use the serial device driver? Thats all a mouse is, a
serial device on wheels!
Andrew
On Tue, Nov 27, 2001 at 05:21:51PM -0800, li hui wrote:
> I try to write a mouse driver for ecos(i386).I meet a
> problem, I can't make my interrupt routine response
> the interrupt.my code is bleow,please give me some
> advice.
>
> #define MOUSE_BASE 0x300
> #define MOUSE_IRQ CYGNUM_HAL_INTERRUPT_COM2 //35
> static cyg_uint32 isr(cyg_vector_t
> vector,cyg_addrword_t data)
> {
> return 1;
> }
>
> static int mouse_lookup()
> {
> ............
> cyg_drv_interrupt_create ( MOUSE_IRQ, 99, 0, isr,
> mouse_interupt, &interupt_handle, &interupt_obj);
> cyg_drv_interrupt_attach (interupt_handle);
> cyg_drv_interrupt_unmask (MOUSE_IRQ);
> ..............
> }
> static void mouse_interupt(cyg_vector_t vector,
> cyg_ucount32 count, cyg_addrword_t data)
> {
> .............
> }
>
> static int mouse_read(cyg_io_handle_t handle,void
> *buf,cyg_uint32 *len)
> {
> .......................
> }
>
> I set breakpoint in my DSR and ISR routines,but it
> never reach the breakpoint!
> I also tried to use timer interrupt(32) as interrupt
> vector,it doesn't work too.
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> http://geocities.yahoo.com/ps/info1