Fix TWI peripheral driver example code in the library documentation.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Common / HID.h
index f02e709..4e3c701 100644 (file)
                #include "../../Core/StdDescriptors.h"
                #include "HIDParser.h"
 
                #include "../../Core/StdDescriptors.h"
                #include "HIDParser.h"
 
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_HID_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_HID_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
                #define HID_KEYBOARD_LED_KATANA                           (1 << 3)
                //@}
 
                #define HID_KEYBOARD_LED_KATANA                           (1 << 3)
                //@}
 
-               /** \name Keyboard Standard Report Key Scancodes */
+               /** \name Keyboard Standard Report Key Scan-codes */
                //@{    
                #define HID_KEYBOARD_SC_ERROR_ROLLOVER                    0x01
                #define HID_KEYBOARD_SC_POST_FAIL                         0x02
                //@{    
                #define HID_KEYBOARD_SC_ERROR_ROLLOVER                    0x01
                #define HID_KEYBOARD_SC_POST_FAIL                         0x02
 
                /** \hideinitializer
                 *  A list of HID report item array elements that describe a typical Vendor Defined byte array HID report descriptor,
 
                /** \hideinitializer
                 *  A list of HID report item array elements that describe a typical Vendor Defined byte array HID report descriptor,
-                *  used for transporting abitrary data between the USB host and device via HID reports. The resulting report should be
+                *  used for transporting arbitrary data between the USB host and device via HID reports. The resulting report should be
                 *  a uint8_t byte array of the specified length in both Device to Host (IN) and Host to Device (OUT) directions.
                 *
                 *  \param[in] VendorPageNum    Vendor Defined HID Usage Page index, ranging from 0x00 to 0xFF.
                 *  a uint8_t byte array of the specified length in both Device to Host (IN) and Host to Device (OUT) directions.
                 *
                 *  \param[in] VendorPageNum    Vendor Defined HID Usage Page index, ranging from 0x00 to 0xFF.
-                *  \param[in] CollectionUsage  Vendor Usage for the encompasing report IN and OUT collection, ranging from 0x00 to 0xFF.
+                *  \param[in] CollectionUsage  Vendor Usage for the encompassing report IN and OUT collection, ranging from 0x00 to 0xFF.
                 *  \param[in] DataINUsage      Vendor Usage for the IN report data, ranging from 0x00 to 0xFF.
                 *  \param[in] DataOUTUsage     Vendor Usage for the OUT report data, ranging from 0x00 to 0xFF.   
                 *  \param[in] NumBytes         Length of the data IN and OUT reports.
                 *  \param[in] DataINUsage      Vendor Usage for the IN report data, ranging from 0x00 to 0xFF.
                 *  \param[in] DataOUTUsage     Vendor Usage for the OUT report data, ranging from 0x00 to 0xFF.   
                 *  \param[in] NumBytes         Length of the data IN and OUT reports.
                 *  specification for details on the structure elements.
                 *
                 *  \see \ref USB_HID_StdDescriptor_HID_t for the version of this type with standard element names.
                 *  specification for details on the structure elements.
                 *
                 *  \see \ref USB_HID_StdDescriptor_HID_t for the version of this type with standard element names.
+                *
+                *  \note Regardless of CPU architecture, these values should be stored as little endian.
                 */
                typedef struct
                {
                 */
                typedef struct
                {
                 *
                 *  \see \ref USB_HID_Descriptor_HID_t for the version of this type with non-standard LUFA specific
                 *       element names.
                 *
                 *  \see \ref USB_HID_Descriptor_HID_t for the version of this type with non-standard LUFA specific
                 *       element names.
+                *
+                *  \note Regardless of CPU architecture, these values should be stored as little endian.
                 */
                typedef struct
                {
                 */
                typedef struct
                {
                /** Type define for the data type used to store HID report descriptor elements. */
                typedef uint8_t USB_Descriptor_HIDReport_Datatype_t;
 
                /** Type define for the data type used to store HID report descriptor elements. */
                typedef uint8_t USB_Descriptor_HIDReport_Datatype_t;
 
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
 #endif
 
 /** @} */
 #endif
 
 /** @} */