Hi,
--- In "Simon" <> wrote:
>
> Hi, I've been using the peekpoke instructions as inline assembly and they
> work perfectly. However, I was wondering if there's a way, using inline
> assembly, to use these functions without mmap'ing. Maybe set some flags
> that'd let me control the memory locations directly?
>
> I just want to be able to communicate with the GPIO ports directly instead of
> having to go through virtual memory mapping. Is there a way to do this?
>
> Any help is appreciated.
I am not sure I understand your question, so I will post a general answer. The
linux kernel starts processes in a protected memory space, the memory addresses
your applications uses and receives are not linked to physical memory.
Using mmap() you basically create a pointer to a physical memory location. It
is a way in linux to get around the protected memory and is used on the TS
boards to control GPIO and other peripherals.
Most applications use mmap() once to generate a pointer to the base address and
then use pointer math to get pointers to other addresses beyond the base
address.
In short, to get past virtual memory mapping you use mmap(), which will only
work from a process with root access to protect the system.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|