Adam Mallory <firstname.lastname@example.org> wrote:
“Kousalya K” <> email@example.com> > wrote in
news:a5iooo$fm$> firstname.lastname@example.org> :
In Linux the functions readb/writeb, readl/writel, readw/writew are
available to transfer data from CPU to memory mapped devices. I’m not
able to see any such type of functions to handle memory mapped devices
in QNX. I have only seen the functions in/out to transfer data to I/O
mapped devices in QNX.
Could you please clarify this question?
in/out can be used to move data to a memory mapped device. If you look at
the headers for inout.h on PPC, then you’ll notice they just degrade into a
memory location reference and an EIEIO. The in/out functions are used only
if you need to move your code to a io bus based system, without too much
This works if you’re looking at the control register level of handling.
If you’re looking at handling larger regions of memory, the normal way
under QNX is to mmap_device_memory() to get a pointer to that are of
memory, then just use memcpy() or similar routines for moving data in
and out of the device.
(Or, for even larger chunks of data, you may want to consider DMA.)
QNX Training Services