buffer address problem

Hi. I am writting a driver for QPCI-1553B card.I have some troubles with the buffer address.

This card have a register A which is 16-bits, points to a data buffer.But my target machine is 32-bits. How can I solve this problem?

The document of the card have some description like this: All addresses described in this document are BYTE addresses. All boards accept 16-bit words as well as byte accesses. Since all BYTE addresses must be EVEN, you can convert from a BYTE to a WORD address by dividing the BYTE address by two (2). Word format is Little Endian.

But I still do not know how to do this. Can anyone give me a example? Thanks.

Reply to
leilei
Loading thread data ...

"leilei" schrieb im Newsbeitrag news: snipped-for-privacy@w8g2000prd.googlegroups.com...

Which problem? Do you have concerns about address length, address range, data width or what is the point?

Erm - by dividing a number by 2 you don't make it an even number. To get that accomplished, set the least significant bit to 0. Just out of curiosity - you are sure all BYTE addresses have to be even? In most cases I know of, if any address must be even, it would be the one of a

16-bit-word.

How to do what?

My wishes are with you,

Stefan

Reply to
Stefan Carter

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.