buffer address problem

Jun 22, 2008 1 Replies

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.


"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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required