Re: Port LPT + ADA (whta do I wrong?)
From: Brian May (bam_at_snoopy.apana.org.au)
Date: 12/05/04
- Next message: Brian May: "Re: Would You Fly an Airplane with a Linux-Based Control System?"
- Previous message: David Botton: "Re: Calling C++ methods from Ada.."
- In reply to: Sławo - MIR: "Re: Port LPT + ADA (whta do I wrong?)"
- Next in thread: Dmitry A. Kazakov: "Re: Port LPT + ADA (whta do I wrong?)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 05 Dec 2004 17:45:59 +1100
>>>>> ""Sławo" == "Sławo <- MIR" <mszajac@poczta.onet.pl>> writes:
"Sławo> Hello! Maybe someone tell me what do I wrong (??), or
"Sławo> maybe everything is wrong ;-) :/ These are the fragments
"Sławo> of my code:
Hello.
You seem to be getting high level access confused with low level
access. Possibly a source of this confusion is that the one word
"port" can mean different things (e.g. 1. connection from CPU to IO
card for low level access and 2. physical socket printer plugs
into). Both high level and low level access methods are very
incompatible with each other, and you definitely cannot mix the two as
you have. I am not going to describe the difference here; I suspect
that may not be beneficial at this stage. I recommend reading a good
book on operating systems and operating system drivers.
What operating system are you using? I assume this is not an embedded
system? I assume that it is a Windows based OS (since you are using
Windows definitions)?
I can only assume you require access to the LPT1 printer port. What
you need to use the high level Windows API. Windows will talk to the
hardware for you.
I have never done this myself for LPT1 (my COM serial routines might
be similar, not sure), but I suspect it involves opening "LPT1" as a
file, and reading/writing to this handle you get. There will be other
functions to call to get status information. You do not need to map
directly to any address.
I highly recommend asking the question again, but rephrase it as "How
do I access the LPT port under <insert windows OS here>?". With this
question, I think others will be able to help you better. It is often
better to ask for what you need as opposed to proposing a solution
that may not meet you requirements.
Hope this helps.
-- Brian May <bam@snoopy.apana.org.au>
- Next message: Brian May: "Re: Would You Fly an Airplane with a Linux-Based Control System?"
- Previous message: David Botton: "Re: Calling C++ methods from Ada.."
- In reply to: Sławo - MIR: "Re: Port LPT + ADA (whta do I wrong?)"
- Next in thread: Dmitry A. Kazakov: "Re: Port LPT + ADA (whta do I wrong?)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|