Re: WRITE_REGISTER_UCHAR WRITE_PORT_UCHAR by Doron
Doron
Tue Sep 13 00:50:32 CDT 2005
no, there is no way to ask if the port has been assigned to another device.
a non pnp driver does not consume hardware, you must write a pnp driver.
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"dave" <dave@discussions.microsoft.com> wrote in message
news:44BB5334-210D-41D4-B996-29CA0D9D6E2D@microsoft.com...
> Doron,
>
> Is there way to find out if i/p is already being assigned ?
>
> What if i access this i/p using not pnp driver ?
>
> thank you, dave
>
> "Doron Holan [MS]" wrote:
>
>> dave,
>>
>> unless you are assigned this i/o resource by pnp, you cannot use *ANY*
>> function to access the port itself. If it is not assigned to you, you
>> don't
>> own it and you are not allowed to touch it.
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>> "Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
>> news:OZb3lH3tFHA.3424@tk2msftngp13.phx.gbl...
>> > "dave" <dave@discussions.microsoft.com> wrote in message
>> > news:0910EBF4-269B-41C4-9763-91DD66362BFF@microsoft.com...
>> >>
>> >> Hello:
>> >>
>> >> Are WRITE_REGISTER_UCHAR and
>> >> WRITE_PORT_UCHAR identical ?
>> >>
>> >
>> > Short answer: No.
>> >
>> > Long answer:
>> > WRITE_PORT_UCHAR is designed to access to I/O port. WRITE_REGISTER_XXX
>> > is
>> > memory dereferencing with memory barrier on some platforms.
>> >
>> > On ISA buses, WRITE_PORT_UCHAR will driver the IOW pin.
>> > WRITE_REGISTER_XXX
>> > will driver the SMEMW pin (8-bit) or MEMW (16-bit).
>> >
>> > On PCI buses WRITE_PORT_XXX generates I/O Write CMD cycle,
>> > WRITE_REGISTER_XXX generates the memory-write CMD cycle.
>> >
>> >
>> >> If no when each of the should be used ?
>> >
>> > For I/O port access, use WRITE_PORT_UCHAR. For memory-mapped register,
>> > use
>> > the other.
>> >
>> >>
>> >> I need to write to 0x278( known as data register of LPT1 )
>> >>
>> >> and wondering which is the best ?
>> >
>> > Use WRITE_REGISTER_UCHAR, you have no choice.
>> >
>> >>
>> >>
>> >> thank you,
>> >
>> > You are welcome.
>> >
>> >> dave
>> >>
>> >>
>> >
>> > --
>> > Calvin Guan (Windows DDK MVP)
>> > NetXtreme Longhorn Miniport Prime
>> > Broadcom Corp. www.broadcom.com
>> >
>>
>>
>>