cpu_to_le32 : Any similar fn in QNX?

Hi everyone,
I am tryig to port Linux code to QNX.
Is there a function similar to cpu_to_le32 ( linux) for QNX.?
I found that the le32_to_cpu fn is replaced by ENDIAN_LE32 in QNX.

Thanks In Advance
Sarath

sarath chandran <sarath.chandran@tatainfotech.com> wrote:

Hi everyone,
I am tryig to port Linux code to QNX.
Is there a function similar to cpu_to_le32 ( linux) for QNX.?
I found that the le32_to_cpu fn is replaced by ENDIAN_LE32 in QNX.

You should be able to use the same thing (ENDIAN_LE32). Notice
they boil down to the same on linux.

-seanb

Hi Sean Thanks for a reply…
But this lousy brain still require a bit more info… :slight_smile:)

My code is something like this…
frag[0].length = cpu_to_le32(np->rx_buf_sz | LastFrag);

Here “length” will be used by the NIC in its DMa transfer operation…

Do u think simply an ENDIAN_LE32 will work … !!!

Please clarify
regards
Sarath


“Sean Boudreau” <seanb@node25.ott.qnx.com> wrote in message
news:aknrjv$a7u$1@nntp.qnx.com

sarath chandran <> sarath.chandran@tatainfotech.com> > wrote:
Hi everyone,
I am tryig to port Linux code to QNX.
Is there a function similar to cpu_to_le32 ( linux) for QNX.?
I found that the le32_to_cpu fn is replaced by ENDIAN_LE32 in QNX.

You should be able to use the same thing (ENDIAN_LE32). Notice
they boil down to the same on linux.

-seanb

Please see followups in .porting group.

-seanb

sarath chandran <sarath.chandran@tatainfotech.com> wrote:

Hi Sean Thanks for a reply…
But this lousy brain still require a bit more info… > :slight_smile:> )

My code is something like this…
frag[0].length = cpu_to_le32(np->rx_buf_sz | LastFrag);

Here “length” will be used by the NIC in its DMa transfer operation…

Do u think simply an ENDIAN_LE32 will work … !!!

Please clarify
regards
Sarath



“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:aknrjv$a7u$> 1@nntp.qnx.com> …
sarath chandran <> sarath.chandran@tatainfotech.com> > wrote:
Hi everyone,
I am tryig to port Linux code to QNX.
Is there a function similar to cpu_to_le32 ( linux) for QNX.?
I found that the le32_to_cpu fn is replaced by ENDIAN_LE32 in QNX.

You should be able to use the same thing (ENDIAN_LE32). Notice
they boil down to the same on linux.

-seanb