Mark build test makefiles as being incompatible with parallel make builds, as they...
[pub/USBasp.git] / LUFA / Drivers / USB / USB.h
index c7c60c2..512f702 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 /*
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -41,7 +41,7 @@
  *
  *  \section Sec_Dependencies Module Source Dependencies
  *  The following files must be built with any user project that uses this module:
  *
  *  \section Sec_Dependencies Module Source Dependencies
  *  The following files must be built with any user project that uses this module:
- *    - LUFA/Drivers/USB/Core/ConfigDescriptor.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
+ *    - LUFA/Drivers/USB/Core/ConfigDescriptors.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
  *    - LUFA/Drivers/USB/Core/DeviceStandardReq.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
  *    - LUFA/Drivers/USB/Core/Events.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
  *    - LUFA/Drivers/USB/Core/HostStandardReq.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
  *    - LUFA/Drivers/USB/Core/DeviceStandardReq.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
  *    - LUFA/Drivers/USB/Core/Events.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
  *    - LUFA/Drivers/USB/Core/HostStandardReq.c <i>(Makefile source module name: LUFA_SRC_USB)</i>
  *  before the class driver is used. Each Device mode Class driver typically contains a set of configuration parameters
  *  for the endpoint size/number of the associated logical USB interface, plus any class-specific configuration parameters.
  *
  *  before the class driver is used. Each Device mode Class driver typically contains a set of configuration parameters
  *  for the endpoint size/number of the associated logical USB interface, plus any class-specific configuration parameters.
  *
- *  \note The \c State section of the \c USB_ClassInfo_* structures are designed to be controlled by the Class Drivers only
- *        for maintaining the Class Driver instance's state, and should not normally be altered by the user application.
- *
  *  The following is an example of a properly initialized instance of the Audio Class Driver structure:
  *
  *  \code
  *  The following is an example of a properly initialized instance of the Audio Class Driver structure:
  *
  *  \code
  *      .Config =
  *          {
  *              .StreamingInterfaceNumber = 1,
  *      .Config =
  *          {
  *              .StreamingInterfaceNumber = 1,
- *
- *              .DataINEndpointNumber     = 1,
- *              .DataINEndpointSize       = 256,
+ *              .DataINEndpoint           =
+ *                  {
+ *                      .Address          = (ENDPOINT_DIR_IN | 1),
+ *                      .Size             = 64,
+ *                      .Banks            = 1,
+ *                  },
  *          },
  *  };
  *  \endcode
  *          },
  *  };
  *  \endcode
  *  void EVENT_USB_Device_ConfigurationChanged(void)
  *  {
  *      LEDs_SetAllLEDs(LEDMASK_USB_READY);
  *  void EVENT_USB_Device_ConfigurationChanged(void)
  *  {
  *      LEDs_SetAllLEDs(LEDMASK_USB_READY);
- *
+ *      
  *      if (!(Audio_Device_ConfigureEndpoints(&My_Audio_Interface)))
  *          LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
  *  }
  *      if (!(Audio_Device_ConfigureEndpoints(&My_Audio_Interface)))
  *          LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
  *  }
  *  int main(void)
  *  {
  *      SetupHardware();
  *  int main(void)
  *  {
  *      SetupHardware();
- *
+ *      
  *      LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
  *      LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
- *
+ *      
  *      for (;;)
  *      {
  *          if (USB_DeviceState != DEVICE_STATE_Configured)
  *            Create_And_Process_Samples();
  *      for (;;)
  *      {
  *          if (USB_DeviceState != DEVICE_STATE_Configured)
  *            Create_And_Process_Samples();
- *
+ *          
  *          Audio_Device_USBTask(&My_Audio_Interface);
  *          USB_USBTask();
  *      }
  *          Audio_Device_USBTask(&My_Audio_Interface);
  *          USB_USBTask();
  *      }
  *  before the class driver is used. Each Device mode Class driver typically contains a set of configuration parameters
  *  for the endpoint size/number of the associated logical USB interface, plus any class-specific configuration parameters.
  *
  *  before the class driver is used. Each Device mode Class driver typically contains a set of configuration parameters
  *  for the endpoint size/number of the associated logical USB interface, plus any class-specific configuration parameters.
  *
- *  \note The \c State section of the \c USB_ClassInfo_* structures are designed to be controlled by the Class Drivers only
- *        for maintaining the Class Driver instance's state, and should not normally be altered by the user application.
- *
  *  The following is an example of a properly initialized instance of the MIDI Host Class Driver structure:
  *
  *  \code
  *  The following is an example of a properly initialized instance of the MIDI Host Class Driver structure:
  *
  *  \code
  *  {
  *      .Config =
  *          {
  *  {
  *      .Config =
  *          {
- *              .DataINPipeNumber       = 1,
- *              .DataINPipeDoubleBank   = false,
- *
- *              .DataOUTPipeNumber      = 2,
- *              .DataOUTPipeDoubleBank  = false,
+ *              .DataINPipe             =
+ *                  {
+ *                      .Address        = (PIPE_DIR_IN  | 1),
+ *                      .Size           = 64,
+ *                      .Banks          = 1,
+ *                  },
+ *              .DataOUTPipe            =
+ *                  {
+ *                      .Address        = (PIPE_DIR_OUT | 2),
+ *                      .Size           = 64,
+ *                      .Banks          = 1,
+ *                  },
  *          },
  *  };
  *  \endcode
  *          },
  *  };
  *  \endcode
  *  void EVENT_USB_Host_DeviceEnumerationComplete(void)
  *  {
  *      LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
  *  void EVENT_USB_Host_DeviceEnumerationComplete(void)
  *  {
  *      LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
- *  
+ *      
  *      uint16_t ConfigDescriptorSize;
  *      uint8_t  ConfigDescriptorData[512];
  *      uint16_t ConfigDescriptorSize;
  *      uint8_t  ConfigDescriptorData[512];
- *  
+ *      
  *      if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
  *                                             sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
  *      {
  *          LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
  *          return;
  *      }
  *      if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
  *                                             sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
  *      {
  *          LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
  *          return;
  *      }
- *  
+ *      
  *      if (MIDI_Host_ConfigurePipes(&Keyboard_MIDI_Interface,
  *                                   ConfigDescriptorSize, ConfigDescriptorData) != MIDI_ENUMERROR_NoError)
  *      {
  *          LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
  *          return;
  *      }
  *      if (MIDI_Host_ConfigurePipes(&Keyboard_MIDI_Interface,
  *                                   ConfigDescriptorSize, ConfigDescriptorData) != MIDI_ENUMERROR_NoError)
  *      {
  *          LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
  *          return;
  *      }
- *  
+ *      
  *      if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
  *      {
  *          LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
  *          return;
  *      }
  *      if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
  *      {
  *          LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
  *          return;
  *      }
- *  
+ *      
  *      LEDs_SetAllLEDs(LEDMASK_USB_READY);
  *  }
  *  \endcode
  *      LEDs_SetAllLEDs(LEDMASK_USB_READY);
  *  }
  *  \endcode
  *  int main(void)
  *  {
  *      SetupHardware();
  *  int main(void)
  *  {
  *      SetupHardware();
- *
+ *      
  *      LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
  *      LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
- *
+ *      
  *      for (;;)
  *      {
  *          if (USB_HostState != HOST_STATE_Configured)
  *              Create_And_Process_Samples();
  *      for (;;)
  *      {
  *          if (USB_HostState != HOST_STATE_Configured)
  *              Create_And_Process_Samples();
- *
+ *          
  *          MIDI_Host_USBTask(&My_Audio_Interface);
  *          USB_USBTask();
  *      }
  *          MIDI_Host_USBTask(&My_Audio_Interface);
  *          USB_USBTask();
  *      }
                #include "Core/USBTask.h"
                #include "Core/Events.h"
                #include "Core/StdDescriptors.h"
                #include "Core/USBTask.h"
                #include "Core/Events.h"
                #include "Core/StdDescriptors.h"
-               #include "Core/ConfigDescriptor.h"
+               #include "Core/ConfigDescriptors.h"
                #include "Core/USBController.h"
                #include "Core/USBInterrupt.h"
 
                #include "Core/USBController.h"
                #include "Core/USBInterrupt.h"