I'm investigating a port of some old DOS-based code to Windows CE.Net
version 5. The code currently does a lot of direct I/O port access and I'm
kind of concerned that we'll have to write a full driver for the device for
our user code to interface with it. What I'd really like would be to bypass
all the I/O port protection in the I/O protection bitmap, but I have no idea
where information about how that works is located in the MSDN docs; a search
doesn't turn anything up.
As an example, I'd like to be able to do things like this from a userland
binary in the OS image:
BYTE input;
_asm {
mov dx, 0x100
in al, dx
mov input, al
}
Normally, this causes an AV. Any ideas?
--
Steve Maillet (eMVP)
EmbeddedFusion
smaillet_AT_EmbeddedFusion_DOT_com
Can you use the CEDDK calls from a regular program (not just a driver)?
I experimentally tried compiling it, and for some reason ceddk.h was in the
SDK from Advantech, but I could only find ceddk.lib under Platform Builder:
GEODEPAD\WINCE420\Geode\cesysgen\oak\lib\x86\retail. When I linked to that,
it compiled and built OK. I don't know yet if it actually talks to the
hardware or not.
If these calls do actually read/write my hardware I/O ports, does that mean
that Advantech supplied these calls?
Are there 16-bit versions of these calls? (Nevermind - I'm off to help to
answer that one).
Michael Schwab
"Steve Maillet (eMVP)" <nos...@EntelechyConsulting.com> wrote in message
news:uX28m64L...@tk2msftngp13.phx.gbl...
OK, Steve, you're right.
I replaced the _asm macro stuff in my inpw/outpw routines with lines like
this:
WRITE_PORT_USHORT((unsigned short *)addr,data);
included ceddk.h, and copied ceddk.lib from PB to my SDKs library area, and
it works like a champ!
Since I don't have a ceddk.lib for CE 3.0, I probably won't be able to get
this to compile under 3.0, but that's no great loss.
Why is this better, now? These calls are somehow platform independent? How
do they handle the differences between processors that do or do not have
special I/O access instructions?
Michael Schwab
"Michael Schwab" <michael...@cobecv.com> wrote in message
news:e241BeiM...@TK2MSFTNGP12.phx.gbl...
--
Dean Ramsier - eMVP
Accelent Systems
http://www.accelent.com
"Michael Schwab" <michael...@cobecv.com> wrote in message
news:uod6FqiM...@TK2MSFTNGP12.phx.gbl...