[ECOS] why not interrupt?

Andrew Lunn andrew.lunn@ascom.ch
Wed Nov 28 00:18:00 GMT 2001


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



More information about the Ecos-discuss mailing list