Direct I/O to ISA bus in Windows CE.NET 4.2

  • Thread starter Slobodan Brcin \(eMVP\)
  • Start date
K

kevin

Hi
I'm trying to do direct I/O on ISA in CE.NET 4.2. The I/O space does not
support DMA and probably should not be mapped.

I've searched the groups and found some stuff about how to use
TransBusAddrVirtual and using WRITE_PORT_XXX or WRITE_REGISTER_XXX and the
same for READ.

However no matter what I try everything returns giberish numbers for the
WRITE and READ functions.

TransBusAddrVirutal for address space returns 1 (which means I/O) and the
PPVOID when cast into PUCHAR returns the same value as the I/O address I'm
trying to access 0x242 or 578 in decimal. The function returns correctly.

Am I missing something? Can someone give me some help here?

Here's my code

BYTE result;
PVOID map;
ULONG addressspace;
PHYSICAL_ADDRESS temp = {0x242, 0};

addressspace = TRUE; // in i/o space, not memory space

result = TransBusAddrToVirtual(Isa, 0, temp, 32, &addressspace, &map);

if( !result )
{
printf("failed!\n");
}

printf("address space %d, LowPart %d \n", (int) addressspace, (int)
(map));

WRITE_PORT_UCHAR( (PUCHAR) &(map), (UCHAR)value);

Thanks!
 
K

KM

kevin,

Please ask these type of question in CE related newsgroups. Specifically,
you may post this to microsoft.public.windowsce.platbuilder.

KM

PS. Check out CEDDK library sources codes under
%_WINCEROOT%\Public\Common\OAK\Drivers\CEDDK.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top