Merge pull request #23 from mondalaci/add-further-scancodes
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 7 Apr 2014 11:44:53 +0000 (13:44 +0200)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 7 Apr 2014 11:44:53 +0000 (13:44 +0200)
Fix typos and add new macros for HID keyboard scancodes.

23 files changed:
Bootloaders/DFU/BootloaderDFU.h
Bootloaders/HID/BootloaderHID.txt
Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.h
LUFA/DoxygenPages/ChangeLog.txt
LUFA/DoxygenPages/GettingStarted.txt
LUFA/DoxygenPages/KnownIssues.txt
LUFA/DoxygenPages/MigrationInformation.txt
LUFA/Drivers/Misc/RingBuffer.h
LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c
LUFA/Drivers/USB/Class/Host/AudioClassHost.c
LUFA/Drivers/USB/Class/Host/CDCClassHost.c
LUFA/Drivers/USB/Class/Host/HIDClassHost.c
LUFA/Drivers/USB/Class/Host/MIDIClassHost.c
LUFA/Drivers/USB/Class/Host/MassStorageClassHost.c
LUFA/Drivers/USB/Class/Host/PrinterClassHost.c
LUFA/Drivers/USB/Class/Host/RNDISClassHost.c
LUFA/Drivers/USB/Class/Host/StillImageClassHost.c
LUFA/Platform/XMEGA/ClockManagement.h
LUFA/StudioIntegration/VSIX/LUFA.dll
LUFA/StudioIntegration/VSIX/extension.vsixmanifest
Projects/Magstripe/Magstripe.h
Projects/MediaController/MediaController.c
Projects/TempDataLogger/TempDataLogger.h

index 5efcce3..c5d8128 100644 (file)
@@ -68,7 +68,7 @@
                #define BOOTLOADER_VERSION_REV   0
 
                /** Magic bootloader key to unlock forced application start mode. */
-               #define MAGIC_BOOT_KEY            0xDC42
+               #define MAGIC_BOOT_KEY           0xDC42
 
                /** Complete bootloader version number expressed as a packed byte, constructed from the
                 *  two individual bootloader version macros.
index 56d0cff..8f26f34 100644 (file)
@@ -48,7 +48,7 @@
  *
  *  This bootloader enumerates to the host as a HID Class device, allowing for device FLASH programming through
  *  the supplied command line software, which is a modified version of Paul's TeensyHID Command Line loader code
- *  from PJRC (used with permission). This bootloader is deliberatley non-compatible with the properietary PJRC
+ *  from PJRC (used with permission). This bootloader is deliberately non-compatible with the proprietary PJRC
  *  HalfKay bootloader GUI; only the command line interface software accompanying this bootloader will work with it.
  *
  *  Out of the box this bootloader builds for the AT90USB1287 with an 8KB bootloader section size, and will fit
index 734b133..96a7665 100644 (file)
@@ -45,7 +45,7 @@
        /* Function Prototypes: */
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
                                                         uint8_t* const ReportID,
-                                                 const uint8_t ReportType,
+                                                        const uint8_t ReportType,
                                                         void* ReportData,
                                                         uint16_t* const ReportSize);
                void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
index d9fb0f0..2fd980f 100644 (file)
@@ -7,6 +7,12 @@
  /** \page Page_ChangeLog Project Changelog
   *
   *  \section Sec_ChangeLogXXXXXX Version XXXXXX
+  *  <b>Fixed:</b>
+  *  - Core:
+  *   - Fixed device class driver pipe configuration routines returning success with a partially constructed instance
+  *     when a pipe configuration failed (thanks to Helge Suess)
+  *
+  *  \section Sec_ChangeLog140302 Version 140302
   *  <b>New:</b>
   *  - Library Applications:
   *   - Added new Bulk Vendor low level device demo
index 18c8688..9ceec1e 100644 (file)
@@ -6,6 +6,10 @@
 
 /** \page Page_GettingStarted Getting Started
  *
+ *  Getting started with LUFA is easy; read the content below to get on your way to your first LUFA powered application.
+ *
+ *  \section Sec_DemosOverview The LUFA Demo Applications
+ *
  *  Out of the box, LUFA contains a large number of pre-made class demos for you to test, experiment with and
  *  ultimately build upon for your own projects. All the demos (where possible) come pre-configured to build and
  *  run correctly on the AT90USB1287 AVR microcontroller, mounted on the Atmel USBKEY board and running at an 8MHz
  *  popular Atmel USB demonstration board to date. To learn how to reconfigure, recompile and program the included
  *  LUFA applications using different settings, see the subsections below.
  *
+ *  \section Sec_ClassOrLowLevel Class Driver and Low Level Demos
+ *
  *  Most of the included demos in the /Demos/ folder come in both ClassDriver and LowLevel varieties. If you are new
  *  to LUFA, it is highly recommended that you look at the ClassDriver versions first, which use the pre-made USB
  *  Class Drivers (\ref Group_USBClassDrivers) to simplify the use of the standard USB classes in user applications.
+ *  These demos give a basic but easy to use interface to the USB class used in the demo application, such as HID or
+ *  CDC.
+ *
+ *  Those needing absolute control over the class implementation can look at the LowLevel demos, which implement the
+ *  required USB class directly in the demo application using the lowest level LUFA APIs.
+ *
  *
  *  <b>Subsections:</b>
  *  \li \subpage Page_ConfiguringApps - How to Configure the Included Demos, Projects and Bootloaders
index 082b73c..425fb26 100644 (file)
   *    - Not all devices are listed in the "Supported Parts" screen when selecting a device. To select an alternative device, change the "Show Device" drop-down to "All Parts".
   *    - When switching boards after changing the device selection, a second conflicting BOARD symbol definition can be created that prevents successful compilation. To fix, open the project properties window (<i>Project->Project {name} Properties...</i> menu item), click the Toolchain tab, click "Symbols" under the "AVR/GNU C Compiler" section and remove the incorrect definition.
   *
+  *  \section Sec_KnownIssues140302 Version 140302
+  *  - AVR8 Architecture
+  *    - No known issues.
+  *  - UC3 Architecture
+  *    \warning The UC3 device support is currently <b>experimental</b> (incomplete and/or non-functional), and is included for preview purposes only. \n
+  *
+  *    - No demos, bootloaders or projects have been ported for the UC3 devices in the current release,
+  *      although the architecture is supported in the LUFA core library.
+  *    - DMA transfers to and from the USB controller are not yet implemented for this release.
+  *    - The UC3C, UC3D and UC3L sub-families of UC3 are not currently supported by the library due to their
+  *      altered USB controller design.
+  *    - The various \c *_CreateStream() functions for creating standard \c <stdio.h> compatible virtual file
+  *      streams are not available on the UC3 architecture, due to a lack of suitable library support.
+  *  - XMEGA Architecture
+  *    \warning The XMEGA device support is currently <b>experimental</b> (incomplete and/or non-functional), and is included for preview purposes only.
+  *
+  *    - Endpoints of more than 64 bytes are not currently supported in this release.
+  *    - Isochronous endpoints are not currently supported in this release. As a result, the audio class
+  *      cannot be used on XMEGA devices.
+  *    - Multiple-bank endpoints are not currently supported in this release.
+  *    - Early silicon revisions of the ATXMEGA128A1U are incompatible with LUFA, due to their various errata
+  *      relating to the USB controller.
+  *  - Architecture Independent
+  *    - The LUFA library is not watchdog aware, and thus timeouts are possible if short periods are used
+  *      and a lengthy USB operation is initiated.
+  *    - No LUFA provided driver INF files for Windows are signed, and thus may fail to install on systems where driver signing is enforced (e.g. Windows 8).
+  *  - Build System
+  *    - No known issues.
+  *  - Atmel Studio Integration
+  *    - Not all devices are listed in the "Supported Parts" screen when selecting a device. To select an alternative device, change the "Show Device" drop-down to "All Parts".
+  *    - When switching boards after changing the device selection, a second conflicting BOARD symbol definition can be created that prevents successful compilation. To fix, open the project properties window (<i>Project->Project {name} Properties...</i> menu item), click the Toolchain tab, click "Symbols" under the "AVR/GNU C Compiler" section and remove the incorrect definition.
+  *
   *  \section Sec_KnownIssues130901 Version 130901
   *  - AVR8 Architecture
   *    - No known issues.
index 8d6cdb9..e87fa16 100644 (file)
  *  to the next version released. It does not indicate all new additions to the library in each version change, only
  *  areas relevant to making older projects compatible with the API changes of each new release.
  *
- *  \section Sec_MigrationXXXXXX Migrating from 130901 to XXXXXX
+ *  \section Sec_MigrationXXXXXX Migrating from 140302 to XXXXXX
+ *  None
+ *
+ *  \section Sec_Migration140302 Migrating from 130901 to 140302
  *  <b>USB Core</b>
  *    - The \c VERSION_BCD() macro has changed from accepting one floating point parameter to taking three distinct major/minor/revision integer parameters, as
  *      some edge cases caused incorrect parsing of the input float into the final integer BCD encoded value.
index 97648c8..68fdb8e 100644 (file)
  *      RingBuffer_InitBuffer(&Buffer, BufferData, sizeof(BufferData));
  *
  *      // Insert some data into the buffer
- *      RingBuffer_Insert(Buffer, 'H');
- *      RingBuffer_Insert(Buffer, 'E');
- *      RingBuffer_Insert(Buffer, 'L');
- *      RingBuffer_Insert(Buffer, 'L');
- *      RingBuffer_Insert(Buffer, 'O');
+ *      RingBuffer_Insert(&Buffer, 'H');
+ *      RingBuffer_Insert(&Buffer, 'E');
+ *      RingBuffer_Insert(&Buffer, 'L');
+ *      RingBuffer_Insert(&Buffer, 'L');
+ *      RingBuffer_Insert(&Buffer, 'O');
  *
  *      // Cache the number of stored bytes in the buffer
  *      uint16_t BufferCount = RingBuffer_GetCount(&Buffer);
index 57a619f..ac8d5dc 100644 (file)
@@ -98,10 +98,10 @@ uint8_t AOA_Host_ConfigurePipes(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo
        AOAInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
 
        if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataINPipe, 1)))
-         return false;
+         return AOA_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataOUTPipe, 1)))
-         return false;
+         return AOA_ENUMERROR_PipeConfigurationFailed;
 
        AOAInterfaceInfo->State.IsActive        = true;
        AOAInterfaceInfo->State.InterfaceNumber = AOAInterface->InterfaceNumber;
index c437654..3b5bceb 100644 (file)
@@ -104,10 +104,10 @@ uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfa
        AudioInterfaceInfo->Config.DataOUTPipe.Banks = 2;
 
        if (!(Pipe_ConfigurePipeTable(&AudioInterfaceInfo->Config.DataINPipe, 1)))
-         return false;
+         return AUDIO_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&AudioInterfaceInfo->Config.DataOUTPipe, 1)))
-         return false;
+         return AUDIO_ENUMERROR_PipeConfigurationFailed;
 
        AudioInterfaceInfo->State.ControlInterfaceNumber    = AudioControlInterface->InterfaceNumber;
        AudioInterfaceInfo->State.StreamingInterfaceNumber  = AudioStreamingInterface->InterfaceNumber;
index a575c1b..b32a237 100644 (file)
@@ -112,13 +112,13 @@ uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo
        CDCInterfaceInfo->Config.NotificationPipe.Type = EP_TYPE_INTERRUPT;
 
        if (!(Pipe_ConfigurePipeTable(&CDCInterfaceInfo->Config.DataINPipe, 1)))
-         return false;
+         return CDC_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&CDCInterfaceInfo->Config.DataOUTPipe, 1)))
-         return false;
+         return CDC_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&CDCInterfaceInfo->Config.NotificationPipe, 1)))
-         return false;
+         return CDC_ENUMERROR_PipeConfigurationFailed;
 
        CDCInterfaceInfo->State.ControlInterfaceNumber = CDCControlInterface->InterfaceNumber;
        CDCInterfaceInfo->State.ControlLineStates.HostToDevice = (CDC_CONTROL_LINE_OUT_RTS | CDC_CONTROL_LINE_OUT_DTR);
index c3375e6..b43435d 100644 (file)
@@ -99,7 +99,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
        HIDInterfaceInfo->Config.DataINPipe.Type  = EP_TYPE_INTERRUPT;
 
        if (!(Pipe_ConfigurePipeTable(&HIDInterfaceInfo->Config.DataINPipe, 1)))
-         return false;
+         return HID_ENUMERROR_PipeConfigurationFailed;
 
        if (DataOUTEndpoint)
        {
@@ -108,7 +108,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
                HIDInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_INTERRUPT;
 
                if (!(Pipe_ConfigurePipeTable(&HIDInterfaceInfo->Config.DataOUTPipe, 1)))
-                 return false;
+                 return HID_ENUMERROR_PipeConfigurationFailed;
        }
 
        HIDInterfaceInfo->State.InterfaceNumber      = HIDInterface->InterfaceNumber;
@@ -238,7 +238,7 @@ uint8_t HID_Host_SendReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
 {
 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
        if ((USB_HostState != HOST_STATE_Configured) || !(HIDInterfaceInfo->State.IsActive))
-         return false;
+         return PIPE_RWSTREAM_NoError;
 
        if (HIDInterfaceInfo->State.DeviceUsesOUTPipe && (ReportType == HID_REPORT_ITEM_Out))
        {
index 7ec2654..8b898cb 100644 (file)
@@ -87,10 +87,10 @@ uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceI
        MIDIInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
 
        if (!(Pipe_ConfigurePipeTable(&MIDIInterfaceInfo->Config.DataINPipe, 1)))
-         return false;
+         return MIDI_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&MIDIInterfaceInfo->Config.DataOUTPipe, 1)))
-         return false;
+         return MIDI_ENUMERROR_PipeConfigurationFailed;
 
        MIDIInterfaceInfo->State.InterfaceNumber = MIDIInterface->InterfaceNumber;
        MIDIInterfaceInfo->State.IsActive = true;
index d5bace7..ac448a5 100644 (file)
@@ -87,10 +87,10 @@ uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
        MSInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
 
        if (!(Pipe_ConfigurePipeTable(&MSInterfaceInfo->Config.DataINPipe, 1)))
-         return false;
+         return MS_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&MSInterfaceInfo->Config.DataOUTPipe, 1)))
-         return false;
+         return MS_ENUMERROR_PipeConfigurationFailed;
 
        MSInterfaceInfo->State.InterfaceNumber = MassStorageInterface->InterfaceNumber;
        MSInterfaceInfo->State.IsActive = true;
index 7eda9f6..fd32e1c 100644 (file)
@@ -87,10 +87,10 @@ uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceI
        PRNTInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
 
        if (!(Pipe_ConfigurePipeTable(&PRNTInterfaceInfo->Config.DataINPipe, 1)))
-         return false;
+         return PRNT_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&PRNTInterfaceInfo->Config.DataOUTPipe, 1)))
-         return false;
+         return PRNT_ENUMERROR_PipeConfigurationFailed;
 
        PRNTInterfaceInfo->State.InterfaceNumber  = PrinterInterface->InterfaceNumber;
        PRNTInterfaceInfo->State.AlternateSetting = PrinterInterface->AlternateSetting;
index 9072d3a..3ed51c8 100644 (file)
@@ -114,13 +114,13 @@ uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfa
        RNDISInterfaceInfo->Config.NotificationPipe.Type = EP_TYPE_INTERRUPT;
 
        if (!(Pipe_ConfigurePipeTable(&RNDISInterfaceInfo->Config.DataINPipe, 1)))
-         return false;
+         return RNDIS_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&RNDISInterfaceInfo->Config.DataOUTPipe, 1)))
-         return false;
+         return RNDIS_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&RNDISInterfaceInfo->Config.NotificationPipe, 1)))
-         return false;
+         return RNDIS_ENUMERROR_PipeConfigurationFailed;
 
        RNDISInterfaceInfo->State.ControlInterfaceNumber = RNDISControlInterface->InterfaceNumber;
        RNDISInterfaceInfo->State.IsActive = true;
index b3d74bc..24a6308 100644 (file)
@@ -100,13 +100,13 @@ uint8_t SI_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
        SIInterfaceInfo->Config.EventsPipe.Type = EP_TYPE_INTERRUPT;
 
        if (!(Pipe_ConfigurePipeTable(&SIInterfaceInfo->Config.DataINPipe, 1)))
-         return false;
+         return SI_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&SIInterfaceInfo->Config.DataOUTPipe, 1)))
-         return false;
+         return SI_ENUMERROR_PipeConfigurationFailed;
 
        if (!(Pipe_ConfigurePipeTable(&SIInterfaceInfo->Config.EventsPipe, 1)))
-         return false;
+         return SI_ENUMERROR_PipeConfigurationFailed;
 
        SIInterfaceInfo->State.InterfaceNumber = StillImageInterface->InterfaceNumber;
        SIInterfaceInfo->State.IsActive = true;
index ed48d6e..a39911a 100644 (file)
                         *
                         *  \return Boolean \c true if the internal oscillator was successfully started, \c false if invalid parameters specified.
                         */
-                       static inline uint8_t XMEGACLK_StartInternalOscillator(const uint8_t Source) ATTR_ALWAYS_INLINE;
-                       static inline uint8_t XMEGACLK_StartInternalOscillator(const uint8_t Source)
+                       static inline bool XMEGACLK_StartInternalOscillator(const uint8_t Source) ATTR_ALWAYS_INLINE;
+                       static inline bool XMEGACLK_StartInternalOscillator(const uint8_t Source)
                        {
                                switch (Source)
                                {
index c0cf255..665b802 100644 (file)
Binary files a/LUFA/StudioIntegration/VSIX/LUFA.dll and b/LUFA/StudioIntegration/VSIX/LUFA.dll differ
index afe6a70..ea6edeb 100644 (file)
@@ -14,6 +14,7 @@
 \r
                <SupportedProducts>\r
                        <IsolatedShell Version="6.1">AtmelStudio</IsolatedShell>\r
+                       <IsolatedShell Version="6.2">AtmelStudio</IsolatedShell>\r
                </SupportedProducts>\r
 \r
                <SupportedFrameworkRuntimeEdition MinVersion="4.0" MaxVersion="4.5"/>\r
index 081aa68..79a0f12 100644 (file)
@@ -77,7 +77,7 @@
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
                                                         uint8_t* const ReportID,
-                                                 const uint8_t ReportType,
+                                                        const uint8_t ReportType,
                                                         void* ReportData,
                                                         uint16_t* const ReportSize);
                void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
index fd33b67..70522e7 100644 (file)
@@ -142,8 +142,11 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \return Boolean \c true to force the sending of the report, \c false to let the library determine if it needs to be sent
  */
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                         const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize)
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                         uint8_t* const ReportID,
+                                         const uint8_t ReportType,
+                                         void* ReportData,
+                                         uint16_t* const ReportSize)
 {
        USB_MediaReport_Data_t* MediaReport = (USB_MediaReport_Data_t*)ReportData;
 
index a0139ca..70d17f4 100644 (file)
@@ -99,7 +99,7 @@
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
                                                         uint8_t* const ReportID,
-                                                 const uint8_t ReportType,
+                                                        const uint8_t ReportType,
                                                         void* ReportData,
                                                         uint16_t* const ReportSize);
                void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,