This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mouse interrupt?


li hui <lhbyron@yahoo.com> writes:

> Now I try to write a mouse driver for ecos(i386
> target).I use 5 as mouse interrupt(just same as
> interrupt vector under linux),but it very strange my
> interrupt routine(DSR/ISR) doesn't response to the
> interrupt. I set breakpoint in my DSR and ISR
> routines,and it never reach the breakpoint when I
> debug my program.
> I wander if I need do some additional work for eCos
> interrupt vector?Does I need to write some assemble
> program?

You should not need to write any assembler. 

> Is there any other difference between eCos and linux
> mouse driver besides kenerl API?

eCos is not Linux. Do not assume that anything you know about writing
Linux device drivers applies to eCos.

> ps:please you tell me the interrupt vector under eCos
> such as com2,timer and so on.

Look in hal/i386/pcmb/current/include/pcmb_intr.h for the interrupt
numbers. Just using the number 5 will not work. You need to use the
correct vector number.

> Does ps2 mouse and serial mouse use same interrupt
> vector? if not,what are their interrupts?
>

I don't know, look at a hardware manual.


Some further questions for you to ponder:

Have you initialized the device hardware correctly? Have you unmasked
the interrupt? Are you running with interrupts enabled? Have you
started the scheduler? In general you need to do all of these things
before any device will interrupt. Read the documentation, look at some
existing device drivers.

-- 
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]