- WRITE_REGISTER_UCHAR WRITE_PORT_UCHAR
- Posted by dave on September 12th, 2005
Hello:
Are WRITE_REGISTER_UCHAR and
WRITE_PORT_UCHAR identical ?
If no when each of the should be used ?
I need to write to 0x278( known as data register of LPT1 )
and wondering which is the best ?
thank you,
dave
- Posted by Calvin Guan on September 12th, 2005
"dave" <dave@discussions.microsoft.com> wrote in message
news:0910EBF4-269B-41C4-9763-91DD66362BFF@microsoft.com...
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.
For I/O port access, use WRITE_PORT_UCHAR. For memory-mapped register, use
the other.
Use WRITE_REGISTER_UCHAR, you have no choice.
You are welcome.
--
Calvin Guan (Windows DDK MVP)
NetXtreme Longhorn Miniport Prime
Broadcom Corp. www.broadcom.com
- Posted by Vipin on September 12th, 2005
Calvin,
One thing I noticed, your designation keeps changing every week!
What's next 
Cheers
Vipin
"Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
news:OZb3lH3tFHA.3424@tk2msftngp13.phx.gbl...
- Posted by Doron Holan [MS] on September 12th, 2005
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...
- Posted by dave on September 12th, 2005
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:
- Posted by Doron Holan [MS] on September 13th, 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...
- Posted by Calvin Guan on September 13th, 2005
I hope I could put "The one just won a million dollars"
)))
--
Calvin Guan (Windows DDK MVP)
NetXtreme Longhorn Miniport Prime
Broadcom Corp. www.broadcom.com
"Vipin" <Vipin@nospam.com> wrote in message
news:OKV5B35tFHA.3068@TK2MSFTNGP14.phx.gbl...
- Posted by Tim Roberts on September 15th, 2005
"Calvin Guan" <hguan@nospam.broadcom.com> wrote:
This is right.
This is right.
Whoops, here you got it exactly backwards. 0x278 is an I/O port. He needs
WRITE_PORT_UCHAR.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
- Posted by Calvin Guan on September 15th, 2005
Sharp eyes, Tim-
--
Calvin Guan (Windows DDK MVP)
NetXtreme Longhorn Miniport Prime
Broadcom Corp. www.broadcom.com
"Tim Roberts" <timr@probo.com> wrote in message
news:292ii1d3m3a1bn2i1nuqg3gqeqbd4lf2vu@4ax.com...