From owner-freebsd-questions@FreeBSD.ORG Fri Aug 9 10:17:11 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7B222D13 for ; Fri, 9 Aug 2013 10:17:11 +0000 (UTC) (envelope-from demelier.david@gmail.com) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 167C52C7B for ; Fri, 9 Aug 2013 10:17:10 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id e12so3491000wgh.9 for ; Fri, 09 Aug 2013 03:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=HIYnhiBopPOVhrCkPBXot7GlFNyM4V0SIIX5qUwzmnA=; b=GUrvKtJdagdbTWY9vDlFjERH6uSB6jMCnK7boH1vIxjEYxOPyELus040i1ya6/3asR zW0bcfWcpD0dQG83r7KXhv5TZq/gdJ7Es3ZUPVzVlZW1HZV6+pdiIakS+PYkAh4C/zux vu0f8vQoEm2L5I/2aLkb0hsqdj77NYEQMLfAtA1XEoGryel62NFNahzIS0QdiDd0CL+p 6vZ+75nr/ZWisVg8KsDeFj3w0ugI1/KPRWkmPG/kuAEJQxfSORWGktsOIrBkYE6lZVZh DtrHqdlQ9n5+NTpjubXqTDzQR8VkSCY7IrpInL3RIb3wtBz51dPNhEj6OAa7/GO4Uzcx 0leQ== MIME-Version: 1.0 X-Received: by 10.194.176.74 with SMTP id cg10mr5693231wjc.75.1376043429458; Fri, 09 Aug 2013 03:17:09 -0700 (PDT) Received: by 10.194.239.164 with HTTP; Fri, 9 Aug 2013 03:17:09 -0700 (PDT) Date: Fri, 9 Aug 2013 12:17:09 +0200 Message-ID: Subject: Question about usbhid.h and dev/usb/usbhid.h From: David Demelier To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2013 10:17:11 -0000 Hi, I'm currently writing a USB driver for the SFML framework. I'm reading the code of SDL and seen the usage of usbhid. However, /usr/include/usbhid.h and /usr/include/dev/usb/usbhid.h are different. But they have both some common functions and the same data definition. For instance, enum and structures are identical, but the second one has much more #define about hid usages. Why are these files so much different and still having some identical definitions? Isn't better to add full definitions and data to the second one and just add a #include in /usr/include/usbhid.h? Regards, -- Demelier David