From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Marcel Soulot <msoulot@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] driver: IOCTL command behavior
Date: Thu, 16 Apr 2009 16:17:11 +0200 [thread overview]
Message-ID: <49E73DE7.9020307@domain.hid> (raw)
In-Reply-To: <37f89760904160654g43fde4f0l6cd228faa65d6baf@domain.hid>
Marcel Soulot wrote:
> Hi,
> sorry, i don't realise that my description is a bit fuzzy.
>
> Here I define two IOCTL command:
>
> #define RT_GPIO_RTIOC_GET_DIRECTION\
> _IOR(RTIOC_TYPE_GPIO, 0x01, int)
>
> #define RT_GPIO_RTIOC_SET_DIRECTION\
> _IOR(RTIOC_TYPE_GPIO, 0x02, int)
>
> the commands (both) works fine. For the command
> RT_GPIO_RTIOC_SET_DIRECTION,I try to switch _IOR() to _IOW() according
> the driver "xeno_16550A" (in the
> file /usr/xenomai/include/rtdm/rtserial.h)
>
> #define RTSER_RTIOC_GET_CONFIG \
> _IOR(RTIOC_TYPE_SERIAL, 0x00, struct rtser_config)
>
> #define RTSER_RTIOC_SET_CONFIG \
> _IOW(RTIOC_TYPE_SERIAL, 0x01, struct rtser_config)
>
> But when I define :
>
> #define RT_GPIO_RTIOC_SET_DIRECTION\
> _IOW(RTIOC_TYPE_GPIO, 0x02, int)
>
> or
>
> #define RT_GPIO_RTIOC_SET_DIRECTION\
> _IOWR(RTIOC_TYPE_GPIO, 0x02, int)
>
> the call of "rt_dev_ioctl(my_fd,RT_GPIO_RTIOC_SET_DIRECTION,0xFF)" returns
> me the error "-ENOTTY".
> Which means that the command RT_GPIO_RTIOC_SET_DIRECTION is not recognized
> and I drop in default error.
>
> Hope my explanation is better,
No, please send us enough code for us to reproduce the issue.
Please do not drop the mailing list from the discussion.
--
Gilles.
next prev parent reply other threads:[~2009-04-16 14:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 11:47 [Xenomai-help] driver: IOCTL command behavior Marcel Soulot
2009-04-16 12:59 ` Gilles Chanteperdrix
[not found] ` <37f89760904160654g43fde4f0l6cd228faa65d6baf@domain.hid>
2009-04-16 14:17 ` Gilles Chanteperdrix [this message]
2009-04-16 14:55 ` Marcel Soulot
2009-04-16 15:15 ` Jan Kiszka
2009-04-16 15:47 ` Marcel Soulot
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=49E73DE7.9020307@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=msoulot@domain.hid \
--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.