All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Victor Hiairrassary <victor.hiairrassary.ml@gmail.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] How to use rtdm_(io/m)map_to_user
Date: Tue, 23 Apr 2013 13:25:19 +0200	[thread overview]
Message-ID: <51766F9F.6070407@xenomai.org> (raw)
In-Reply-To: <517536B8.4080508@gmail.com>

On 04/22/2013 03:10 PM, Victor Hiairrassary wrote:

> Hello all,
> 
> This is my first post on this mailing list. I am really new with 
> xenomai, only
> few month ago.
> 
> Currently we have a real-time application using xenomai which interacts with
> hardware directly by mmaping /dev/mem.


This is wrong. The "abstraction layer" used by an application should be
the usual driver interface open/read/write/ioctl and mmap if there are
high volumes of data to exchange with the application. Access to the
registers should be confined to the driver implementation.

This way, in order to simulate the real hardware you only have to
implement another driver with the same interface (but with an
implementation not using registers). And when you decide to use another
hardware with a completely different registers interface, you do not
have to emulate the first device registers using the second one, you
simply implement another driver with the same interface.

This is the way, the interface between Linux drivers and applications is
done, and the way it can be done with Xenomai RTDM skin.


-- 
                                                                Gilles.


  reply	other threads:[~2013-04-23 11:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 13:10 [Xenomai] How to use rtdm_(io/m)map_to_user Victor Hiairrassary
2013-04-23 11:25 ` Gilles Chanteperdrix [this message]
2013-04-23 12:50   ` Victor Hiairrassary
2013-04-23 18:29     ` Gilles Chanteperdrix
2013-04-24 16:38       ` Victor Hiairrassary
2013-04-24 19:37         ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51766F9F.6070407@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=victor.hiairrassary.ml@gmail.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.