Problem with including linux/hid.h and linux/usb.h in usb.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am getting an error while trying to include linux/usb.h and
linux/hid.h in 'usb.c' code (to be able to use Gadgetfs for USB
communication). Both the files are present in the default include
path.

usb.c:
#include <linux/types.h>
#include <linux/usb/gadgetfs.h>
#include <linux/usb/ch9.h>
#include <linux/usb.h>
#include <linux/hid.h>


$gcc -Wall -g -o usb usb.c usbstring.c -lpthread
usb.c:39:23: error: linux/usb.h: No such file or directory
usb.c:40:23: error: linux/hid.h: No such file or directory
...


Does anyone know what the issue is?

Also the structures for HID class descriptors are inside #ifdef
__KERNEL__ ... #endif. Does it mean that only the code with
-D__KERNEL__ compile option enabled can access these structures?

Thanks,
Aniruddha
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux