Hi, there! I am getting crazy!
Please, some guru, try to respond this:
I use inp(an_io_base_address) to get an 8 bit value and it bring it to me
I use in8(an_io_base_address) to get an 8 bit value but it do not bring me
the value correctly.
After some research I found that using:
in32(an_io_base_address) >> 24 bring me the same information as QNX4.
in8() = 33h
in32() = 12000033h
in32() >> 24 = 13h
inp() = 13h
WHY? (It is an endian issue (both are x86) or an alignment issue)
Thanks for any help explaining this,
Please, master David Gibbs, can you reset my mind?
Okey, just found by myself this one.
I dont know why, but using mmap_device_io() on x86 as stated in
“Talking with hardware under QNX Neutrino by Dave Donohoe, QNX Software
was giving me a wrong base address. The correct was supposed to be 0xe000
and using that
function as stated on that document was returning 0xe001 to me.
Now, I am just using the value PCI_IO_ADDR(info.CpuBaseAddress[index]).
So, I think that document is wrong.
Where I read:
iobase = mmap_device_io(info.BaseAddressSize, info.CpuBaseAddress);
Should I read:
iobase = mmap_device_io(info.BaseAddressSize,
or, on x86, just:
iobase = PCI_IO_ADDR(info.CpuBaseAddress);
Andre Goddard Rosa <firstname.lastname@example.org> wrote:
Please, master David Gibbs, can you reset my mind? >
The master was on holiday.
Apparently the student has attained enlightenment without him.
QNX Training Services
Please followup in this newsgroup if you have further questions.