Re: 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 Again,

I just found out that hid.h and usb.h are not present in
/usr/include/linux/ though they are present in
/usr/src/include/linux/.

Does it mean that user mode programs (such as 'usb.c') cannot use
hid.h? If so, is there any other header that user mode programs can
use to get HID class specific structures/functions?

Thanks,
Aniruddha


On Fri, Mar 27, 2009 at 7:18 PM, Aniruddha Marathe
<marathe.aniruddha@xxxxxxxxx> wrote:
> 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