Hi,<br>
<br>
I have defined a header file for ioctls macros definitions. I am
including it in both, my user space application as well as in my device
driver. Now there are some macros that I want to be visible only in
device drive and some only in user space application. Is there any set
of macros defined in linux for such purpose? This is my present header file<br><br>gpio_ioctl.h<br><br>#ifndef _GPIO_IOCTL_H_<br>#define _GPIO_IOCTL_H_<br><br>/*<br> * Ioctl definitions<br> */<br><br>/* Use 250 as type/magic number */<br>
#define GPIO_IOC_MAGIC 250<br>#define GPIO_READ _IOW (GPIO_IOC_MAGIC, 0, int)<br>#define GPIO_WRITE _IOW (GPIO_IOC_MAGIC, 1, int)<br>#define GPIO_IOC_MAXNR 2<br><br><br>#ifdef _DEVICE_DRIVE_ ---> these macros should not be visible in user space application<br>
#define ...<br>...<br>..<br>#endif<br><br>#ifdef _USER_SPACE_ ---> these macros should not be visible in device driver i.e kernel space<br>#define ...<br>...<br>..<br><br>
#endif /*_GPIO_IOCTL_H_ */<br><br>
Thanks in advance<br>
Ravi Gupta