diff options
44 files changed, 591 insertions, 1135 deletions
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c index ecd8cdda8..7757ef10c 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.c +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c @@ -36,19 +36,28 @@ #include "AudioInput.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = USB_Audio_Task , .TaskStatus = TASK_STOP },
-};
-
+/** Flag to indicate if the streaming audio alternative interface has been selected by the host. */
+bool StreamingAudioInterfaceSelected = false;
-/** Main program entry point. This routine configures the hardware required by the application, then
- * starts the scheduler to run the application tasks.
+/** Main program entry point. This routine contains the overall program flow, including initial
+ * setup of all components and the main program loop.
*/
int main(void)
{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ USB_Audio_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -60,21 +69,10 @@ int main(void) LEDs_Init();
ADC_Init(ADC_FREE_RUNNING | ADC_PRESCALE_32);
ADC_SetupChannel(MIC_IN_ADC_CHANNEL);
+ USB_Init();
/* Start the ADC conversion in free running mode */
ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | MIC_IN_ADC_CHANNEL);
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
- USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs, and
@@ -82,16 +80,13 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
/* Sample reload timer initialization */
OCR0A = (F_CPU / AUDIO_SAMPLE_FREQUENCY) - 1;
TCCR0A = (1 << WGM01); // CTC mode
- TCCR0B = (1 << CS00); // Fcpu speed
+ TCCR0B = (1 << CS00); // Fcpu speed
}
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
@@ -102,12 +97,11 @@ void EVENT_USB_Disconnect(void) /* Stop the sample reload timer */
TCCR0B = 0;
- /* Stop running audio and USB management tasks */
- Scheduler_SetTaskMode(USB_Audio_Task, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
+ /* Indicate streaming audio interface not selected */
+ StreamingAudioInterfaceSelected = false;
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
@@ -121,7 +115,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_DOUBLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -140,16 +134,7 @@ void EVENT_USB_UnhandledControlPacket(void) Endpoint_ClearSETUP();
/* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */
- if (USB_ControlRequest.wValue)
- {
- /* Start audio task */
- Scheduler_SetTaskMode(USB_Audio_Task, TASK_RUN);
- }
- else
- {
- /* Stop audio task */
- Scheduler_SetTaskMode(USB_Audio_Task, TASK_STOP);
- }
+ StreamingAudioInterfaceSelected = ((USB_ControlRequest.wValue) != 0);
/* Acknowledge status stage */
while (!(Endpoint_IsINReady()));
@@ -160,36 +145,13 @@ void EVENT_USB_UnhandledControlPacket(void) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the AudioInput_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Task to manage the Audio interface, reading in ADC samples from the microphone, and them to the host. */
-TASK(USB_Audio_Task)
+void USB_Audio_Task(void)
{
+ /* Check to see if the streaming interface is selected, if not the host is not receiving audio */
+ if (!(StreamingAudioInterfaceSelected))
+ return;
+
/* Select the audio stream endpoint */
Endpoint_SelectEndpoint(AUDIO_STREAM_EPNUM);
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.h b/Demos/Device/LowLevel/AudioInput/AudioInput.h index a394492f0..082b0555b 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.h +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.h @@ -43,11 +43,10 @@ #include "Descriptors.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Drivers/Peripheral/ADC.h> // ADC driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/LEDs.h>
+ #include <LUFA/Drivers/Peripheral/ADC.h>
/* Macros: */
/** ADC channel number for the microphone input. */
@@ -59,24 +58,25 @@ /** Maximum ADC range for the microphone input. */
#define ADC_MAX_RANGE 0x3FF
- /* Enums: */
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum AudioInput_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- };
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
- /* Task Definitions: */
- TASK(USB_Audio_Task);
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
/* Function Prototypes: */
+ void SetupHardware(void);
+ void USB_Audio_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
-
- void UpdateStatus(uint8_t CurrentStatus);
#endif
diff --git a/Demos/Device/LowLevel/AudioInput/makefile b/Demos/Device/LowLevel/AudioInput/makefile index c70e98e04..38a954d0f 100644 --- a/Demos/Device/LowLevel/AudioInput/makefile +++ b/Demos/Device/LowLevel/AudioInput/makefile @@ -119,13 +119,12 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -136,7 +135,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c index 40e376b52..7a9c6eca0 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c @@ -36,40 +36,38 @@ #include "AudioOutput.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = USB_Audio_Task , .TaskStatus = TASK_STOP },
-};
-
+/** Flag to indicate if the streaming audio alternative interface has been selected by the host. */
+bool StreamingAudioInterfaceSelected = false;
-/** Main program entry point. This routine configures the hardware required by the application, then
- * starts the scheduler to run the application tasks.
+/** Main program entry point. This routine contains the overall program flow, including initial
+ * setup of all components and the main program loop.
*/
int main(void)
{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ USB_Audio_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
-
+
/* Hardware Initialization */
LEDs_Init();
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs, and
@@ -77,11 +75,8 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
/* Sample reload timer initialization */
OCR0A = (F_CPU / AUDIO_SAMPLE_FREQUENCY) - 1;
@@ -129,12 +124,11 @@ void EVENT_USB_Disconnect(void) PORTC = 0x00;
#endif
- /* Stop running audio and USB management tasks */
- Scheduler_SetTaskMode(USB_Audio_Task, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
+ /* Indicate streaming audio interface not selected */
+ StreamingAudioInterfaceSelected = false;
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
@@ -148,7 +142,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_DOUBLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -167,16 +161,7 @@ void EVENT_USB_UnhandledControlPacket(void) Endpoint_ClearSETUP();
/* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */
- if (USB_ControlRequest.wValue)
- {
- /* Start audio task */
- Scheduler_SetTaskMode(USB_Audio_Task, TASK_RUN);
- }
- else
- {
- /* Stop audio task */
- Scheduler_SetTaskMode(USB_Audio_Task, TASK_STOP);
- }
+ StreamingAudioInterfaceSelected = ((USB_ControlRequest.wValue) != 0);
/* Acknowledge status stage */
while (!(Endpoint_IsINReady()));
@@ -187,38 +172,15 @@ void EVENT_USB_UnhandledControlPacket(void) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the AudioOutput_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Task to manage the Audio interface, reading in audio samples from the host, and outputting them to the speakers/LEDs as
* desired.
*/
-TASK(USB_Audio_Task)
+void USB_Audio_Task(void)
{
+ /* Check to see if the streaming interface is selected, if not the host is not receiving audio */
+ if (!(StreamingAudioInterfaceSelected))
+ return;
+
/* Select the audio stream endpoint */
Endpoint_SelectEndpoint(AUDIO_STREAM_EPNUM);
diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h index d8725a07b..d722d535b 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h @@ -43,10 +43,9 @@ #include "Descriptors.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/LEDs.h> /* Macros: */
#if defined(USB_FULL_CONTROLLER) || defined(USB_MODIFIED_FULL_CONTROLLER)
@@ -96,24 +95,25 @@ #define CSx0 CS10
#endif
- /* Enums: */
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum AudioOutput_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- };
-
- /* Task Definitions: */
- TASK(USB_Audio_Task);
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
/* Function Prototypes: */
+ void SetupHardware(void);
+ void USB_Audio_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
-
- void UpdateStatus(uint8_t CurrentStatus);
#endif
diff --git a/Demos/Device/LowLevel/AudioOutput/makefile b/Demos/Device/LowLevel/AudioOutput/makefile index 28f038f49..2ef97b567 100644 --- a/Demos/Device/LowLevel/AudioOutput/makefile +++ b/Demos/Device/LowLevel/AudioOutput/makefile @@ -119,13 +119,12 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -136,7 +135,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/CDC/CDC.c b/Demos/Device/LowLevel/CDC/CDC.c index d7ebb9e6b..3db4c1e55 100644 --- a/Demos/Device/LowLevel/CDC/CDC.c +++ b/Demos/Device/LowLevel/CDC/CDC.c @@ -36,13 +36,6 @@ #include "CDC.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = CDC_Task , .TaskStatus = TASK_STOP },
-};
-
/* Globals: */
/** Contains the current baud rate and other settings of the virtual serial port. While this demo does not use
* the physical USART and thus does not use these settings, they must still be retained and returned to the host
@@ -57,26 +50,25 @@ CDC_Line_Coding_t LineCoding = { .BaudRateBPS = 9600, .ParityType = Parity_None,
.DataBits = 8 };
-/** String to print through the virtual serial port when the joystick is pressed upwards. */
-char JoystickUpString[] = "Joystick Up\r\n";
-
-/** String to print through the virtual serial port when the joystick is pressed downward. */
-char JoystickDownString[] = "Joystick Down\r\n";
-
-/** String to print through the virtual serial port when the joystick is pressed left. */
-char JoystickLeftString[] = "Joystick Left\r\n";
-
-/** String to print through the virtual serial port when the joystick is pressed right. */
-char JoystickRightString[] = "Joystick Right\r\n";
-
-/** String to print through the virtual serial port when the joystick is pressed inwards. */
-char JoystickPressedString[] = "Joystick Pressed\r\n";
-
-/** Main program entry point. This routine configures the hardware required by the application, then
- * starts the scheduler to run the application tasks.
+/** Main program entry point. This routine contains the overall program flow, including initial
+ * setup of all components and the main program loop.
*/
int main(void)
{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ CDC_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -87,18 +79,7 @@ int main(void) /* Hardware Initialization */
Joystick_Init();
LEDs_Init();
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
@@ -106,11 +87,8 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
@@ -118,12 +96,8 @@ void EVENT_USB_Connect(void) */
void EVENT_USB_Disconnect(void)
{
- /* Stop running CDC and USB management tasks */
- Scheduler_SetTaskMode(CDC_Task, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
-
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
@@ -145,10 +119,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_SINGLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
-
- /* Start CDC task */
- Scheduler_SetTaskMode(CDC_Task, TASK_RUN);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -210,39 +181,21 @@ void EVENT_USB_UnhandledControlPacket(void) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the CDC_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Function to manage CDC data transmission and reception to and from the host. */
-TASK(CDC_Task)
+void CDC_Task(void)
{
char* ReportString = NULL;
uint8_t JoyStatus_LCL = Joystick_GetStatus();
static bool ActionSent = false;
+
+ char* JoystickStrings[] =
+ {
+ "Joystick Up\r\n",
+ "Joystick Down\r\n",
+ "Joystick Left\r\n",
+ "Joystick Right\r\n",
+ "Joystick Pressed\r\n",
+ };
#if 0
/* NOTE: Here you can use the notification endpoint to send back line state changes to the host, for the special RS-232
@@ -269,15 +222,15 @@ TASK(CDC_Task) /* Determine if a joystick action has occurred */
if (JoyStatus_LCL & JOY_UP)
- ReportString = JoystickUpString;
+ ReportString = JoystickStrings[0];
else if (JoyStatus_LCL & JOY_DOWN)
- ReportString = JoystickDownString;
+ ReportString = JoystickStrings[1];
else if (JoyStatus_LCL & JOY_LEFT)
- ReportString = JoystickLeftString;
+ ReportString = JoystickStrings[2];
else if (JoyStatus_LCL & JOY_RIGHT)
- ReportString = JoystickRightString;
+ ReportString = JoystickStrings[3];
else if (JoyStatus_LCL & JOY_PRESS)
- ReportString = JoystickPressedString;
+ ReportString = JoystickStrings[4];
/* Flag management - Only allow one string to be sent per action */
if (ReportString == NULL)
diff --git a/Demos/Device/LowLevel/CDC/CDC.h b/Demos/Device/LowLevel/CDC/CDC.h index 4c4ca74d5..821ba8f96 100644 --- a/Demos/Device/LowLevel/CDC/CDC.h +++ b/Demos/Device/LowLevel/CDC/CDC.h @@ -44,11 +44,10 @@ #include "Descriptors.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/Joystick.h> // Joystick driver
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/Joystick.h>
+ #include <LUFA/Drivers/Board/LEDs.h> /* Macros: */
/** CDC Class specific request to get the current virtual serial port configuration settings. */
@@ -111,6 +110,18 @@ */
#define CONTROL_LINE_IN_OVERRUNERROR (1 << 6)
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
+
/* Type Defines: */
/** Type define for the virtual serial port line encoding settings, for storing the current USART configuration
* as set by the host via a class specific request.
@@ -159,19 +170,11 @@ Parity_Mark = 3, /**< Mark parity bit mode on each frame */
Parity_Space = 4, /**< Space parity bit mode on each frame */
};
-
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum CDC_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- };
- /* Tasks: */
- TASK(CDC_Task);
-
/* Function Prototypes: */
+ void SetupHardware(void);
+ void CDC_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
diff --git a/Demos/Device/LowLevel/CDC/makefile b/Demos/Device/LowLevel/CDC/makefile index bc22be5c0..c8e8798d6 100644 --- a/Demos/Device/LowLevel/CDC/makefile +++ b/Demos/Device/LowLevel/CDC/makefile @@ -119,13 +119,12 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -136,7 +135,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/DualCDC/DualCDC.c b/Demos/Device/LowLevel/DualCDC/DualCDC.c index 34d772ff0..839d6d98e 100644 --- a/Demos/Device/LowLevel/DualCDC/DualCDC.c +++ b/Demos/Device/LowLevel/DualCDC/DualCDC.c @@ -36,14 +36,6 @@ #include "DualCDC.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = CDC1_Task , .TaskStatus = TASK_STOP },
- { .Task = CDC2_Task , .TaskStatus = TASK_STOP },
-};
-
/* Globals: */
/** Contains the current baud rate and other settings of the first virtual serial port. While this demo does not use
* the physical USART and thus does not use these settings, they must still be retained and returned to the host
@@ -70,27 +62,25 @@ CDC_Line_Coding_t LineCoding2 = { .BaudRateBPS = 9600, .CharFormat = OneStopBit,
.ParityType = Parity_None,
.DataBits = 8 };
-
-/** String to print through the first virtual serial port when the joystick is pressed upwards. */
-char JoystickUpString[] = "Joystick Up\r\n";
-
-/** String to print through the first virtual serial port when the joystick is pressed downward. */
-char JoystickDownString[] = "Joystick Down\r\n";
-
-/** String to print through the first virtual serial port when the joystick is pressed left. */
-char JoystickLeftString[] = "Joystick Left\r\n";
-
-/** String to print through the first virtual serial port when the joystick is pressed right. */
-char JoystickRightString[] = "Joystick Right\r\n";
-
-/** String to print through the first virtual serial port when the joystick is pressed inwards. */
-char JoystickPressedString[] = "Joystick Pressed\r\n";
/** Main program entry point. This routine configures the hardware required by the application, then
* starts the scheduler to run the application tasks.
*/
int main(void)
{
+ SetupHardware();
+
+ for (;;)
+ {
+ CDC1_Task();
+ CDC2_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -101,18 +91,7 @@ int main(void) /* Hardware Initialization */
Joystick_Init();
LEDs_Init();
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
@@ -120,11 +99,8 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
@@ -132,13 +108,8 @@ void EVENT_USB_Connect(void) */
void EVENT_USB_Disconnect(void)
{
- /* Stop running CDC and USB management tasks */
- Scheduler_SetTaskMode(CDC1_Task, TASK_STOP);
- Scheduler_SetTaskMode(CDC2_Task, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
-
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
@@ -173,11 +144,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_SINGLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
-
- /* Start CDC tasks */
- Scheduler_SetTaskMode(CDC1_Task, TASK_RUN);
- Scheduler_SetTaskMode(CDC2_Task, TASK_RUN);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -235,53 +202,35 @@ void EVENT_USB_UnhandledControlPacket(void) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the DualCDC_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Function to manage CDC data transmission and reception to and from the host for the first CDC interface, which sends joystick
* movements to the host as ASCII strings.
*/
-TASK(CDC1_Task)
+void CDC1_Task(void)
{
char* ReportString = NULL;
uint8_t JoyStatus_LCL = Joystick_GetStatus();
static bool ActionSent = false;
+ char* JoystickStrings[] =
+ {
+ "Joystick Up\r\n",
+ "Joystick Down\r\n",
+ "Joystick Left\r\n",
+ "Joystick Right\r\n",
+ "Joystick Pressed\r\n",
+ };
+
/* Determine if a joystick action has occurred */
if (JoyStatus_LCL & JOY_UP)
- ReportString = JoystickUpString;
+ ReportString = JoystickStrings[0];
else if (JoyStatus_LCL & JOY_DOWN)
- ReportString = JoystickDownString;
+ ReportString = JoystickStrings[1];
else if (JoyStatus_LCL & JOY_LEFT)
- ReportString = JoystickLeftString;
+ ReportString = JoystickStrings[2];
else if (JoyStatus_LCL & JOY_RIGHT)
- ReportString = JoystickRightString;
+ ReportString = JoystickStrings[3];
else if (JoyStatus_LCL & JOY_PRESS)
- ReportString = JoystickPressedString;
+ ReportString = JoystickStrings[4];
/* Flag management - Only allow one string to be sent per action */
if (ReportString == NULL)
@@ -319,7 +268,7 @@ TASK(CDC1_Task) /** Function to manage CDC data transmission and reception to and from the host for the second CDC interface, which echoes back
* all data sent to it from the host.
*/
-TASK(CDC2_Task)
+void CDC2_Task(void)
{
/* Select the Serial Rx Endpoint */
Endpoint_SelectEndpoint(CDC2_RX_EPNUM);
diff --git a/Demos/Device/LowLevel/DualCDC/DualCDC.h b/Demos/Device/LowLevel/DualCDC/DualCDC.h index 117af601e..d6f09e643 100644 --- a/Demos/Device/LowLevel/DualCDC/DualCDC.h +++ b/Demos/Device/LowLevel/DualCDC/DualCDC.h @@ -44,11 +44,10 @@ #include "Descriptors.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/Joystick.h> // Joystick driver
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/Joystick.h>
+ #include <LUFA/Drivers/Board/LEDs.h>
/* Macros: */
/** CDC Class specific request to get the current virtual serial port configuration settings. */
@@ -60,6 +59,18 @@ /** CDC Class specific request to set the current virtual serial port handshake line states. */
#define REQ_SetControlLineState 0x22
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
+
/* Type Defines: */
/** Type define for the virtual serial port line encoding settings, for storing the current USART configuration
* as set by the host via a class specific request.
@@ -95,24 +106,14 @@ Parity_Space = 4, /**< Space parity bit mode on each frame */
};
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum DualCDC_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- };
-
- /* Tasks: */
- TASK(CDC1_Task);
- TASK(CDC2_Task);
-
/* Function Prototypes: */
+ void CDC1_Task(void);
+ void CDC2_Task(void);
+ void SetupHardware(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
-
- void UpdateStatus(uint8_t CurrentStatus);
#endif
diff --git a/Demos/Device/LowLevel/DualCDC/makefile b/Demos/Device/LowLevel/DualCDC/makefile index 06d0e184b..143c0be97 100644 --- a/Demos/Device/LowLevel/DualCDC/makefile +++ b/Demos/Device/LowLevel/DualCDC/makefile @@ -119,13 +119,12 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -136,7 +135,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.c b/Demos/Device/LowLevel/GenericHID/GenericHID.c index 058d269fe..a604bbe8d 100644 --- a/Demos/Device/LowLevel/GenericHID/GenericHID.c +++ b/Demos/Device/LowLevel/GenericHID/GenericHID.c @@ -36,13 +36,6 @@ #include "GenericHID.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = USB_HID_Report , .TaskStatus = TASK_STOP },
-};
-
/** Static buffer to hold the last received report from the host, so that it can be echoed back in the next sent report */
static uint8_t LastReceived[GENERIC_REPORT_SIZE];
@@ -52,6 +45,20 @@ static uint8_t LastReceived[GENERIC_REPORT_SIZE]; */
int main(void)
{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ HID_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -61,18 +68,7 @@ int main(void) /* Hardware Initialization */
LEDs_Init();
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
@@ -80,11 +76,8 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
@@ -92,12 +85,8 @@ void EVENT_USB_Connect(void) */
void EVENT_USB_Disconnect(void)
{
- /* Stop running HID reporting and USB management tasks */
- Scheduler_SetTaskMode(USB_HID_Report, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
-
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
@@ -116,7 +105,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_SINGLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -173,33 +162,6 @@ void EVENT_USB_UnhandledControlPacket(void) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the GenericHID_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Function to process the lest received report from the host.
*
* \param DataArray Pointer to a buffer where the last report data is stored
@@ -232,7 +194,7 @@ void CreateGenericHIDReport(uint8_t* DataArray) DataArray[i] = LastReceived[i];
}
-TASK(USB_HID_Report)
+void HID_Task(void)
{
/* Check if the USB system is connected to a host */
if (USB_IsConnected)
diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.h b/Demos/Device/LowLevel/GenericHID/GenericHID.h index 30354b756..e48bf1df3 100644 --- a/Demos/Device/LowLevel/GenericHID/GenericHID.h +++ b/Demos/Device/LowLevel/GenericHID/GenericHID.h @@ -46,10 +46,9 @@ #include "Descriptors.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/LEDs.h>
/* Macros: */
/** HID Class specific request to get the next HID report from the device. */
@@ -58,6 +57,18 @@ /** HID Class specific request to send the next HID report to the device. */
#define REQ_SetReport 0x09
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
+
/* Enums: */
/** Enum for the possible status codes for passing to the UpdateStatus() function. */
enum GenericHID_StatusCodes_t
@@ -67,16 +78,15 @@ Status_USBReady = 2, /**< USB interface is connected and ready */
};
- /* Task Definitions: */
- TASK(USB_HID_Report);
-
/* Function Prototypes: */
+ void SetupHardware(void);
+ void HID_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
- void UpdateStatus(uint8_t CurrentStatus);
void ProcessGenericHIDReport(uint8_t* DataArray);
void CreateGenericHIDReport(uint8_t* DataArray);
diff --git a/Demos/Device/LowLevel/GenericHID/makefile b/Demos/Device/LowLevel/GenericHID/makefile index 9c6c891cd..e9e903700 100644 --- a/Demos/Device/LowLevel/GenericHID/makefile +++ b/Demos/Device/LowLevel/GenericHID/makefile @@ -119,13 +119,12 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -136,7 +135,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/Joystick/Joystick.c b/Demos/Device/LowLevel/Joystick/Joystick.c index 8c50a2c16..94763b82a 100644 --- a/Demos/Device/LowLevel/Joystick/Joystick.c +++ b/Demos/Device/LowLevel/Joystick/Joystick.c @@ -36,18 +36,25 @@ #include "Joystick.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = USB_Joystick_Report , .TaskStatus = TASK_STOP },
-};
-
/** Main program entry point. This routine configures the hardware required by the application, then
* starts the scheduler to run the application tasks.
*/
int main(void)
{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ HID_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -59,18 +66,7 @@ int main(void) Joystick_Init();
LEDs_Init();
Buttons_Init();
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
@@ -78,11 +74,8 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
@@ -90,12 +83,8 @@ void EVENT_USB_Connect(void) */
void EVENT_USB_Disconnect(void)
{
- /* Stop running joystick reporting and USB management tasks */
- Scheduler_SetTaskMode(USB_Joystick_Report, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
-
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
@@ -109,10 +98,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_SINGLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
-
- /* Start joystick reporting task */
- Scheduler_SetTaskMode(USB_Joystick_Report, TASK_RUN);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -189,35 +175,8 @@ bool GetNextReport(USB_JoystickReport_Data_t* ReportData) return InputChanged;
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the Joystick_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Function to manage HID report generation and transmission to the host. */
-TASK(USB_Joystick_Report)
+void HID_Task(void)
{
/* Check if the USB System is connected to a Host */
if (USB_IsConnected)
diff --git a/Demos/Device/LowLevel/Joystick/Joystick.h b/Demos/Device/LowLevel/Joystick/Joystick.h index 9763cada3..c50d7f01b 100644 --- a/Demos/Device/LowLevel/Joystick/Joystick.h +++ b/Demos/Device/LowLevel/Joystick/Joystick.h @@ -44,20 +44,28 @@ #include "Descriptors.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/Joystick.h> // Joystick driver
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Drivers/Board/Buttons.h> // Board Buttons driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
-
- /* Task Definitions: */
- TASK(USB_Joystick_Report);
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/Joystick.h>
+ #include <LUFA/Drivers/Board/LEDs.h>
+ #include <LUFA/Drivers/Board/Buttons.h>
/* Macros: */
/** HID Class specific request to get the next HID report from the device. */
#define REQ_GetReport 0x01
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
+
/* Type Defines: */
/** Type define for the joystick HID report structure, for creating and sending HID reports to the host PC.
* This mirrors the layout described to the host in the HID report descriptor, in Descriptors.c.
@@ -68,23 +76,16 @@ int8_t Y; /**< Current absolute joystick Y position, as a signed 8-bit integer */
uint8_t Button; /**< Bit mask of the currently pressed joystick buttons */
} USB_JoystickReport_Data_t;
-
- /* Enums: */
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum Joystick_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- };
/* Function Prototypes: */
+ void SetupHardware(void);
+ void HID_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
bool GetNextReport(USB_JoystickReport_Data_t* ReportData);
- void UpdateStatus(uint8_t CurrentStatus);
#endif
diff --git a/Demos/Device/LowLevel/Joystick/makefile b/Demos/Device/LowLevel/Joystick/makefile index aaf69e80b..cee822c58 100644 --- a/Demos/Device/LowLevel/Joystick/makefile +++ b/Demos/Device/LowLevel/Joystick/makefile @@ -119,13 +119,12 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -136,7 +135,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.c b/Demos/Device/LowLevel/Keyboard/Keyboard.c index 6abd193f4..06806b58b 100644 --- a/Demos/Device/LowLevel/Keyboard/Keyboard.c +++ b/Demos/Device/LowLevel/Keyboard/Keyboard.c @@ -37,13 +37,6 @@ #include "Keyboard.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = USB_Keyboard_Report , .TaskStatus = TASK_STOP },
-};
-
/* Global Variables */
/** Indicates what report mode the host has requested, true for normal HID reporting mode, false for special boot
* protocol reporting mode.
@@ -67,6 +60,20 @@ uint16_t IdleMSRemaining = 0; */
int main(void)
{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ HID_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -77,24 +84,13 @@ int main(void) /* Hardware Initialization */
Joystick_Init();
LEDs_Init();
+ USB_Init();
/* Millisecond timer initialization, with output compare interrupt enabled for the idle timing */
OCR0A = 0x7D;
TCCR0A = (1 << WGM01);
TCCR0B = ((1 << CS01) | (1 << CS00));
TIMSK0 = (1 << OCIE0A);
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
- USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
@@ -102,11 +98,8 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
/* Default to report protocol on connect */
UsingReportProtocol = true;
@@ -117,12 +110,8 @@ void EVENT_USB_Connect(void) */
void EVENT_USB_Disconnect(void)
{
- /* Stop running keyboard reporting and USB management tasks */
- Scheduler_SetTaskMode(USB_Keyboard_Report, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
-
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
@@ -141,10 +130,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_SINGLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
-
- /* Start running keyboard reporting task */
- Scheduler_SetTaskMode(USB_Keyboard_Report, TASK_RUN);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -382,35 +368,8 @@ void ReceiveNextReport(void) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the Keyboard_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Function to manage HID report generation and transmission to the host, when in report mode. */
-TASK(USB_Keyboard_Report)
+void HID_Task(void)
{
/* Check if the USB system is connected to a host */
if (USB_IsConnected)
diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.h b/Demos/Device/LowLevel/Keyboard/Keyboard.h index c4ed6e07c..2a2ebdc49 100644 --- a/Demos/Device/LowLevel/Keyboard/Keyboard.h +++ b/Demos/Device/LowLevel/Keyboard/Keyboard.h @@ -47,11 +47,10 @@ #include "Descriptors.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/Joystick.h> // Joystick driver
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/Joystick.h>
+ #include <LUFA/Drivers/Board/LEDs.h>
/* Macros: */
/** Idle period indicating that reports should be sent only when the inputs have changed */
@@ -74,9 +73,18 @@ /** HID Class specific request to set the current HID protocol in use, either report or boot. */
#define REQ_SetProtocol 0x0B
-
- /* Task Definitions: */
- TASK(USB_Keyboard_Report);
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
/* Type Defines: */
/** Type define for the keyboard HID report structure, for creating and sending HID reports to the host PC.
@@ -88,17 +96,11 @@ uint8_t Reserved; /**< Reserved, always set as 0x00 */
uint8_t KeyCode[6]; /**< Array of up to six simultaneous key codes of pressed keys */
} USB_KeyboardReport_Data_t;
-
- /* Enums: */
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum Keyboard_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- };
/* Function Prototypes: */
+ void SetupHardware(void);
+ void HID_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
@@ -108,6 +110,5 @@ void ProcessLEDReport(uint8_t LEDReport);
void SendNextReport(void);
void ReceiveNextReport(void);
- void UpdateStatus(uint8_t CurrentStatus);
#endif
diff --git a/Demos/Device/LowLevel/Keyboard/makefile b/Demos/Device/LowLevel/Keyboard/makefile index 88e4de0e6..3ab9de95a 100644 --- a/Demos/Device/LowLevel/Keyboard/makefile +++ b/Demos/Device/LowLevel/Keyboard/makefile @@ -119,13 +119,12 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -136,7 +135,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c index 25d633e43..9127fea9e 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c @@ -37,14 +37,6 @@ #include "KeyboardMouse.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = USB_Mouse , .TaskStatus = TASK_RUN },
- { .Task = USB_Keyboard , .TaskStatus = TASK_RUN },
-};
-
/* Global Variables */
/** Global structure to hold the current keyboard interface HID report, for transmission to the host */
USB_KeyboardReport_Data_t KeyboardReportData;
@@ -57,6 +49,21 @@ USB_MouseReport_Data_t MouseReportData; */
int main(void)
{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ Keyboard_HID_Task();
+ Mouse_HID_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -67,18 +74,7 @@ int main(void) /* Hardware Initialization */
Joystick_Init();
LEDs_Init();
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
@@ -86,11 +82,8 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
@@ -98,11 +91,8 @@ void EVENT_USB_Connect(void) */
void EVENT_USB_Disconnect(void)
{
- /* Stop running HID reporting and USB management tasks */
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
-
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
@@ -126,7 +116,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_SINGLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -205,38 +195,11 @@ void EVENT_USB_UnhandledControlPacket(void) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the KeyboardMouse_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Keyboard task. This generates the next keyboard HID report for the host, and transmits it via the
* keyboard IN endpoint when the host is ready for more data. Additionally, it processes host LED status
* reports sent to the device via the keyboard OUT reporting endpoint.
*/
-TASK(USB_Keyboard)
+void Keyboard_HID_Task(void)
{
uint8_t JoyStatus_LCL = Joystick_GetStatus();
@@ -307,7 +270,7 @@ TASK(USB_Keyboard) /** Mouse task. This generates the next mouse HID report for the host, and transmits it via the
* mouse IN endpoint when the host is ready for more data.
*/
-TASK(USB_Mouse)
+void Mouse_HID_Task(void)
{
uint8_t JoyStatus_LCL = Joystick_GetStatus();
diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h index e3f943402..138f0fc1d 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h +++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h @@ -41,25 +41,11 @@ #include "Descriptors.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/Joystick.h> // Joystick driver
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Drivers/Board/Buttons.h> // Board Buttons driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
-
- /* Task Definitions: */
- TASK(USB_Keyboard);
- TASK(USB_Mouse);
-
- /* Enums: */
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum KeyboardMouse_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- };
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/Joystick.h>
+ #include <LUFA/Drivers/Board/LEDs.h>
+ #include <LUFA/Drivers/Board/Buttons.h>
/* Macros: */
/** HID Class specific request to get the next HID report from the device. */
@@ -73,6 +59,18 @@ /** HID Class specific request to set the current HID protocol in use, either report or boot. */
#define REQ_SetProtocol 0x0B
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
/* Type Defines: */
/** Type define for the keyboard HID report structure, for creating and sending HID reports to the host PC.
@@ -96,11 +94,13 @@ } USB_MouseReport_Data_t;
/* Function Prototypes: */
+ void SetupHardware(void);
+ void Keyboard_HID_Task(void);
+ void Mouse_HID_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
-
- void UpdateStatus(uint8_t CurrentStatus);
#endif
diff --git a/Demos/Device/LowLevel/KeyboardMouse/makefile b/Demos/Device/LowLevel/KeyboardMouse/makefile index c6b34d96e..b93943451 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/makefile +++ b/Demos/Device/LowLevel/KeyboardMouse/makefile @@ -119,13 +119,12 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -136,7 +135,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/MIDI/MIDI.c b/Demos/Device/LowLevel/MIDI/MIDI.c index b6b43df6a..6dd38af85 100644 --- a/Demos/Device/LowLevel/MIDI/MIDI.c +++ b/Demos/Device/LowLevel/MIDI/MIDI.c @@ -36,18 +36,25 @@ #include "MIDI.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = USB_MIDI_Task , .TaskStatus = TASK_STOP },
-};
-
/** Main program entry point. This routine configures the hardware required by the application, then
* starts the scheduler to run the application tasks.
*/
int main(void)
{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ MIDI_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -59,28 +66,14 @@ int main(void) Joystick_Init();
LEDs_Init();
Buttons_Init();
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs. */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
@@ -88,12 +81,8 @@ void EVENT_USB_Connect(void) */
void EVENT_USB_Disconnect(void)
{
- /* Stop running audio and USB management tasks */
- Scheduler_SetTaskMode(USB_MIDI_Task, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
-
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
@@ -111,16 +100,13 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_SINGLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
-
- /* Start MIDI task */
- Scheduler_SetTaskMode(USB_MIDI_Task, TASK_RUN);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Task to handle the generation of MIDI note change events in response to presses of the board joystick, and send them
* to the host.
*/
-TASK(USB_MIDI_Task)
+void MIDI_Task(void)
{
static uint8_t PrevJoystickStatus;
@@ -164,33 +150,6 @@ TASK(USB_MIDI_Task) Endpoint_ClearOUT();
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the MIDI_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Sends a MIDI note change event (note on or off) to the MIDI output jack, on the given virtual cable ID and channel.
*
* \param Pitch Pitch of the note to turn on or off
diff --git a/Demos/Device/LowLevel/MIDI/MIDI.h b/Demos/Device/LowLevel/MIDI/MIDI.h index 635036ae8..0e8dde8b2 100644 --- a/Demos/Device/LowLevel/MIDI/MIDI.h +++ b/Demos/Device/LowLevel/MIDI/MIDI.h @@ -44,12 +44,11 @@ #include "Descriptors.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/Joystick.h> // Joystick driver
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Drivers/Board/Buttons.h> // Board Buttons driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/Joystick.h>
+ #include <LUFA/Drivers/Board/LEDs.h>
+ #include <LUFA/Drivers/Board/Buttons.h>
/* Macros: */
/** MIDI command for a note on (activation) event */
@@ -68,19 +67,22 @@ */
#define MIDI_CHANNEL(channel) (channel - 1)
- /* Enums: */
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum MIDI_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- };
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
- /* Task Definitions: */
- TASK(USB_MIDI_Task);
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
+
/* Function Prototypes: */
+ void SetupHardware(void);
+ void MIDI_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
diff --git a/Demos/Device/LowLevel/MIDI/makefile b/Demos/Device/LowLevel/MIDI/makefile index 18fc3b154..51c67c86a 100644 --- a/Demos/Device/LowLevel/MIDI/makefile +++ b/Demos/Device/LowLevel/MIDI/makefile @@ -119,13 +119,12 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -136,7 +135,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.c b/Demos/Device/LowLevel/MassStorage/MassStorage.c index 72a230219..62c7f21da 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.c +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.c @@ -37,12 +37,6 @@ #define INCLUDE_FROM_MASSSTORAGE_C
#include "MassStorage.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_MassStorage , .TaskStatus = TASK_STOP },
-};
-
/* Global Variables */
/** Structure to hold the latest Command Block Wrapper issued by the host, containing a SCSI command to execute. */
CommandBlockWrapper_t CommandBlock;
@@ -58,6 +52,20 @@ volatile bool IsMassStoreReset = false; */
int main(void)
{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ MassStorage_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -68,28 +76,17 @@ int main(void) /* Hardware Initialization */
LEDs_Init();
Dataflash_Init(SPI_SPEED_FCPU_DIV_2);
+ USB_Init();
/* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections();
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
- USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs. */
void EVENT_USB_Connect(void)
{
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
/* Reset the MSReset flag upon connection */
IsMassStoreReset = false;
@@ -100,11 +97,8 @@ void EVENT_USB_Connect(void) */
void EVENT_USB_Disconnect(void)
{
- /* Stop running mass storage task */
- Scheduler_SetTaskMode(USB_MassStorage, TASK_STOP);
-
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
@@ -122,10 +116,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_DOUBLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
-
- /* Start mass storage task */
- Scheduler_SetTaskMode(USB_MassStorage, TASK_RUN);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -170,43 +161,10 @@ void EVENT_USB_UnhandledControlPacket(void) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the MassStorage_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- case Status_CommandBlockError:
- LEDMask = (LEDS_LED1);
- break;
- case Status_ProcessingCommandBlock:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Task to manage the Mass Storage interface, reading in Command Block Wrappers from the host, processing the SCSI commands they
* contain, and returning Command Status Wrappers back to the host to indicate the success or failure of the last issued command.
*/
-TASK(USB_MassStorage)
+void MassStorage_Task(void)
{
/* Check if the USB System is connected to a Host */
if (USB_IsConnected)
@@ -216,9 +174,9 @@ TASK(USB_MassStorage) /* Check to see if a command from the host has been issued */
if (Endpoint_IsReadWriteAllowed())
- {
+ {
/* Indicate busy */
- UpdateStatus(Status_ProcessingCommandBlock);
+ LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Process sent command block from the host */
if (ReadInCommandBlock())
@@ -260,12 +218,12 @@ TASK(USB_MassStorage) }
/* Indicate ready */
- UpdateStatus(Status_USBReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
else
{
/* Indicate error reading in the command block from the host */
- UpdateStatus(Status_CommandBlockError);
+ LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
}
}
diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.h b/Demos/Device/LowLevel/MassStorage/MassStorage.h index cbd3cd931..81fba0000 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.h +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.h @@ -46,11 +46,10 @@ #include "Lib/SCSI.h"
#include "Lib/DataflashManager.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Drivers/Board/Dataflash.h> // Dataflash chip driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/LEDs.h>
+ #include <LUFA/Drivers/Board/Dataflash.h>
/* Macros: */
/** Mass Storage Class specific request to reset the Mass Storage interface, ready for the next command. */
@@ -82,6 +81,21 @@ /** Mask for a Command Block Wrapper's flags attribute to specify a command with data sent from device-to-host. */
#define COMMAND_DIRECTION_DATA_IN (1 << 7)
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is busy. */
+ #define LEDMASK_USB_BUSY (LEDS_LED2)
+
/* Type defines: */
/** Type define for a Command Block Wrapper, used in the Mass Storage Bulk-Only Transport protocol. */
typedef struct
@@ -112,33 +126,21 @@ Command_Fail = 1, /**< Command failed to complete - host may check the exact error via a SCSI REQUEST SENSE command */
Phase_Error = 2 /**< Command failed due to being invalid in the current phase */
};
-
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum MassStorage_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- Status_CommandBlockError = 3, /**< Processing a SCSI command block from the host */
- Status_ProcessingCommandBlock = 4, /**< Error during the processing of a SCSI command block from the host */
- };
/* Global Variables: */
extern CommandBlockWrapper_t CommandBlock;
extern CommandStatusWrapper_t CommandStatus;
extern volatile bool IsMassStoreReset;
-
- /* Task Definitions: */
- TASK(USB_MassStorage);
/* Function Prototypes: */
+ void SetupHardware(void);
+ void MassStorage_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
- void UpdateStatus(uint8_t CurrentStatus);
-
#if defined(INCLUDE_FROM_MASSSTORAGE_C)
static bool ReadInCommandBlock(void);
static void ReturnCommandStatus(void);
diff --git a/Demos/Device/LowLevel/MassStorage/makefile b/Demos/Device/LowLevel/MassStorage/makefile index 93f895727..77993d04a 100644 --- a/Demos/Device/LowLevel/MassStorage/makefile +++ b/Demos/Device/LowLevel/MassStorage/makefile @@ -119,7 +119,7 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
@@ -127,7 +127,6 @@ SRC = $(TARGET).c \ Descriptors.c \
Lib/SCSI.c \
Lib/DataflashManager.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -138,7 +137,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/Mouse/Mouse.c b/Demos/Device/LowLevel/Mouse/Mouse.c index 32b12fc61..422153672 100644 --- a/Demos/Device/LowLevel/Mouse/Mouse.c +++ b/Demos/Device/LowLevel/Mouse/Mouse.c @@ -36,13 +36,6 @@ #include "Mouse.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = USB_Mouse_Report , .TaskStatus = TASK_STOP },
-};
-
/* Global Variables */
/** Indicates what report mode the host has requested, true for normal HID reporting mode, false for special boot
* protocol reporting mode.
@@ -66,6 +59,20 @@ uint16_t IdleMSRemaining = 0; */
int main(void)
{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ Mouse_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -77,24 +84,13 @@ int main(void) Joystick_Init();
LEDs_Init();
Buttons_Init();
+ USB_Init();
/* Millisecond timer initialization, with output compare interrupt enabled for the idle timing */
OCR0A = 0x7D;
TCCR0A = (1 << WGM01);
TCCR0B = ((1 << CS01) | (1 << CS00));
TIMSK0 = (1 << OCIE0A);
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
- USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
@@ -102,11 +98,8 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
/* Default to report protocol on connect */
UsingReportProtocol = true;
@@ -117,12 +110,8 @@ void EVENT_USB_Connect(void) */
void EVENT_USB_Disconnect(void)
{
- /* Stop running mouse reporting and USB management tasks */
- Scheduler_SetTaskMode(USB_Mouse_Report, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
-
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
@@ -136,10 +125,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_SINGLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
-
- /* Start running mouse reporting task */
- Scheduler_SetTaskMode(USB_Mouse_Report, TASK_RUN);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -321,35 +307,8 @@ void SendNextReport(void) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the Mouse_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Task to manage HID report generation and transmission to the host, when in report mode. */
-TASK(USB_Mouse_Report)
+void Mouse_Task(void)
{
/* Check if the USB system is connected to a host */
if (USB_IsConnected)
diff --git a/Demos/Device/LowLevel/Mouse/Mouse.h b/Demos/Device/LowLevel/Mouse/Mouse.h index 65879da8e..b9460b347 100644 --- a/Demos/Device/LowLevel/Mouse/Mouse.h +++ b/Demos/Device/LowLevel/Mouse/Mouse.h @@ -46,15 +46,11 @@ #include "Descriptors.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/Joystick.h> // Joystick driver
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Drivers/Board/Buttons.h> // Board Buttons driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
-
- /* Task Definitions: */
- TASK(USB_Mouse_Report);
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/Joystick.h>
+ #include <LUFA/Drivers/Board/LEDs.h>
+ #include <LUFA/Drivers/Board/Buttons.h>
/* Macros: */
/** Idle period indicating that reports should be sent only when the inputs have changed */
@@ -78,6 +74,18 @@ /** HID Class specific request to set the current HID protocol in use, either report or boot. */
#define REQ_SetProtocol 0x0B
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
+
/* Type Defines: */
/** Type define for the mouse HID report structure, for creating and sending HID reports to the host PC.
* This mirrors the layout described to the host in the HID report descriptor, in Descriptors.c.
@@ -88,17 +96,11 @@ int8_t X; /**< Current mouse delta X movement, as a signed 8-bit integer */
int8_t Y; /**< Current mouse delta Y movement, as a signed 8-bit integer */
} USB_MouseReport_Data_t;
-
- /* Enums: */
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum Mouse_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- };
/* Function Prototypes: */
+ void SetupHardware(void);
+ void Mouse_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
diff --git a/Demos/Device/LowLevel/Mouse/makefile b/Demos/Device/LowLevel/Mouse/makefile index 632bf91ae..314148a14 100644 --- a/Demos/Device/LowLevel/Mouse/makefile +++ b/Demos/Device/LowLevel/Mouse/makefile @@ -119,13 +119,12 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -136,7 +135,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
CPPSRC =
diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/ARP.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/ARP.h index 8551df85b..f05d8f093 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/ARP.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/ARP.h @@ -38,9 +38,7 @@ /* Includes: */
#include <avr/io.h>
- #include <string.h>
-
- #include <LUFA/Scheduler/Scheduler.h>
+ #include <string.h> #include "EthernetProtocols.h"
#include "Ethernet.h"
diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c b/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c index f259aad02..e106e5d74 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c @@ -56,7 +56,7 @@ TCP_ConnectionState_t ConnectionStateTable[MAX_TCP_CONNECTIONS]; * level. If an application produces a response, this task constructs the appropriate Ethernet frame and places it into the Ethernet OUT
* buffer for later transmission.
*/
-TASK(TCP_Task)
+void TCP_Task(void)
{
/* Task to hand off TCP packets to and from the listening applications. */
diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.h index d4b72a519..313bd0216 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.h @@ -38,9 +38,7 @@ /* Includes: */
#include <avr/io.h>
- #include <stdbool.h>
-
- #include <LUFA/Scheduler/Scheduler.h>
+ #include <stdbool.h> #include "EthernetProtocols.h"
#include "Ethernet.h"
@@ -230,14 +228,12 @@ uint16_t UrgentPointer; /**< Urgent data pointer */
} TCP_Header_t;
- /* Tasks: */
- TASK(TCP_Task);
-
/* External Variables: */
TCP_PortState_t PortStateTable[MAX_OPEN_TCP_PORTS];
/* Function Prototypes: */
void TCP_Init(void);
+ void TCP_Task(void);
bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*));
uint8_t TCP_GetPortState(uint16_t Port);
bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State);
diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c index b046f7870..e651a1b12 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c +++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c @@ -36,20 +36,33 @@ #include "RNDISEthernet.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = Ethernet_Task , .TaskStatus = TASK_STOP },
- { .Task = TCP_Task , .TaskStatus = TASK_STOP },
- { .Task = RNDIS_Task , .TaskStatus = TASK_STOP },
-};
-
/** Main program entry point. This routine configures the hardware required by the application, then
* starts the scheduler to run the USB management task.
*/
int main(void)
{
+ SetupHardware();
+
+ /* Webserver Initialization */
+ TCP_Init();
+ Webserver_Init();
+
+ printf_P(PSTR("\r\n\r\n****** RNDIS Demo running. ******\r\n"));
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ Ethernet_Task();
+ TCP_Task();
+ RNDIS_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -60,24 +73,7 @@ int main(void) /* Hardware Initialization */
LEDs_Init();
SerialStream_Init(9600, false);
-
- /* Webserver Initialization */
- TCP_Init();
- Webserver_Init();
-
- printf_P(PSTR("\r\n\r\n****** RNDIS Demo running. ******\r\n"));
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
@@ -85,11 +81,8 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
@@ -97,14 +90,8 @@ void EVENT_USB_Connect(void) */
void EVENT_USB_Disconnect(void)
{
- /* Stop running TCP/IP and USB management tasks */
- Scheduler_SetTaskMode(RNDIS_Task, TASK_STOP);
- Scheduler_SetTaskMode(Ethernet_Task, TASK_STOP);
- Scheduler_SetTaskMode(TCP_Task, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
-
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
@@ -126,12 +113,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_SINGLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
-
- /* Start TCP/IP tasks */
- Scheduler_SetTaskMode(RNDIS_Task, TASK_RUN);
- Scheduler_SetTaskMode(Ethernet_Task, TASK_RUN);
- Scheduler_SetTaskMode(TCP_Task, TASK_RUN);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -188,41 +170,11 @@ void EVENT_USB_UnhandledControlPacket(void) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the RNDISEthernet_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- case Status_ProcessingEthernetFrame:
- LEDMask = (LEDS_LED2 | LEDS_LED3);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Task to manage the sending and receiving of encapsulated RNDIS data and notifications. This removes the RNDIS
* wrapper from received Ethernet frames and places them in the FrameIN global buffer, or adds the RNDIS wrapper
* to a frame in the FrameOUT global before sending the buffer contents to the host.
*/
-TASK(RNDIS_Task)
+void RNDIS_Task(void)
{
/* Select the notification endpoint */
Endpoint_SelectEndpoint(CDC_NOTIFICATION_EPNUM);
@@ -317,7 +269,7 @@ TASK(RNDIS_Task) /** Ethernet frame processing task. This task checks to see if a frame has been received, and if so hands off the processing
* of the frame to the Ethernet processing routines.
*/
-TASK(Ethernet_Task)
+void Ethernet_Task(void)
{
/* Task for Ethernet processing. Incoming ethernet frames are loaded into the FrameIN structure, and
outgoing frames should be loaded into the FrameOUT structure. Both structures can only hold a single
@@ -327,12 +279,12 @@ TASK(Ethernet_Task) if (FrameIN.FrameInBuffer)
{
/* Indicate packet processing started */
- UpdateStatus(Status_ProcessingEthernetFrame);
+ LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Process the ethernet frame - replace this with your own Ethernet handler code as desired */
Ethernet_ProcessPacket();
/* Indicate packet processing complete */
- UpdateStatus(Status_USBReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
}
diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h index 703af4003..5cbddee52 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h +++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h @@ -52,16 +52,30 @@ #include "Lib/ARP.h"
#include "Lib/Webserver.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
- #include <LUFA/Drivers/Peripheral/SerialStream.h> // Serial stream driver
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Board/LEDs.h> + #include <LUFA/Drivers/Peripheral/SerialStream.h>
/* Macros: */
/** Notification value to indicate that a frame is ready to be read by the host. */
- #define NOTIF_RESPONSE_AVAILABLE 0x01
+ #define NOTIF_RESPONSE_AVAILABLE 0x01
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is busy. */
+ #define LEDMASK_USB_BUSY (LEDS_LED2)
+
/* Type Defines: */
/** Type define for a RNDIS notification message, for transmission to the RNDIS host via the notification
* Endpoint.
@@ -74,27 +88,15 @@ uint16_t wIndex; /**< Two byte notification index parameter */
uint16_t wLength; /**< Size of data payload following the notification header */
} USB_Notification_t;
-
- /* Enums: */
- /** Enum for the possible status codes for passing to the UpdateStatus() function. */
- enum RNDISEthernet_StatusCodes_t
- {
- Status_USBNotReady = 0, /**< USB is not ready (disconnected from a USB host) */
- Status_USBEnumerating = 1, /**< USB interface is enumerating */
- Status_USBReady = 2, /**< USB interface is connected and ready */
- Status_ProcessingEthernetFrame = 3, /**< Currently processing an ethernet frame from the host */
- };
- /* Tasks: */
- TASK(RNDIS_Task);
- TASK(Ethernet_Task);
-
/* Function Prototypes: */
+ void SetupHardware(void);
+ void RNDIS_Task(void);
+ void Ethernet_Task(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
-
- void UpdateStatus(uint8_t CurrentStatus);
#endif
diff --git a/Demos/Device/LowLevel/RNDISEthernet/makefile b/Demos/Device/LowLevel/RNDISEthernet/makefile index f40c37b05..584cba90c 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/makefile +++ b/Demos/Device/LowLevel/RNDISEthernet/makefile @@ -119,7 +119,7 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
@@ -135,7 +135,6 @@ SRC = $(TARGET).c \ Lib/ARP.c \
Lib/IP.c \
Lib/Webserver.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/Peripheral/SerialStream.c \
$(LUFA_PATH)/LUFA/Drivers/Peripheral/Serial.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
@@ -148,7 +147,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c index 7cef56560..ee4208f19 100644 --- a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c +++ b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c @@ -30,13 +30,6 @@ #include "USBtoSerial.h"
-/* Scheduler Task List */
-TASK_LIST
-{
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- { .Task = CDC_Task , .TaskStatus = TASK_STOP },
-};
-
/* Globals: */
/** Contains the current baud rate and other settings of the virtual serial port.
*
@@ -62,6 +55,24 @@ volatile bool Transmitting = false; */
int main(void)
{
+ SetupHardware();
+
+ /* Ring buffer Initialization */
+ Buffer_Initialize(&Rx_Buffer);
+ Buffer_Initialize(&Tx_Buffer);
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+
+ for (;;)
+ {
+ CDC_Task();
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo's functionality. */
+void SetupHardware(void)
+{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -72,22 +83,7 @@ int main(void) /* Hardware Initialization */
LEDs_Init();
ReconfigureUSART();
-
- /* Ring buffer Initialization */
- Buffer_Initialize(&Rx_Buffer);
- Buffer_Initialize(&Tx_Buffer);
-
- /* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
-
- /* Initialize Scheduler so that it can be used */
- Scheduler_Init();
-
- /* Initialize USB Subsystem */
- USB_Init();
-
- /* Scheduling - routine never returns, so put this last in the main function */
- Scheduler_Start();
+ USB_Init();
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
@@ -95,28 +91,21 @@ int main(void) */
void EVENT_USB_Connect(void)
{
- /* Start USB management task */
- Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
-
/* Indicate USB enumerating */
- UpdateStatus(Status_USBEnumerating);
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops the USB management and CDC management tasks.
*/
void EVENT_USB_Disconnect(void)
-{
- /* Stop running CDC and USB management tasks */
- Scheduler_SetTaskMode(CDC_Task, TASK_STOP);
- Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
-
+{
/* Reset Tx and Rx buffers, device disconnected */
Buffer_Initialize(&Rx_Buffer);
Buffer_Initialize(&Tx_Buffer);
/* Indicate USB not ready */
- UpdateStatus(Status_USBNotReady);
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
@@ -138,10 +127,7 @@ void EVENT_USB_ConfigurationChanged(void) ENDPOINT_BANK_SINGLE);
/* Indicate USB connected and ready */
- UpdateStatus(Status_USBReady);
-
- /* Start CDC task */
- Scheduler_SetTaskMode(CDC_Task, TASK_RUN);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
@@ -207,7 +193,7 @@ void EVENT_USB_UnhandledControlPacket(void) }
/** Task to manage CDC data transmission and reception to and from the host, from and to the physical USART. */
-TASK(CDC_Task)
+void CDC_Task(void)
{
if (USB_IsConnected)
{
@@ -309,33 +295,6 @@ ISR(USART1_RX_vect, ISR_BLOCK) }
}
-/** Function to manage status updates to the user. This is done via LEDs on the given board, if available, but may be changed to
- * log to a serial port, or anything else that is suitable for status updates.
- *
- * \param CurrentStatus Current status of the system, from the USBtoSerial_StatusCodes_t enum
- */
-void UpdateStatus(uint8_t CurrentStatus)
-{
- uint8_t LEDMask = LEDS_NO_LEDS;
-
- /* Set the LED mask to the appropriate LED mask based on the given status code */
- switch (CurrentStatus)
- {
- case Status_USBNotReady:
- LEDMask = (LEDS_LED1);
- break;
- case Status_USBEnumerating:
- LEDMask = (LEDS_LED1 | LEDS_LED2);
- break;
- case Status_USBReady:
- LEDMask = (LEDS_LED2 | LEDS_LED4);
- break;
- }
-
- /* Set the board LEDs to the new LED mask */
- LEDs_SetAllLEDs(LEDMask);
-}
-
/** Reconfigures the USART to match the current serial port settings issued by the host as closely as possible. */
void ReconfigureUSART(void)
{
diff --git a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.h b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.h index 8e7e8aed8..1a4a1cb67 100644 --- a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.h +++ b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.h @@ -46,11 +46,10 @@ #include "Lib/RingBuff.h"
- #include <LUFA/Version.h> // Library Version Information
- #include <LUFA/Drivers/USB/USB.h> // USB Functionality
- #include <LUFA/Drivers/Peripheral/Serial.h> // USART driver
- #include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Peripheral/Serial.h>
+ #include <LUFA/Drivers/Board/LEDs.h> /* Macros: */
/** CDC Class specific request to get the current virtual serial port configuration settings. */
@@ -112,6 +111,18 @@ * to indicate that a data overrun error has occurred on the virtual serial port.
*/
#define CONTROL_LINE_IN_OVERRUNERROR (1 << 6)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
/* Type Defines: */
/** Type define for the virtual serial port line encoding settings, for storing the current USART configuration
@@ -170,16 +181,14 @@ Status_USBReady = 2, /**< USB interface is connected and ready */
};
- /* Tasks: */
- TASK(CDC_Task);
-
/* Function Prototypes: */
+ void SetupHardware(void);
+ void CDC_Task(void);
+ void ReconfigureUSART(void);
+
void EVENT_USB_Connect(void);
void EVENT_USB_Disconnect(void);
void EVENT_USB_ConfigurationChanged(void);
void EVENT_USB_UnhandledControlPacket(void);
- void ReconfigureUSART(void);
- void UpdateStatus(uint8_t CurrentStatus);
-
#endif
diff --git a/Demos/Device/LowLevel/USBtoSerial/makefile b/Demos/Device/LowLevel/USBtoSerial/makefile index 708e87246..f1491a52a 100644 --- a/Demos/Device/LowLevel/USBtoSerial/makefile +++ b/Demos/Device/LowLevel/USBtoSerial/makefile @@ -119,14 +119,13 @@ OBJDIR = . # Path to the LUFA library
-LUFA_PATH = ../../..
+LUFA_PATH = ../../../..
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c \
Descriptors.c \
Lib/RingBuff.c \
- $(LUFA_PATH)/LUFA/Scheduler/Scheduler.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \
@@ -137,7 +136,6 @@ SRC = $(TARGET).c \ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \
$(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \
- $(LUFA_PATH)/LUFA/Drivers/USB/Class/HIDParser.c \
# List C++ source files here. (C dependencies are automatically generated.)
diff --git a/LUFA.pnproj b/LUFA.pnproj index e3edb8aaa..2f246b3de 100644 --- a/LUFA.pnproj +++ b/LUFA.pnproj @@ -1 +1 @@ -<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File></Folder><Folder name="CDC"><File path="Demos\Device\ClassDriver\CDC\CDC.c"></File><File path="Demos\Device\ClassDriver\CDC\CDC.h"></File><File path="Demos\Device\ClassDriver\CDC\CDC.txt"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\CDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\CDC\LUFA CDC.inf"></File><File path="Demos\Device\ClassDriver\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualCDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.c"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.h"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.txt"></File><File path="Demos\Device\ClassDriver\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\ClassDriver\DualCDC\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Demos\Device\ClassDriver\USBtoSerial\Lib\RingBuff.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Demos\Device\ClassDriver\USBtoSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Demos\Device\ClassDriver\USBtoSerial\makefile"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.h"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.txt"></File></Folder></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File></Folder><Folder name="CDC"><File path="Demos\Device\LowLevel\CDC\CDC.c"></File><File path="Demos\Device\LowLevel\CDC\CDC.h"></File><File path="Demos\Device\LowLevel\CDC\CDC.txt"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\CDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\CDC\LUFA CDC.inf"></File><File path="Demos\Device\LowLevel\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\LowLevel\DualCDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualCDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualCDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.c"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.h"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.txt"></File><File path="Demos\Device\LowLevel\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\LowLevel\DualCDC\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDISConstants.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Demos\Device\LowLevel\USBtoSerial\Lib\RingBuff.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Demos\Device\LowLevel\USBtoSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\USBtoSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Demos\Device\LowLevel\USBtoSerial\makefile"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.h"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.txt"></File></Folder></Folder><Folder name="Incomplete"><Folder name="SideShow"><File path="Demos\Device\Incomplete\Sideshow\SideshowContent.h"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowContent.c"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"></Folder><Folder name="LowLevel"></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothStack.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="OTG"><Folder name="TestApp"><File path="Demos\OTG\TestApp\Descriptors.c"></File><File path="Demos\OTG\TestApp\Descriptors.h"></File><File path="Demos\OTG\TestApp\Doxygen.conf"></File><File path="Demos\OTG\TestApp\makefile"></File><File path="Demos\OTG\TestApp\TestApp.c"></File><File path="Demos\OTG\TestApp\TestApp.h"></File><File path="Demos\OTG\TestApp\TestApp.txt"></File><File path="Demos\OTG\TestApp\TestEvents.c"></File><File path="Demos\OTG\TestApp\TestEvents.h"></File></Folder><File path="Demos\OTG\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\FunctionAttributes.h"></File><File path="LUFA\Common\BoardTypes.h"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="LowLevel"><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.c"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.h"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.c"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.h"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\Device.h"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.c"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.h"></File><File path="LUFA\Drivers\USB\LowLevel\Host.c"></File><File path="LUFA\Drivers\USB\LowLevel\Host.h"></File><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\OTG.h"></File></Folder><Folder name="HighLevel"><File path="LUFA\Drivers\USB\HighLevel\USBTask.h"></File><File path="LUFA\Drivers\USB\HighLevel\Events.c"></File><File path="LUFA\Drivers\USB\HighLevel\Events.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.c"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBTask.c"></File><File path="LUFA\Drivers\USB\HighLevel\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\HighLevel\StdRequestType.h"></File><File path="LUFA\Drivers\USB\HighLevel\StreamCallbacks.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBMode.h"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.h"></File></Folder><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\HID.c"></File><File path="LUFA\Drivers\USB\Class\Device\HID.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISConstants.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDReportData.h"></File></Folder></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File></Folder><Folder name="Board"><Folder name="USBKEY"><File path="LUFA\Drivers\Board\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\USBKEY\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\USBKEY\LEDs.h"></File><File path="LUFA\Drivers\Board\USBKEY\Buttons.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\STK526\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\STK526\LEDs.h"></File><File path="LUFA\Drivers\Board\STK526\Buttons.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\STK525\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\STK525\LEDs.h"></File><File path="LUFA\Drivers\Board\STK525\Buttons.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\ATAVRUSBRF01\LEDs.h"></File><File path="LUFA\Drivers\Board\ATAVRUSBRF01\Buttons.h"></File></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AT90USBXXX67"><File path="LUFA\Drivers\Peripheral\AT90USBXXX67\ADC.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\Serial.c"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialStream.c"></File><File path="LUFA\Drivers\Peripheral\SerialStream.h"></File></Folder></Folder><Folder name="DriverStubs"><File path="LUFA\DriverStubs\Dataflash.h"></File><File path="LUFA\DriverStubs\Joystick.h"></File><File path="LUFA\DriverStubs\LEDs.h"></File><File path="LUFA\DriverStubs\Buttons.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\BuildingLinkableLibraries.txt"></File><File path="LUFA\ChangeLog.txt"></File><File path="LUFA\CompileTimeTokens.txt"></File><File path="LUFA\DirectorySummaries.txt"></File><File path="LUFA\Doxygen.conf"></File><File path="LUFA\GettingStarted.txt"></File><File path="LUFA\Groups.txt"></File><File path="LUFA\LUFAPoweredProjects.txt"></File><File path="LUFA\MainPage.txt"></File><File path="LUFA\MigrationInformation.txt"></File><File path="LUFA\VIDAndPIDValues.txt"></File><File path="LUFA\WritingBoardDrivers.txt"></File></Folder><Folder name="Projects"><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File></Folder><File path="Projects\makefile"></File></Folder><Folder name="Bootloaders"><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File></Folder><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File></Folder><Folder name="TeensyHID"><File path="Bootloaders\TeensyHID\Descriptors.c"></File><File path="Bootloaders\TeensyHID\Descriptors.h"></File><File path="Bootloaders\TeensyHID\makefile"></File><File path="Bootloaders\TeensyHID\TeensyHID.c"></File><File path="Bootloaders\TeensyHID\TeensyHID.h"></File><File path="Bootloaders\TeensyHID\TeensyHID.txt"></File></Folder><File path="Bootloaders\makefile"></File></Folder><File path="makefile"></File></Project>
\ No newline at end of file +<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File></Folder><Folder name="CDC"><File path="Demos\Device\ClassDriver\CDC\CDC.c"></File><File path="Demos\Device\ClassDriver\CDC\CDC.h"></File><File path="Demos\Device\ClassDriver\CDC\CDC.txt"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\CDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\CDC\LUFA CDC.inf"></File><File path="Demos\Device\ClassDriver\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualCDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.c"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.h"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.txt"></File><File path="Demos\Device\ClassDriver\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\ClassDriver\DualCDC\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Demos\Device\ClassDriver\USBtoSerial\Lib\RingBuff.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Demos\Device\ClassDriver\USBtoSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Demos\Device\ClassDriver\USBtoSerial\makefile"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.h"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.txt"></File></Folder></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File></Folder><Folder name="CDC"><File path="Demos\Device\LowLevel\CDC\CDC.c"></File><File path="Demos\Device\LowLevel\CDC\CDC.h"></File><File path="Demos\Device\LowLevel\CDC\CDC.txt"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\CDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\CDC\LUFA CDC.inf"></File><File path="Demos\Device\LowLevel\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\LowLevel\DualCDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualCDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualCDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.c"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.h"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.txt"></File><File path="Demos\Device\LowLevel\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\LowLevel\DualCDC\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDISConstants.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Demos\Device\LowLevel\USBtoSerial\Lib\RingBuff.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Demos\Device\LowLevel\USBtoSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\USBtoSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Demos\Device\LowLevel\USBtoSerial\makefile"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.h"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.txt"></File></Folder></Folder><Folder name="Incomplete"><Folder name="SideShow"><File path="Demos\Device\Incomplete\Sideshow\SideshowContent.h"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowContent.c"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="CDCHost"><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.c"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.h"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.txt"></File><File path="Demos\Host\ClassDriver\CDCHost\ConfigDescriptor.c"></File><File path="Demos\Host\ClassDriver\CDCHost\ConfigDescriptor.h"></File><File path="Demos\Host\ClassDriver\CDCHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\CDCHost\makefile"></File></Folder><Folder name="GenericHIDHost"><File path="Demos\Host\ClassDriver\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\ClassDriver\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\ClassDriver\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\ClassDriver\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\ClassDriver\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\ClassDriver\GenericHIDHost\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\ClassDriver\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\ClassDriver\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\ClassDriver\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\ClassDriver\KeyboardHost\makefile"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\ClassDriver\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\Lib\MassStoreCommands.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Host\ClassDriver\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MassStorageHost\makefile"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\ClassDriver\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\ClassDriver\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\ClassDriver\MouseHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHost\makefile"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.c"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.h"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\ClassDriver\StillImageHost\Lib\PIMACodes.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\Lib\StillImageCommands.h"></File></Folder><File path="Demos\Host\ClassDriver\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\StillImageHost\makefile"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.txt"></File></Folder></Folder><Folder name="LowLevel"><Folder name="CDCHost"><File path="Demos\Host\LowLevel\CDCHost\CDCHost.c"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.h"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.txt"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\CDCHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\CDCHost\makefile"></File></Folder><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File></Folder></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothStack.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="OTG"><Folder name="TestApp"><File path="Demos\OTG\TestApp\Descriptors.c"></File><File path="Demos\OTG\TestApp\Descriptors.h"></File><File path="Demos\OTG\TestApp\Doxygen.conf"></File><File path="Demos\OTG\TestApp\makefile"></File><File path="Demos\OTG\TestApp\TestApp.c"></File><File path="Demos\OTG\TestApp\TestApp.h"></File><File path="Demos\OTG\TestApp\TestApp.txt"></File><File path="Demos\OTG\TestApp\TestEvents.c"></File><File path="Demos\OTG\TestApp\TestEvents.h"></File></Folder><File path="Demos\OTG\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\FunctionAttributes.h"></File><File path="LUFA\Common\BoardTypes.h"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="LowLevel"><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.c"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.h"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.c"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.h"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\Device.h"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.c"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.h"></File><File path="LUFA\Drivers\USB\LowLevel\Host.c"></File><File path="LUFA\Drivers\USB\LowLevel\Host.h"></File><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\OTG.h"></File></Folder><Folder name="HighLevel"><File path="LUFA\Drivers\USB\HighLevel\USBTask.h"></File><File path="LUFA\Drivers\USB\HighLevel\Events.c"></File><File path="LUFA\Drivers\USB\HighLevel\Events.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.c"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBTask.c"></File><File path="LUFA\Drivers\USB\HighLevel\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\HighLevel\StdRequestType.h"></File><File path="LUFA\Drivers\USB\HighLevel\StreamCallbacks.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBMode.h"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.h"></File></Folder><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\HID.c"></File><File path="LUFA\Drivers\USB\Class\Device\HID.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISConstants.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDReportData.h"></File></Folder></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File></Folder><Folder name="Board"><Folder name="USBKEY"><File path="LUFA\Drivers\Board\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\USBKEY\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\USBKEY\LEDs.h"></File><File path="LUFA\Drivers\Board\USBKEY\Buttons.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\STK526\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\STK526\LEDs.h"></File><File path="LUFA\Drivers\Board\STK526\Buttons.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\STK525\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\STK525\LEDs.h"></File><File path="LUFA\Drivers\Board\STK525\Buttons.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\ATAVRUSBRF01\LEDs.h"></File><File path="LUFA\Drivers\Board\ATAVRUSBRF01\Buttons.h"></File></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AT90USBXXX67"><File path="LUFA\Drivers\Peripheral\AT90USBXXX67\ADC.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\Serial.c"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialStream.c"></File><File path="LUFA\Drivers\Peripheral\SerialStream.h"></File></Folder></Folder><Folder name="DriverStubs"><File path="LUFA\DriverStubs\Dataflash.h"></File><File path="LUFA\DriverStubs\Joystick.h"></File><File path="LUFA\DriverStubs\LEDs.h"></File><File path="LUFA\DriverStubs\Buttons.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\BuildingLinkableLibraries.txt"></File><File path="LUFA\ChangeLog.txt"></File><File path="LUFA\CompileTimeTokens.txt"></File><File path="LUFA\DirectorySummaries.txt"></File><File path="LUFA\Doxygen.conf"></File><File path="LUFA\GettingStarted.txt"></File><File path="LUFA\Groups.txt"></File><File path="LUFA\LUFAPoweredProjects.txt"></File><File path="LUFA\MainPage.txt"></File><File path="LUFA\MigrationInformation.txt"></File><File path="LUFA\VIDAndPIDValues.txt"></File><File path="LUFA\WritingBoardDrivers.txt"></File></Folder><Folder name="Projects"><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File></Folder><File path="Projects\makefile"></File></Folder><Folder name="Bootloaders"><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File></Folder><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File></Folder><Folder name="TeensyHID"><File path="Bootloaders\TeensyHID\Descriptors.c"></File><File path="Bootloaders\TeensyHID\Descriptors.h"></File><File path="Bootloaders\TeensyHID\makefile"></File><File path="Bootloaders\TeensyHID\TeensyHID.c"></File><File path="Bootloaders\TeensyHID\TeensyHID.h"></File><File path="Bootloaders\TeensyHID\TeensyHID.txt"></File></Folder><File path="Bootloaders\makefile"></File></Folder><File path="makefile"></File></Project>
\ No newline at end of file diff --git a/LUFA/ChangeLog.txt b/LUFA/ChangeLog.txt index 3c4883075..94e8da087 100644 --- a/LUFA/ChangeLog.txt +++ b/LUFA/ChangeLog.txt @@ -5,14 +5,13 @@ */
========== TODO: ===========
- - Document new device class drivers (in progress)
+ - Fix bootloaders - make compatible with smaller USB AVRS (USB_IsConnected, RAMPZ)
+ - Document new device class drivers
- Made new host class drivers
- Document new host class drivers
- Convert Host mode demos to class drivers
- - Add in old Host mode demos, convert to schedulerless
- - Add in incomplete host mode demos
+ - Convert Host mode demos to schedulerless
- Add standardized descriptor names to class driver structures, controlled by USE_NONSTANDARD_DESCRIPTOR_NAMES
- - Remake AVRStudio projects to reflect file structure changes
============================
/** \page Page_ChangeLog Project Changelog
|