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.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help