Hello,

How I must write routine that writes value to the keyboard
port "WritePort" in upper fiter driver, may somebody show
me sample code.

WritePort(IN PVOID Context,
UCHAR Value,
BOOLEAN WaitForACK)
{
//??????????????
}

NTSTATUS
InitializationRoutine(IN PVOID InitializationContext,
IN PVOID SynchFuncContext,
IN PI8042_SYNCH_READ_PORT ReadPort,
IN PI8042_SYNCH_WRITE_PORT WritePort,
OUT PBOOLEAN TurnTranslationOn)
{
//some code
}

Thanks.

Re: WritePort function (KbdFilter driver)??? by Ray

Ray
Fri Sep 05 10:47:11 CDT 2003

I hate to keep saying RTFM, but look in the ddk help index under
"I8042prt Driver Reference" for documentation and samples.

Marian wrote:

> Hello,
>
> How I must write routine that writes value to the keyboard
> port "WritePort" in upper fiter driver, may somebody show
> me sample code.
>
> WritePort(IN PVOID Context,
> UCHAR Value,
> BOOLEAN WaitForACK)
> {
> //??????????????
> }
>
> NTSTATUS
> InitializationRoutine(IN PVOID InitializationContext,
> IN PVOID SynchFuncContext,
> IN PI8042_SYNCH_READ_PORT ReadPort,
> IN PI8042_SYNCH_WRITE_PORT WritePort,
> OUT PBOOLEAN TurnTranslationOn)
> {
> //some code
> }
>
> Thanks.

--
../ray\..


Re: WritePort function (KbdFilter driver)??? by Doron

Doron
Fri Sep 05 10:48:07 CDT 2003

use the function pointer passed to you in the init routine, ie

(*WritePort)(SyncFuncContext, 0xXX, TRUE /*or FALSE depending on your
hardware/*);

this WritePort function pointer should only be used when you are in the
InitializationRoutine, anytime outside of this function you must use the
appropriate IOCTL to tell i8042prt to do the write for you.

d

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Marian" <marst@pobox.sk> wrote in message
news:244b01c373a9$c84d1cf0$a001280a@phx.gbl...
> Hello,
>
> How I must write routine that writes value to the keyboard
> port "WritePort" in upper fiter driver, may somebody show
> me sample code.
>
> WritePort(IN PVOID Context,
> UCHAR Value,
> BOOLEAN WaitForACK)
> {
> //??????????????
> }
>
> NTSTATUS
> InitializationRoutine(IN PVOID InitializationContext,
> IN PVOID SynchFuncContext,
> IN PI8042_SYNCH_READ_PORT ReadPort,
> IN PI8042_SYNCH_WRITE_PORT WritePort,
> OUT PBOOLEAN TurnTranslationOn)
> {
> //some code
> }
>
> Thanks.