From 359fbfe14d00ab378f85a36664820ea9ba538c3f Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 10 May 2012 19:24:58 +0000 Subject: Add branch for the conversion of demos to use standard C header files for configuration, rather than makefile defined macros. --- Demos/Device/LowLevel/AudioInput/AudioInput.c | 9 ++++---- Demos/Device/LowLevel/AudioInput/Descriptors.c | 2 +- Demos/Device/LowLevel/AudioInput/Descriptors.h | 11 ++++----- Demos/Device/LowLevel/AudioOutput/AudioOutput.c | 9 ++++---- Demos/Device/LowLevel/AudioOutput/Descriptors.c | 2 +- Demos/Device/LowLevel/AudioOutput/Descriptors.h | 11 ++++----- .../LowLevel/DualVirtualSerial/Descriptors.c | 20 ++++++++--------- .../LowLevel/DualVirtualSerial/Descriptors.h | 24 ++++++++++---------- .../LowLevel/DualVirtualSerial/DualVirtualSerial.c | 26 +++++++++------------- Demos/Device/LowLevel/GenericHID/Descriptors.c | 8 +++---- Demos/Device/LowLevel/GenericHID/Descriptors.h | 8 +++---- Demos/Device/LowLevel/GenericHID/GenericHID.c | 10 ++++----- Demos/Device/LowLevel/Joystick/Descriptors.c | 4 ++-- Demos/Device/LowLevel/Joystick/Descriptors.h | 4 ++-- Demos/Device/LowLevel/Joystick/Joystick.c | 5 ++--- Demos/Device/LowLevel/Keyboard/Descriptors.c | 8 +++---- Demos/Device/LowLevel/Keyboard/Descriptors.h | 8 +++---- Demos/Device/LowLevel/Keyboard/Keyboard.c | 10 ++++----- Demos/Device/LowLevel/KeyboardMouse/Descriptors.c | 12 +++++----- Demos/Device/LowLevel/KeyboardMouse/Descriptors.h | 12 +++++----- .../Device/LowLevel/KeyboardMouse/KeyboardMouse.c | 15 +++++-------- Demos/Device/LowLevel/MIDI/Descriptors.c | 8 +++---- Demos/Device/LowLevel/MIDI/Descriptors.h | 8 +++---- Demos/Device/LowLevel/MIDI/MIDI.c | 15 +++++-------- Demos/Device/LowLevel/MassStorage/Descriptors.c | 8 +++---- Demos/Device/LowLevel/MassStorage/Descriptors.h | 8 +++---- Demos/Device/LowLevel/MassStorage/MassStorage.c | 24 +++++++++----------- Demos/Device/LowLevel/Mouse/Descriptors.c | 4 ++-- Demos/Device/LowLevel/Mouse/Descriptors.h | 14 ++++++------ Demos/Device/LowLevel/Mouse/Mouse.c | 5 ++--- Demos/Device/LowLevel/RNDISEthernet/Descriptors.c | 10 ++++----- Demos/Device/LowLevel/RNDISEthernet/Descriptors.h | 12 +++++----- .../Device/LowLevel/RNDISEthernet/RNDISEthernet.c | 15 +++++-------- Demos/Device/LowLevel/VirtualSerial/Descriptors.c | 10 ++++----- Demos/Device/LowLevel/VirtualSerial/Descriptors.h | 12 +++++----- .../Device/LowLevel/VirtualSerial/VirtualSerial.c | 13 +++++------ 36 files changed, 175 insertions(+), 209 deletions(-) (limited to 'Demos/Device/LowLevel') diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c index 60eeaf64c..eb9c4b57c 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.c +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c @@ -118,8 +118,7 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup Audio Stream Endpoint */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPNUM, EP_TYPE_ISOCHRONOUS, ENDPOINT_DIR_IN, - AUDIO_STREAM_EPSIZE, ENDPOINT_BANK_DOUBLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPADDR, EP_TYPE_ISOCHRONOUS, AUDIO_STREAM_EPSIZE, 2); /* Indicate endpoint configuration success or failure */ LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR); @@ -165,7 +164,7 @@ void EVENT_USB_Device_ControlRequest(void) uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8); /* Only handle SET CURRENT requests to the audio endpoint's sample frequency property */ - if ((EndpointAddress == (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)) + if ((EndpointAddress == AUDIO_STREAM_EPADDR) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)) { uint8_t SampleRate[3]; @@ -190,7 +189,7 @@ void EVENT_USB_Device_ControlRequest(void) uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8); /* Only handle GET CURRENT requests to the audio endpoint's sample frequency property */ - if ((EndpointAddress == (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)) + if ((EndpointAddress == AUDIO_STREAM_EPADDR) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)) { uint8_t SampleRate[3]; @@ -215,7 +214,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK) uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint(); /* Select the audio stream endpoint */ - Endpoint_SelectEndpoint(AUDIO_STREAM_EPNUM); + Endpoint_SelectEndpoint(AUDIO_STREAM_EPADDR); /* Check if the current endpoint can be written to and that the audio interface is enabled */ if (Endpoint_IsINReady() && StreamingAudioInterfaceSelected) diff --git a/Demos/Device/LowLevel/AudioInput/Descriptors.c b/Demos/Device/LowLevel/AudioInput/Descriptors.c index 0b1652246..ee37affd2 100644 --- a/Demos/Device/LowLevel/AudioInput/Descriptors.c +++ b/Demos/Device/LowLevel/AudioInput/Descriptors.c @@ -220,7 +220,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM), + .EndpointAddress = AUDIO_STREAM_EPADDR, .Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = AUDIO_STREAM_EPSIZE, .PollingIntervalMS = 0x01 diff --git a/Demos/Device/LowLevel/AudioInput/Descriptors.h b/Demos/Device/LowLevel/AudioInput/Descriptors.h index ac0a536de..4680294c9 100644 --- a/Demos/Device/LowLevel/AudioInput/Descriptors.h +++ b/Demos/Device/LowLevel/AudioInput/Descriptors.h @@ -42,14 +42,11 @@ #include /* Macros: */ - /** Endpoint number of the Audio isochronous streaming data endpoint. */ - #define AUDIO_STREAM_EPNUM 1 + /** Endpoint address of the Audio isochronous streaming data IN endpoint. */ + #define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_IN | 1) - /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires - * at least 192 bytes for correct output, thus the smaller 128 byte maximum endpoint size on some of the smaller - * USB AVR models will result in unavoidable distorted output. - */ - #define AUDIO_STREAM_EPSIZE ENDPOINT_MAX_SIZE(AUDIO_STREAM_EPNUM) + /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. */ + #define AUDIO_STREAM_EPSIZE 256 /* Type Defines: */ /** Type define for the device configuration descriptor structure. This must be defined in the diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c index 813108a71..ebf4ad51d 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c @@ -144,8 +144,7 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup Audio Stream Endpoint */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPNUM, EP_TYPE_ISOCHRONOUS, ENDPOINT_DIR_OUT, - AUDIO_STREAM_EPSIZE, ENDPOINT_BANK_DOUBLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPADDR, EP_TYPE_ISOCHRONOUS, AUDIO_STREAM_EPSIZE, 2); /* Indicate endpoint configuration success or failure */ LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR); @@ -191,7 +190,7 @@ void EVENT_USB_Device_ControlRequest(void) uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8); /* Only handle SET CURRENT requests to the audio endpoint's sample frequency property */ - if ((EndpointAddress == (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)) + if ((EndpointAddress == AUDIO_STREAM_EPADDR) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)) { uint8_t SampleRate[3]; @@ -216,7 +215,7 @@ void EVENT_USB_Device_ControlRequest(void) uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8); /* Only handle GET CURRENT requests to the audio endpoint's sample frequency property */ - if ((EndpointAddress == (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)) + if ((EndpointAddress == AUDIO_STREAM_EPADDR) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)) { uint8_t SampleRate[3]; @@ -241,7 +240,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK) uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint(); /* Select the audio stream endpoint */ - Endpoint_SelectEndpoint(AUDIO_STREAM_EPNUM); + Endpoint_SelectEndpoint(AUDIO_STREAM_EPADDR); /* Check if the current endpoint can be read from (contains a packet) and the host is sending data */ if (Endpoint_IsOUTReceived() && StreamingAudioInterfaceSelected) diff --git a/Demos/Device/LowLevel/AudioOutput/Descriptors.c b/Demos/Device/LowLevel/AudioOutput/Descriptors.c index 7f12fc72c..12a5a1562 100644 --- a/Demos/Device/LowLevel/AudioOutput/Descriptors.c +++ b/Demos/Device/LowLevel/AudioOutput/Descriptors.c @@ -220,7 +220,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM), + .EndpointAddress = AUDIO_STREAM_EPADDR, .Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = AUDIO_STREAM_EPSIZE, .PollingIntervalMS = 0x01 diff --git a/Demos/Device/LowLevel/AudioOutput/Descriptors.h b/Demos/Device/LowLevel/AudioOutput/Descriptors.h index ac0a536de..e0c756744 100644 --- a/Demos/Device/LowLevel/AudioOutput/Descriptors.h +++ b/Demos/Device/LowLevel/AudioOutput/Descriptors.h @@ -42,14 +42,11 @@ #include /* Macros: */ - /** Endpoint number of the Audio isochronous streaming data endpoint. */ - #define AUDIO_STREAM_EPNUM 1 + /** Endpoint address of the Audio isochronous streaming data OUT endpoint. */ + #define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_OUT | 1) - /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires - * at least 192 bytes for correct output, thus the smaller 128 byte maximum endpoint size on some of the smaller - * USB AVR models will result in unavoidable distorted output. - */ - #define AUDIO_STREAM_EPSIZE ENDPOINT_MAX_SIZE(AUDIO_STREAM_EPNUM) + /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. */ + #define AUDIO_STREAM_EPSIZE 256 /* Type Defines: */ /** Type define for the device configuration descriptor structure. This must be defined in the diff --git a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c index 5df6808c6..1a4860ad3 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c +++ b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c @@ -157,7 +157,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | CDC1_NOTIFICATION_EPNUM), + .EndpointAddress = CDC1_NOTIFICATION_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_NOTIFICATION_EPSIZE, .PollingIntervalMS = 0xFF @@ -183,20 +183,20 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_OUT | CDC1_RX_EPNUM), + .EndpointAddress = CDC1_RX_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .CDC1_DataInEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | CDC1_TX_EPNUM), + .EndpointAddress = CDC1_TX_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .CDC2_IAD = @@ -258,7 +258,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | CDC2_NOTIFICATION_EPNUM), + .EndpointAddress = CDC2_NOTIFICATION_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_NOTIFICATION_EPSIZE, .PollingIntervalMS = 0xFF @@ -284,20 +284,20 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_OUT | CDC2_RX_EPNUM), + .EndpointAddress = CDC2_RX_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .CDC2_DataInEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | CDC2_TX_EPNUM), + .EndpointAddress = CDC2_TX_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 } }; diff --git a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h index 0a172d83d..fee2c8552 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h +++ b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h @@ -42,23 +42,23 @@ #include /* Macros: */ - /** Endpoint number of the first CDC interface's device-to-host data IN endpoint. */ - #define CDC1_TX_EPNUM 1 + /** Endpoint address of the first CDC interface's device-to-host data IN endpoint. */ + #define CDC1_TX_EPADDR (ENDPOINT_DIR_IN | 1) - /** Endpoint number of the first CDC interface's host-to-device data OUT endpoint. */ - #define CDC1_RX_EPNUM 2 + /** Endpoint address of the first CDC interface's host-to-device data OUT endpoint. */ + #define CDC1_RX_EPADDR (ENDPOINT_DIR_OUT | 2) - /** Endpoint number of the first CDC interface's device-to-host notification IN endpoint. */ - #define CDC1_NOTIFICATION_EPNUM 3 + /** Endpoint address of the first CDC interface's device-to-host notification IN endpoint. */ + #define CDC1_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 3) - /** Endpoint number of the second CDC interface's device-to-host data IN endpoint. */ - #define CDC2_TX_EPNUM 4 + /** Endpoint address of the second CDC interface's device-to-host data IN endpoint. */ + #define CDC2_TX_EPADDR (ENDPOINT_DIR_IN | 4) - /** Endpoint number of the second CDC interface's host-to-device data OUT endpoint. */ - #define CDC2_RX_EPNUM 5 + /** Endpoint address of the second CDC interface's host-to-device data OUT endpoint. */ + #define CDC2_RX_EPADDR (ENDPOINT_DIR_OUT | 5) - /** Endpoint number of the second CDC interface's device-to-host notification IN endpoint. */ - #define CDC2_NOTIFICATION_EPNUM 6 + /** Endpoint address of the second CDC interface's device-to-host notification IN endpoint. */ + #define CDC2_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 6) /** Size in bytes of the CDC device-to-host notification IN endpoints. */ #define CDC_NOTIFICATION_EPSIZE 8 diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c index 9208b2c44..2db6f4e23 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c +++ b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c @@ -123,20 +123,14 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup first CDC Interface's Endpoints */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN, - CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT, - CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, - CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1); /* Setup second CDC Interface's Endpoints */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN, - CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT, - CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, - CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1); /* Reset line encoding baud rates so that the host knows to send new values */ LineEncoding1.BaudRateBPS = 0; @@ -224,7 +218,7 @@ void CDC1_Task(void) ActionSent = true; /* Select the Serial Tx Endpoint */ - Endpoint_SelectEndpoint(CDC1_TX_EPNUM); + Endpoint_SelectEndpoint(CDC1_TX_EPADDR); /* Write the String to the Endpoint */ Endpoint_Write_Stream_LE(ReportString, strlen(ReportString), NULL); @@ -240,7 +234,7 @@ void CDC1_Task(void) } /* Select the Serial Rx Endpoint */ - Endpoint_SelectEndpoint(CDC1_RX_EPNUM); + Endpoint_SelectEndpoint(CDC1_RX_EPADDR); /* Throw away any received data from the host */ if (Endpoint_IsOUTReceived()) @@ -257,7 +251,7 @@ void CDC2_Task(void) return; /* Select the Serial Rx Endpoint */ - Endpoint_SelectEndpoint(CDC2_RX_EPNUM); + Endpoint_SelectEndpoint(CDC2_RX_EPADDR); /* Check to see if any data has been received */ if (Endpoint_IsOUTReceived()) @@ -275,7 +269,7 @@ void CDC2_Task(void) Endpoint_ClearOUT(); /* Select the Serial Tx Endpoint */ - Endpoint_SelectEndpoint(CDC2_TX_EPNUM); + Endpoint_SelectEndpoint(CDC2_TX_EPADDR); /* Write the received data to the endpoint */ Endpoint_Write_Stream_LE(&Buffer, DataLength, NULL); diff --git a/Demos/Device/LowLevel/GenericHID/Descriptors.c b/Demos/Device/LowLevel/GenericHID/Descriptors.c index 2dcdcf030..3a6f13526 100644 --- a/Demos/Device/LowLevel/GenericHID/Descriptors.c +++ b/Demos/Device/LowLevel/GenericHID/Descriptors.c @@ -143,20 +143,20 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | GENERIC_IN_EPNUM), + .EndpointAddress = GENERIC_IN_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = GENERIC_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .HID_ReportOUTEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_OUT | GENERIC_OUT_EPNUM), + .EndpointAddress = GENERIC_OUT_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = GENERIC_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 } }; diff --git a/Demos/Device/LowLevel/GenericHID/Descriptors.h b/Demos/Device/LowLevel/GenericHID/Descriptors.h index 4647a05f0..e47220a1c 100644 --- a/Demos/Device/LowLevel/GenericHID/Descriptors.h +++ b/Demos/Device/LowLevel/GenericHID/Descriptors.h @@ -58,11 +58,11 @@ } USB_Descriptor_Configuration_t; /* Macros: */ - /** Endpoint number of the Generic HID reporting IN endpoint. */ - #define GENERIC_IN_EPNUM 1 + /** Endpoint address of the Generic HID reporting IN endpoint. */ + #define GENERIC_IN_EPADDR (ENDPOINT_DIR_IN | 1) - /** Endpoint number of the Generic HID reporting OUT endpoint. */ - #define GENERIC_OUT_EPNUM 2 + /** Endpoint address of the Generic HID reporting OUT endpoint. */ + #define GENERIC_OUT_EPADDR (ENDPOINT_DIR_OUT | 2) /** Size in bytes of the Generic HID reporting endpoint. */ #define GENERIC_EPSIZE 8 diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.c b/Demos/Device/LowLevel/GenericHID/GenericHID.c index 4d61acfb6..c36c33f7e 100644 --- a/Demos/Device/LowLevel/GenericHID/GenericHID.c +++ b/Demos/Device/LowLevel/GenericHID/GenericHID.c @@ -95,10 +95,8 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup HID Report Endpoints */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, - GENERIC_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT, - GENERIC_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_IN_EPADDR, EP_TYPE_INTERRUPT, GENERIC_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_OUT_EPADDR, EP_TYPE_INTERRUPT, GENERIC_EPSIZE, 1); /* Indicate endpoint configuration success or failure */ LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR); @@ -200,7 +198,7 @@ void HID_Task(void) if (USB_DeviceState != DEVICE_STATE_Configured) return; - Endpoint_SelectEndpoint(GENERIC_OUT_EPNUM); + Endpoint_SelectEndpoint(GENERIC_OUT_EPADDR); /* Check to see if a packet has been sent from the host */ if (Endpoint_IsOUTReceived()) @@ -222,7 +220,7 @@ void HID_Task(void) Endpoint_ClearOUT(); } - Endpoint_SelectEndpoint(GENERIC_IN_EPNUM); + Endpoint_SelectEndpoint(GENERIC_IN_EPADDR); /* Check to see if the host is ready to accept another packet */ if (Endpoint_IsINReady()) diff --git a/Demos/Device/LowLevel/Joystick/Descriptors.c b/Demos/Device/LowLevel/Joystick/Descriptors.c index 272595d99..bcadacda5 100644 --- a/Demos/Device/LowLevel/Joystick/Descriptors.c +++ b/Demos/Device/LowLevel/Joystick/Descriptors.c @@ -155,10 +155,10 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | JOYSTICK_EPNUM), + .EndpointAddress = JOYSTICK_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = JOYSTICK_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 } }; diff --git a/Demos/Device/LowLevel/Joystick/Descriptors.h b/Demos/Device/LowLevel/Joystick/Descriptors.h index 93b315b4e..bc90fb7cc 100644 --- a/Demos/Device/LowLevel/Joystick/Descriptors.h +++ b/Demos/Device/LowLevel/Joystick/Descriptors.h @@ -57,8 +57,8 @@ } USB_Descriptor_Configuration_t; /* Macros: */ - /** Endpoint number of the Joystick HID reporting IN endpoint. */ - #define JOYSTICK_EPNUM 1 + /** Endpoint address of the Joystick HID reporting IN endpoint. */ + #define JOYSTICK_EPADDR (ENDPOINT_DIR_IN | 1) /** Size in bytes of the Joystick HID reporting IN endpoint. */ #define JOYSTICK_EPSIZE 8 diff --git a/Demos/Device/LowLevel/Joystick/Joystick.c b/Demos/Device/LowLevel/Joystick/Joystick.c index 9e84b61f9..cfdfaae2f 100644 --- a/Demos/Device/LowLevel/Joystick/Joystick.c +++ b/Demos/Device/LowLevel/Joystick/Joystick.c @@ -96,8 +96,7 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup HID Report Endpoint */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(JOYSTICK_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, - JOYSTICK_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(JOYSTICK_EPADDR, EP_TYPE_INTERRUPT, JOYSTICK_EPSIZE, 1); /* Indicate endpoint configuration success or failure */ LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR); @@ -183,7 +182,7 @@ void HID_Task(void) return; /* Select the Joystick Report Endpoint */ - Endpoint_SelectEndpoint(JOYSTICK_EPNUM); + Endpoint_SelectEndpoint(JOYSTICK_EPADDR); /* Check to see if the host is ready for another packet */ if (Endpoint_IsINReady()) diff --git a/Demos/Device/LowLevel/Keyboard/Descriptors.c b/Demos/Device/LowLevel/Keyboard/Descriptors.c index 46b9fdec5..f4e294239 100644 --- a/Demos/Device/LowLevel/Keyboard/Descriptors.c +++ b/Demos/Device/LowLevel/Keyboard/Descriptors.c @@ -160,20 +160,20 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_IN_EPNUM), + .EndpointAddress = KEYBOARD_IN_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = KEYBOARD_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .HID_ReportOUTEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_OUT | KEYBOARD_OUT_EPNUM), + .EndpointAddress = KEYBOARD_OUT_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = KEYBOARD_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 } }; diff --git a/Demos/Device/LowLevel/Keyboard/Descriptors.h b/Demos/Device/LowLevel/Keyboard/Descriptors.h index 3c0ea1797..2e1fe3c81 100644 --- a/Demos/Device/LowLevel/Keyboard/Descriptors.h +++ b/Demos/Device/LowLevel/Keyboard/Descriptors.h @@ -59,11 +59,11 @@ } USB_Descriptor_Configuration_t; /* Macros: */ - /** Endpoint number of the Keyboard HID reporting IN endpoint. */ - #define KEYBOARD_IN_EPNUM 1 + /** Endpoint address of the Keyboard HID reporting IN endpoint. */ + #define KEYBOARD_IN_EPADDR (ENDPOINT_DIR_IN | 1) - /** Endpoint number of the Keyboard HID reporting OUT endpoint. */ - #define KEYBOARD_OUT_EPNUM 2 + /** Endpoint address of the Keyboard HID reporting OUT endpoint. */ + #define KEYBOARD_OUT_EPADDR (ENDPOINT_DIR_OUT | 2) /** Size in bytes of the Keyboard HID reporting IN and OUT endpoints. */ #define KEYBOARD_EPSIZE 8 diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.c b/Demos/Device/LowLevel/Keyboard/Keyboard.c index 45bf010fc..3755d09de 100644 --- a/Demos/Device/LowLevel/Keyboard/Keyboard.c +++ b/Demos/Device/LowLevel/Keyboard/Keyboard.c @@ -117,10 +117,8 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup HID Report Endpoints */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, - KEYBOARD_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT, - KEYBOARD_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPADDR, EP_TYPE_INTERRUPT, KEYBOARD_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPADDR, EP_TYPE_INTERRUPT, KEYBOARD_EPSIZE, 1); /* Turn on Start-of-Frame events for tracking HID report period expiry */ USB_Device_EnableSOFEvents(); @@ -315,7 +313,7 @@ void SendNextReport(void) } /* Select the Keyboard Report Endpoint */ - Endpoint_SelectEndpoint(KEYBOARD_IN_EPNUM); + Endpoint_SelectEndpoint(KEYBOARD_IN_EPADDR); /* Check if Keyboard Endpoint Ready for Read/Write and if we should send a new report */ if (Endpoint_IsReadWriteAllowed() && SendReport) @@ -335,7 +333,7 @@ void SendNextReport(void) void ReceiveNextReport(void) { /* Select the Keyboard LED Report Endpoint */ - Endpoint_SelectEndpoint(KEYBOARD_OUT_EPNUM); + Endpoint_SelectEndpoint(KEYBOARD_OUT_EPADDR); /* Check if Keyboard LED Endpoint contains a packet */ if (Endpoint_IsOUTReceived()) diff --git a/Demos/Device/LowLevel/KeyboardMouse/Descriptors.c b/Demos/Device/LowLevel/KeyboardMouse/Descriptors.c index 9d02fa45c..a058373fa 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/Descriptors.c +++ b/Demos/Device/LowLevel/KeyboardMouse/Descriptors.c @@ -195,20 +195,20 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_IN_EPNUM), + .EndpointAddress = KEYBOARD_IN_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = HID_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .HID1_ReportOUTEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_OUT | KEYBOARD_OUT_EPNUM), + .EndpointAddress = KEYBOARD_OUT_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = HID_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .HID2_MouseInterface = @@ -242,10 +242,10 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | MOUSE_IN_EPNUM), + .EndpointAddress = MOUSE_IN_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = HID_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 } }; diff --git a/Demos/Device/LowLevel/KeyboardMouse/Descriptors.h b/Demos/Device/LowLevel/KeyboardMouse/Descriptors.h index 573cb65b6..178f5ed99 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/Descriptors.h +++ b/Demos/Device/LowLevel/KeyboardMouse/Descriptors.h @@ -65,14 +65,14 @@ } USB_Descriptor_Configuration_t; /* Macros: */ - /** Endpoint number of the Keyboard HID reporting IN endpoint. */ - #define KEYBOARD_IN_EPNUM 1 + /** Endpoint address of the Keyboard HID reporting IN endpoint. */ + #define KEYBOARD_IN_EPADDR (ENDPOINT_DIR_IN | 1) - /** Endpoint number of the Keyboard HID reporting OUT endpoint. */ - #define KEYBOARD_OUT_EPNUM 2 + /** Endpoint address of the Keyboard HID reporting OUT endpoint. */ + #define KEYBOARD_OUT_EPADDR (ENDPOINT_DIR_OUT | 2) - /** Endpoint number of the Mouse HID reporting IN endpoint. */ - #define MOUSE_IN_EPNUM 3 + /** Endpoint address of the Mouse HID reporting IN endpoint. */ + #define MOUSE_IN_EPADDR (ENDPOINT_DIR_IN | 3) /** Size in bytes of each of the HID reporting IN and OUT endpoints. */ #define HID_EPSIZE 8 diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c index 4de6f64c9..a916659ea 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c @@ -104,14 +104,11 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup Keyboard HID Report Endpoints */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, - HID_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT, - HID_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPADDR, EP_TYPE_INTERRUPT, HID_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPADDR, EP_TYPE_INTERRUPT, HID_EPSIZE, 1); /* Setup Mouse HID Report Endpoint */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, - HID_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_IN_EPADDR, EP_TYPE_INTERRUPT, HID_EPSIZE, 1); /* Indicate endpoint configuration success or failure */ LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR); @@ -236,7 +233,7 @@ void Keyboard_HID_Task(void) } /* Select the Keyboard Report Endpoint */ - Endpoint_SelectEndpoint(KEYBOARD_IN_EPNUM); + Endpoint_SelectEndpoint(KEYBOARD_IN_EPADDR); /* Check if Keyboard Endpoint Ready for Read/Write */ if (Endpoint_IsReadWriteAllowed()) @@ -252,7 +249,7 @@ void Keyboard_HID_Task(void) } /* Select the Keyboard LED Report Endpoint */ - Endpoint_SelectEndpoint(KEYBOARD_OUT_EPNUM); + Endpoint_SelectEndpoint(KEYBOARD_OUT_EPADDR); /* Check if Keyboard LED Endpoint Ready for Read/Write */ if (Endpoint_IsReadWriteAllowed()) @@ -294,7 +291,7 @@ void Mouse_HID_Task(void) } /* Select the Mouse Report Endpoint */ - Endpoint_SelectEndpoint(MOUSE_IN_EPNUM); + Endpoint_SelectEndpoint(MOUSE_IN_EPADDR); /* Check if Mouse Endpoint Ready for Read/Write */ if (Endpoint_IsReadWriteAllowed()) diff --git a/Demos/Device/LowLevel/MIDI/Descriptors.c b/Demos/Device/LowLevel/MIDI/Descriptors.c index 9ad0e86a5..44db1eee5 100644 --- a/Demos/Device/LowLevel/MIDI/Descriptors.c +++ b/Demos/Device/LowLevel/MIDI/Descriptors.c @@ -199,10 +199,10 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM), + .EndpointAddress = MIDI_STREAM_OUT_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MIDI_STREAM_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .Refresh = 0, @@ -224,10 +224,10 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM), + .EndpointAddress = MIDI_STREAM_IN_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MIDI_STREAM_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .Refresh = 0, diff --git a/Demos/Device/LowLevel/MIDI/Descriptors.h b/Demos/Device/LowLevel/MIDI/Descriptors.h index 5415a31cd..7947a463c 100644 --- a/Demos/Device/LowLevel/MIDI/Descriptors.h +++ b/Demos/Device/LowLevel/MIDI/Descriptors.h @@ -42,11 +42,11 @@ #include /* Macros: */ - /** Endpoint number of the MIDI streaming data IN endpoint, for device-to-host data transfers. */ - #define MIDI_STREAM_IN_EPNUM 1 + /** Endpoint address of the MIDI streaming data IN endpoint, for device-to-host data transfers. */ + #define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | 1) - /** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */ - #define MIDI_STREAM_OUT_EPNUM 2 + /** Endpoint address of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */ + #define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | 2) /** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */ #define MIDI_STREAM_EPSIZE 64 diff --git a/Demos/Device/LowLevel/MIDI/MIDI.c b/Demos/Device/LowLevel/MIDI/MIDI.c index a29a8c86b..335c7143e 100644 --- a/Demos/Device/LowLevel/MIDI/MIDI.c +++ b/Demos/Device/LowLevel/MIDI/MIDI.c @@ -94,10 +94,8 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup MIDI Data Endpoints */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN, - MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT, - MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, 1); /* Indicate endpoint configuration success or failure */ LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR); @@ -114,7 +112,7 @@ void MIDI_Task(void) if (USB_DeviceState != DEVICE_STATE_Configured) return; - Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPNUM); + Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPADDR); if (Endpoint_IsINReady()) { @@ -162,8 +160,7 @@ void MIDI_Task(void) { MIDI_EventPacket_t MIDIEvent = (MIDI_EventPacket_t) { - .CableNumber = 0, - .Command = (MIDICommand >> 4), + .Event = MIDI_EVENT(0, MIDICommand), .Data1 = MIDICommand | Channel, .Data2 = MIDIPitch, @@ -182,7 +179,7 @@ void MIDI_Task(void) } /* Select the MIDI OUT stream */ - Endpoint_SelectEndpoint(MIDI_STREAM_OUT_EPNUM); + Endpoint_SelectEndpoint(MIDI_STREAM_OUT_EPADDR); /* Check if a MIDI command has been received */ if (Endpoint_IsOUTReceived()) @@ -193,7 +190,7 @@ void MIDI_Task(void) Endpoint_Read_Stream_LE(&MIDIEvent, sizeof(MIDIEvent), NULL); /* Check to see if the sent command is a note on message with a non-zero velocity */ - if ((MIDIEvent.Command == (MIDI_COMMAND_NOTE_ON >> 4)) && (MIDIEvent.Data3 > 0)) + if ((MIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_ON)) && (MIDIEvent.Data3 > 0)) { /* Change LEDs depending on the pitch of the sent note */ LEDs_SetAllLEDs(MIDIEvent.Data2 > 64 ? LEDS_LED1 : LEDS_LED2); diff --git a/Demos/Device/LowLevel/MassStorage/Descriptors.c b/Demos/Device/LowLevel/MassStorage/Descriptors.c index fb829423a..5c62f7fb1 100644 --- a/Demos/Device/LowLevel/MassStorage/Descriptors.c +++ b/Demos/Device/LowLevel/MassStorage/Descriptors.c @@ -118,20 +118,20 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM), + .EndpointAddress = MASS_STORAGE_IN_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MASS_STORAGE_IO_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .MS_DataOutEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM), + .EndpointAddress = MASS_STORAGE_OUT_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MASS_STORAGE_IO_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 } }; diff --git a/Demos/Device/LowLevel/MassStorage/Descriptors.h b/Demos/Device/LowLevel/MassStorage/Descriptors.h index 0e7a91ffd..34a85f6d1 100644 --- a/Demos/Device/LowLevel/MassStorage/Descriptors.h +++ b/Demos/Device/LowLevel/MassStorage/Descriptors.h @@ -42,11 +42,11 @@ #include /* Macros: */ - /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */ - #define MASS_STORAGE_IN_EPNUM 3 + /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */ + #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3) - /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */ - #define MASS_STORAGE_OUT_EPNUM 4 + /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */ + #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4) /** Size in bytes of the Mass Storage data endpoints. */ #define MASS_STORAGE_IO_EPSIZE 64 diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.c b/Demos/Device/LowLevel/MassStorage/MassStorage.c index 947636cf8..0e8e1083b 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.c +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.c @@ -118,10 +118,8 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup Mass Storage Data Endpoints */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(MASS_STORAGE_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN, - MASS_STORAGE_IO_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(MASS_STORAGE_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT, - MASS_STORAGE_IO_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(MASS_STORAGE_IN_EPADDR, EP_TYPE_BULK, MASS_STORAGE_IO_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(MASS_STORAGE_OUT_EPADDR, EP_TYPE_BULK, MASS_STORAGE_IO_EPSIZE, 1); /* Indicate endpoint configuration success or failure */ LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR); @@ -180,7 +178,7 @@ void MassStorage_Task(void) /* Check direction of command, select Data IN endpoint if data is from the device */ if (CommandBlock.Flags & MS_COMMAND_DIR_DATA_IN) - Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM); + Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPADDR); /* Decode the received SCSI command, set returned status code */ CommandStatus.Status = SCSI_DecodeSCSICommand() ? MS_SCSI_COMMAND_Pass : MS_SCSI_COMMAND_Fail; @@ -206,13 +204,13 @@ void MassStorage_Task(void) if (IsMassStoreReset) { /* Reset the data endpoint banks */ - Endpoint_ResetEndpoint(MASS_STORAGE_OUT_EPNUM); - Endpoint_ResetEndpoint(MASS_STORAGE_IN_EPNUM); + Endpoint_ResetEndpoint(MASS_STORAGE_OUT_EPADDR); + Endpoint_ResetEndpoint(MASS_STORAGE_IN_EPADDR); - Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPNUM); + Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPADDR); Endpoint_ClearStall(); Endpoint_ResetDataToggle(); - Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM); + Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPADDR); Endpoint_ClearStall(); Endpoint_ResetDataToggle(); @@ -231,7 +229,7 @@ static bool ReadInCommandBlock(void) uint16_t BytesTransferred; /* Select the Data Out endpoint */ - Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPNUM); + Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPADDR); /* Abort if no command has been sent from the host */ if (!(Endpoint_IsOUTReceived())) @@ -256,7 +254,7 @@ static bool ReadInCommandBlock(void) { /* Stall both data pipes until reset by host */ Endpoint_StallTransaction(); - Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM); + Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPADDR); Endpoint_StallTransaction(); return false; @@ -286,7 +284,7 @@ static void ReturnCommandStatus(void) uint16_t BytesTransferred; /* Select the Data Out endpoint */ - Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPNUM); + Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPADDR); /* While data pipe is stalled, wait until the host issues a control request to clear the stall */ while (Endpoint_IsStalled()) @@ -297,7 +295,7 @@ static void ReturnCommandStatus(void) } /* Select the Data In endpoint */ - Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM); + Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPADDR); /* While data pipe is stalled, wait until the host issues a control request to clear the stall */ while (Endpoint_IsStalled()) diff --git a/Demos/Device/LowLevel/Mouse/Descriptors.c b/Demos/Device/LowLevel/Mouse/Descriptors.c index d42fb835c..03ea0e71f 100644 --- a/Demos/Device/LowLevel/Mouse/Descriptors.c +++ b/Demos/Device/LowLevel/Mouse/Descriptors.c @@ -155,10 +155,10 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | MOUSE_EPNUM), + .EndpointAddress = MOUSE_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MOUSE_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 } }; diff --git a/Demos/Device/LowLevel/Mouse/Descriptors.h b/Demos/Device/LowLevel/Mouse/Descriptors.h index da78dd0ff..abcd938a8 100644 --- a/Demos/Device/LowLevel/Mouse/Descriptors.h +++ b/Demos/Device/LowLevel/Mouse/Descriptors.h @@ -41,6 +41,13 @@ #include + /* Macros: */ + /** Endpoint address of the Mouse HID reporting IN endpoint. */ + #define MOUSE_EPADDR (ENDPOINT_DIR_IN | 1) + + /** Size in bytes of the Mouse HID reporting IN endpoint. */ + #define MOUSE_EPSIZE 8 + /* Type Defines: */ /** Type define for the device configuration descriptor structure. This must be defined in the * application code, as the configuration descriptor contains several sub-descriptors which @@ -56,13 +63,6 @@ USB_Descriptor_Endpoint_t HID_ReportINEndpoint; } USB_Descriptor_Configuration_t; - /* Macros: */ - /** Endpoint number of the Mouse HID reporting IN endpoint. */ - #define MOUSE_EPNUM 1 - - /** Size in bytes of the Mouse HID reporting IN endpoint. */ - #define MOUSE_EPSIZE 8 - /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, diff --git a/Demos/Device/LowLevel/Mouse/Mouse.c b/Demos/Device/LowLevel/Mouse/Mouse.c index 98da9be92..e9f92e4a2 100644 --- a/Demos/Device/LowLevel/Mouse/Mouse.c +++ b/Demos/Device/LowLevel/Mouse/Mouse.c @@ -116,8 +116,7 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup HID Report Endpoint */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, - MOUSE_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_EPADDR, EP_TYPE_INTERRUPT, MOUSE_EPSIZE, 1); /* Turn on Start-of-Frame events for tracking HID report period expiry */ USB_Device_EnableSOFEvents(); @@ -271,7 +270,7 @@ void SendNextReport(void) } /* Select the Mouse Report Endpoint */ - Endpoint_SelectEndpoint(MOUSE_EPNUM); + Endpoint_SelectEndpoint(MOUSE_EPADDR); /* Check if Mouse Endpoint Ready for Read/Write and if we should send a new report */ if (Endpoint_IsReadWriteAllowed() && SendReport) diff --git a/Demos/Device/LowLevel/RNDISEthernet/Descriptors.c b/Demos/Device/LowLevel/RNDISEthernet/Descriptors.c index 41bc4b59e..d1ca1df04 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Descriptors.c +++ b/Demos/Device/LowLevel/RNDISEthernet/Descriptors.c @@ -131,7 +131,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM), + .EndpointAddress = CDC_NOTIFICATION_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_NOTIFICATION_EPSIZE, .PollingIntervalMS = 0xFF @@ -157,20 +157,20 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM), + .EndpointAddress = CDC_RX_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .RNDIS_DataInEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM), + .EndpointAddress = CDC_TX_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 } }; diff --git a/Demos/Device/LowLevel/RNDISEthernet/Descriptors.h b/Demos/Device/LowLevel/RNDISEthernet/Descriptors.h index 9ffa5262f..6337335ac 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Descriptors.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Descriptors.h @@ -42,14 +42,14 @@ #include /* Macros: */ - /** Endpoint number of the CDC device-to-host data IN endpoint. */ - #define CDC_TX_EPNUM 1 + /** Endpoint address of the CDC device-to-host data IN endpoint. */ + #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 1) - /** Endpoint number of the CDC host-to-device data OUT endpoint. */ - #define CDC_RX_EPNUM 2 + /** Endpoint address of the CDC host-to-device data OUT endpoint. */ + #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 2) - /** Endpoint number of the CDC device-to-host notification IN endpoint. */ - #define CDC_NOTIFICATION_EPNUM 3 + /** Endpoint address of the CDC device-to-host notification IN endpoint. */ + #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 3) /** Size in bytes of the CDC data IN and OUT endpoints. */ #define CDC_TXRX_EPSIZE 64 diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c index a36ecf4bb..c041bb91a 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c +++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c @@ -104,12 +104,9 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup RNDIS Data Endpoints */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN, - CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT, - CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, - CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1); /* Indicate endpoint configuration success or failure */ LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR); @@ -170,7 +167,7 @@ void EVENT_USB_Device_ControlRequest(void) void RNDIS_Task(void) { /* Select the notification endpoint */ - Endpoint_SelectEndpoint(CDC_NOTIFICATION_EPNUM); + Endpoint_SelectEndpoint(CDC_NOTIFICATION_EPADDR); /* Check if a message response is ready for the host */ if (Endpoint_IsINReady() && ResponseReady) @@ -201,7 +198,7 @@ void RNDIS_Task(void) RNDIS_Packet_Message_t RNDISPacketHeader; /* Select the data OUT endpoint */ - Endpoint_SelectEndpoint(CDC_RX_EPNUM); + Endpoint_SelectEndpoint(CDC_RX_EPADDR); /* Check if the data OUT endpoint contains data, and that the IN buffer is empty */ if (Endpoint_IsOUTReceived() && !(FrameIN.FrameLength)) @@ -227,7 +224,7 @@ void RNDIS_Task(void) } /* Select the data IN endpoint */ - Endpoint_SelectEndpoint(CDC_TX_EPNUM); + Endpoint_SelectEndpoint(CDC_TX_EPADDR); /* Check if the data IN endpoint is ready for more data, and that the IN buffer is full */ if (Endpoint_IsINReady() && FrameOUT.FrameLength) diff --git a/Demos/Device/LowLevel/VirtualSerial/Descriptors.c b/Demos/Device/LowLevel/VirtualSerial/Descriptors.c index f4e9fb324..9dcf4e4d4 100644 --- a/Demos/Device/LowLevel/VirtualSerial/Descriptors.c +++ b/Demos/Device/LowLevel/VirtualSerial/Descriptors.c @@ -143,7 +143,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM), + .EndpointAddress = CDC_NOTIFICATION_EPADDR, .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_NOTIFICATION_EPSIZE, .PollingIntervalMS = 0xFF @@ -169,20 +169,20 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM), + .EndpointAddress = CDC_RX_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 }, .CDC_DataInEndpoint = { .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM), + .EndpointAddress = CDC_TX_EPADDR, .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x01 + .PollingIntervalMS = 0x05 } }; diff --git a/Demos/Device/LowLevel/VirtualSerial/Descriptors.h b/Demos/Device/LowLevel/VirtualSerial/Descriptors.h index 765345bc3..36ec8f9ff 100644 --- a/Demos/Device/LowLevel/VirtualSerial/Descriptors.h +++ b/Demos/Device/LowLevel/VirtualSerial/Descriptors.h @@ -42,14 +42,14 @@ #include /* Macros: */ - /** Endpoint number of the CDC device-to-host notification IN endpoint. */ - #define CDC_NOTIFICATION_EPNUM 2 + /** Endpoint address of the CDC device-to-host notification IN endpoint. */ + #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2) - /** Endpoint number of the CDC device-to-host data IN endpoint. */ - #define CDC_TX_EPNUM 3 + /** Endpoint address of the CDC device-to-host data IN endpoint. */ + #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3) - /** Endpoint number of the CDC host-to-device data OUT endpoint. */ - #define CDC_RX_EPNUM 4 + /** Endpoint address of the CDC host-to-device data OUT endpoint. */ + #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4) /** Size in bytes of the CDC device-to-host notification IN endpoint. */ #define CDC_NOTIFICATION_EPSIZE 8 diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c index 93fd4353e..7d185481d 100644 --- a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c +++ b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c @@ -109,12 +109,9 @@ void EVENT_USB_Device_ConfigurationChanged(void) bool ConfigSuccess = true; /* Setup CDC Data Endpoints */ - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, - CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN, - CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT, - CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1); /* Reset line encoding baud rate so that the host knows to send new values */ LineEncoding.BaudRateBPS = 0; @@ -201,7 +198,7 @@ void CDC_Task(void) ActionSent = true; /* Select the Serial Tx Endpoint */ - Endpoint_SelectEndpoint(CDC_TX_EPNUM); + Endpoint_SelectEndpoint(CDC_TX_EPADDR); /* Write the String to the Endpoint */ Endpoint_Write_Stream_LE(ReportString, strlen(ReportString), NULL); @@ -225,7 +222,7 @@ void CDC_Task(void) } /* Select the Serial Rx Endpoint */ - Endpoint_SelectEndpoint(CDC_RX_EPNUM); + Endpoint_SelectEndpoint(CDC_RX_EPADDR); /* Throw away any received data from the host */ if (Endpoint_IsOUTReceived()) -- cgit v1.2.3 From 802910d49f2ac175b06a8ebfbcb61551a171b85a Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sat, 12 May 2012 15:32:53 +0000 Subject: AppConfigHeaders: Update several additional user projects to use configuration header files, rather than makefile defines. Remove compile time warnings for projects lacking device serial support, remove incomplete StandaloneProgrammer project. --- Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c | 11 ----------- Demos/Device/LowLevel/MassStorage/Descriptors.c | 11 ----------- Demos/Device/LowLevel/VirtualSerial/Descriptors.c | 11 ----------- 3 files changed, 33 deletions(-) (limited to 'Demos/Device/LowLevel') diff --git a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c index 1a4860ad3..a183b7fcb 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c +++ b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c @@ -37,17 +37,6 @@ #include "Descriptors.h" -/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as - * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL. - * This allows the host to track a device across insertions on different ports, allowing them to retain allocated - * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices - * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value - * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and - * port location). - */ -#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR) - #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor. -#endif /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall * device characteristics, including the supported USB version, control endpoint size and the diff --git a/Demos/Device/LowLevel/MassStorage/Descriptors.c b/Demos/Device/LowLevel/MassStorage/Descriptors.c index 5c62f7fb1..36774e804 100644 --- a/Demos/Device/LowLevel/MassStorage/Descriptors.c +++ b/Demos/Device/LowLevel/MassStorage/Descriptors.c @@ -37,17 +37,6 @@ #include "Descriptors.h" -/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as - * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL. - * This allows the host to track a device across insertions on different ports, allowing them to retain allocated - * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices - * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value - * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and - * port location). - */ -#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR) - #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor. -#endif /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall * device characteristics, including the supported USB version, control endpoint size and the diff --git a/Demos/Device/LowLevel/VirtualSerial/Descriptors.c b/Demos/Device/LowLevel/VirtualSerial/Descriptors.c index 9dcf4e4d4..0a11dcb79 100644 --- a/Demos/Device/LowLevel/VirtualSerial/Descriptors.c +++ b/Demos/Device/LowLevel/VirtualSerial/Descriptors.c @@ -37,17 +37,6 @@ #include "Descriptors.h" -/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as - * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL. - * This allows the host to track a device across insertions on different ports, allowing them to retain allocated - * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices - * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value - * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and - * port location). - */ -#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR) - #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor. -#endif /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall * device characteristics, including the supported USB version, control endpoint size and the -- cgit v1.2.3 From 13085a335125808f3b2f9adc495c6fe26053cebe Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 13 May 2012 15:03:17 +0000 Subject: AppConfigHeaders: Switch low level Device mode demos to use LUFAConfig.h configuration header files. --- Demos/Device/LowLevel/AudioInput/AudioInput.h | 1 + Demos/Device/LowLevel/AudioInput/AudioInput.txt | 4 +- .../Device/LowLevel/AudioInput/Config/AppConfig.h | 0 .../Device/LowLevel/AudioInput/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/AudioInput/makefile | 9 +-- Demos/Device/LowLevel/AudioOutput/AudioOutput.h | 1 + Demos/Device/LowLevel/AudioOutput/AudioOutput.txt | 6 +- .../Device/LowLevel/AudioOutput/Config/AppConfig.h | 49 ++++++++++++ .../LowLevel/AudioOutput/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/AudioOutput/makefile | 12 +-- .../LowLevel/DualVirtualSerial/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/DualVirtualSerial/makefile | 8 +- .../Device/LowLevel/GenericHID/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/GenericHID/makefile | 8 +- Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/Joystick/makefile | 8 +- Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/Keyboard/makefile | 8 +- .../LowLevel/KeyboardMouse/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/KeyboardMouse/makefile | 8 +- Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/MIDI/makefile | 8 +- .../LowLevel/MassStorage/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/MassStorage/makefile | 9 +-- Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/Mouse/makefile | 8 +- .../LowLevel/RNDISEthernet/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ .../LowLevel/RNDISEthernet/Config/NetworkConfig.h | 55 +++++++++++++ Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h | 8 +- .../LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h | 2 + .../LowLevel/RNDISEthernet/RNDISEthernet.txt | 24 ++++-- Demos/Device/LowLevel/RNDISEthernet/makefile | 16 +--- .../LowLevel/VirtualSerial/Config/LUFAConfig.h | 93 ++++++++++++++++++++++ Demos/Device/LowLevel/VirtualSerial/makefile | 8 +- 34 files changed, 1271 insertions(+), 105 deletions(-) create mode 100644 Demos/Device/LowLevel/AudioInput/Config/AppConfig.h create mode 100644 Demos/Device/LowLevel/AudioInput/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/AudioOutput/Config/AppConfig.h create mode 100644 Demos/Device/LowLevel/AudioOutput/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/DualVirtualSerial/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/GenericHID/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/KeyboardMouse/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/MassStorage/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/RNDISEthernet/Config/LUFAConfig.h create mode 100644 Demos/Device/LowLevel/RNDISEthernet/Config/NetworkConfig.h create mode 100644 Demos/Device/LowLevel/VirtualSerial/Config/LUFAConfig.h (limited to 'Demos/Device/LowLevel') diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.h b/Demos/Device/LowLevel/AudioInput/AudioInput.h index f274e24b4..fc2093716 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.h +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.h @@ -43,6 +43,7 @@ #include #include "Descriptors.h" + #include "Config/AppConfig.h" #include #include diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.txt b/Demos/Device/LowLevel/AudioInput/AudioInput.txt index dd3f6e682..17b476e24 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.txt +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.txt @@ -73,13 +73,13 @@ * * * USE_TEST_TONE - * Makefile LUFA_OPTS + * AppConfig.h * When defined, this alters the demo to produce a square wave test tone when the first board button is pressed * instead of sampling the board microphone. * * * MICROPHONE_BIASED_TO_HALF_RAIL - * Makefile LUFA_OPTS + * AppConfig.h * When defined, this alters the demo so that the half VCC bias of the microphone input is subtracted. * * diff --git a/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h b/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h new file mode 100644 index 000000000..e69de29bb diff --git a/Demos/Device/LowLevel/AudioInput/Config/LUFAConfig.h b/Demos/Device/LowLevel/AudioInput/Config/LUFAConfig.h new file mode 100644 index 000000000..a1d748267 --- /dev/null +++ b/Demos/Device/LowLevel/AudioInput/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/AudioInput/makefile b/Demos/Device/LowLevel/AudioInput/makefile index 82680a0b0..a917c82f1 100644 --- a/Demos/Device/LowLevel/AudioInput/makefile +++ b/Demos/Device/LowLevel/AudioInput/makefile @@ -120,14 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" - -LUFA_OPTS += -D MICROPHONE_BIASED_TO_HALF_RAIL -LUFA_OPTS += -D USE_TEST_TONE +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h index 8c5a2033b..3bcfc239e 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h @@ -43,6 +43,7 @@ #include #include "Descriptors.h" + #include "Config/AppConfig.h" #include #include diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.txt b/Demos/Device/LowLevel/AudioOutput/AudioOutput.txt index 090f8bed9..77e986617 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.txt +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.txt @@ -73,17 +73,17 @@ * * * AUDIO_OUT_STEREO - * Makefile LUFA_OPTS + * AppConfig.h * When defined, this outputs the audio samples in stereo to the timer output pins of the microcontroller. * * * AUDIO_OUT_MONO - * Makefile LUFA_OPTS + * AppConfig.h * When defined, this outputs the audio samples in mono to the timer output pin of the microcontroller. * * * AUDIO_OUT_PORTC - * Makefile LUFA_OPTS + * AppConfig.h * When defined, this outputs the audio samples in mono to port C of the microcontroller, for connection to an * external DAC. * diff --git a/Demos/Device/LowLevel/AudioOutput/Config/AppConfig.h b/Demos/Device/LowLevel/AudioOutput/Config/AppConfig.h new file mode 100644 index 000000000..01101649a --- /dev/null +++ b/Demos/Device/LowLevel/AudioOutput/Config/AppConfig.h @@ -0,0 +1,49 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief Application Configuration Header File + * + * This is a header file which is be used to configure some of + * the application's compile time options, as an alternative to + * specifying the compile time constants supplied through a + * makefile or build system. + * + * For information on what each token does, refer to the + * \ref Sec_Options section of the application documentation. + */ + +#ifndef _APP_CONFIG_H_ +#define _APP_CONFIG_H_ + + #define MICROPHONE_BIASED_TO_HALF_RAIL + #define USE_TEST_TONE + +#endif \ No newline at end of file diff --git a/Demos/Device/LowLevel/AudioOutput/Config/LUFAConfig.h b/Demos/Device/LowLevel/AudioOutput/Config/LUFAConfig.h new file mode 100644 index 000000000..a1d748267 --- /dev/null +++ b/Demos/Device/LowLevel/AudioOutput/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/AudioOutput/makefile b/Demos/Device/LowLevel/AudioOutput/makefile index e92ee2db0..4c32b3e2a 100644 --- a/Demos/Device/LowLevel/AudioOutput/makefile +++ b/Demos/Device/LowLevel/AudioOutput/makefile @@ -120,15 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" - -LUFA_OPTS += -D AUDIO_OUT_STEREO -#LUFA_OPTS += -D AUDIO_OUT_MONO -#LUFA_OPTS += -D AUDIO_OUT_PORTC +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -172,7 +164,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. diff --git a/Demos/Device/LowLevel/DualVirtualSerial/Config/LUFAConfig.h b/Demos/Device/LowLevel/DualVirtualSerial/Config/LUFAConfig.h new file mode 100644 index 000000000..f91ef1895 --- /dev/null +++ b/Demos/Device/LowLevel/DualVirtualSerial/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE + #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/DualVirtualSerial/makefile b/Demos/Device/LowLevel/DualVirtualSerial/makefile index 9db0f9a0f..4e683e9e5 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/makefile +++ b/Demos/Device/LowLevel/DualVirtualSerial/makefile @@ -120,11 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -168,7 +164,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. diff --git a/Demos/Device/LowLevel/GenericHID/Config/LUFAConfig.h b/Demos/Device/LowLevel/GenericHID/Config/LUFAConfig.h new file mode 100644 index 000000000..a1d748267 --- /dev/null +++ b/Demos/Device/LowLevel/GenericHID/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/GenericHID/makefile b/Demos/Device/LowLevel/GenericHID/makefile index 0feee3d83..95ed8b01b 100644 --- a/Demos/Device/LowLevel/GenericHID/makefile +++ b/Demos/Device/LowLevel/GenericHID/makefile @@ -120,11 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -168,7 +164,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. diff --git a/Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h b/Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h new file mode 100644 index 000000000..a1d748267 --- /dev/null +++ b/Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/Joystick/makefile b/Demos/Device/LowLevel/Joystick/makefile index d3fb67263..639304095 100644 --- a/Demos/Device/LowLevel/Joystick/makefile +++ b/Demos/Device/LowLevel/Joystick/makefile @@ -120,11 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -168,7 +164,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. diff --git a/Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h b/Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h new file mode 100644 index 000000000..a1d748267 --- /dev/null +++ b/Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/Keyboard/makefile b/Demos/Device/LowLevel/Keyboard/makefile index 10d71189d..9c36e4eaa 100644 --- a/Demos/Device/LowLevel/Keyboard/makefile +++ b/Demos/Device/LowLevel/Keyboard/makefile @@ -120,11 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -168,7 +164,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. diff --git a/Demos/Device/LowLevel/KeyboardMouse/Config/LUFAConfig.h b/Demos/Device/LowLevel/KeyboardMouse/Config/LUFAConfig.h new file mode 100644 index 000000000..a1d748267 --- /dev/null +++ b/Demos/Device/LowLevel/KeyboardMouse/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/KeyboardMouse/makefile b/Demos/Device/LowLevel/KeyboardMouse/makefile index f560f929b..c56d990ff 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/makefile +++ b/Demos/Device/LowLevel/KeyboardMouse/makefile @@ -120,11 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -168,7 +164,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. diff --git a/Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h b/Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h new file mode 100644 index 000000000..a1d748267 --- /dev/null +++ b/Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/MIDI/makefile b/Demos/Device/LowLevel/MIDI/makefile index 6d3f2a205..38247459f 100644 --- a/Demos/Device/LowLevel/MIDI/makefile +++ b/Demos/Device/LowLevel/MIDI/makefile @@ -120,11 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -168,7 +164,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. diff --git a/Demos/Device/LowLevel/MassStorage/Config/LUFAConfig.h b/Demos/Device/LowLevel/MassStorage/Config/LUFAConfig.h new file mode 100644 index 000000000..f91ef1895 --- /dev/null +++ b/Demos/Device/LowLevel/MassStorage/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE + #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/MassStorage/makefile b/Demos/Device/LowLevel/MassStorage/makefile index 79b515f38..e07f1e882 100644 --- a/Demos/Device/LowLevel/MassStorage/makefile +++ b/Demos/Device/LowLevel/MassStorage/makefile @@ -120,12 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -LUFA_OPTS += -D INTERRUPT_CONTROL_ENDPOINT +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -171,7 +166,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. diff --git a/Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h b/Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h new file mode 100644 index 000000000..a1d748267 --- /dev/null +++ b/Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/Mouse/makefile b/Demos/Device/LowLevel/Mouse/makefile index 6779c88e2..dc4438f91 100644 --- a/Demos/Device/LowLevel/Mouse/makefile +++ b/Demos/Device/LowLevel/Mouse/makefile @@ -120,11 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -168,7 +164,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. diff --git a/Demos/Device/LowLevel/RNDISEthernet/Config/LUFAConfig.h b/Demos/Device/LowLevel/RNDISEthernet/Config/LUFAConfig.h new file mode 100644 index 000000000..a1d748267 --- /dev/null +++ b/Demos/Device/LowLevel/RNDISEthernet/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/RNDISEthernet/Config/NetworkConfig.h b/Demos/Device/LowLevel/RNDISEthernet/Config/NetworkConfig.h new file mode 100644 index 000000000..e6ac093ad --- /dev/null +++ b/Demos/Device/LowLevel/RNDISEthernet/Config/NetworkConfig.h @@ -0,0 +1,55 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief Network Configuration Header File + * + * This header file is used to configure various portions of the + * network stack used by the application. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _NETWORK_CONFIG_H_ +#define _NETWORK_CONFIG_H_ + + #define CLIENT_IP_ADDRESS { 10, 0, 0, 1} + #define SERVER_IP_ADDRESS { 10, 0, 0, 2} + + #define NO_DECODE_ETHERNET + #define NO_DECODE_ARP + #define NO_DECODE_IP + #define NO_DECODE_ICMP + #define NO_DECODE_TCP + #define NO_DECODE_UDP + #define NO_DECODE_DHCP + +#endif diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h index 4cd6a20aa..b878693bd 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h @@ -43,14 +43,10 @@ #include "EthernetProtocols.h" #include "Ethernet.h" #include "ProtocolDecoders.h" + + #include "Config/NetworkConfig.h" /* Macros: */ - /** Protocol IP address of the host (client) machine, once assigned by DHCP. */ - #define CLIENT_IP_ADDRESS { 10, 0, 0, 1} - - /** Protocol IP address of the virtual server machine. */ - #define SERVER_IP_ADDRESS { 10, 0, 0, 2} - /** Protocol IP address of the broadcast address. */ #define BROADCAST_IP_ADDRESS {0xFF, 0xFF, 0xFF, 0xFF} diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h index 2807b6056..b3ad1affd 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h @@ -45,6 +45,8 @@ #include "EthernetProtocols.h" #include "Ethernet.h" + + #include "Config/NetworkConfig.h" /* Function Prototypes: */ void DecodeEthernetFrameHeader(void* InDataStart); diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt index 3099ac0a6..08cb05324 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt +++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt @@ -84,38 +84,48 @@ * Description: * * + * CLIENT_IP_ADDRESS + * NetworkConfig.h + * Configures the IP address given to the client (PC) via the DHCP server. + * + * + * HOST_IP_ADDRESS + * NetworkConfig.h + * Configures the IP address used in the virtual server for communications to/from the client. + * + * * NO_DECODE_ETHERNET - * Makefile LUFA_OPTS + * NetworkConfig.h * When defined, received Ethernet headers will not be decoded and printed to the device serial port. * * * NO_DECODE_ARP - * Makefile LUFA_OPTS + * NetworkConfig.h * When defined, received ARP headers will not be decoded and printed to the device serial port. * * * NO_DECODE_IP - * Makefile LUFA_OPTS + * NetworkConfig.h * When defined, received IP headers will not be decoded and printed to the device serial port. * * * NO_DECODE_ICMP - * Makefile LUFA_OPTS + * NetworkConfig.h * When defined, received ICMP headers will not be decoded and printed to the device serial port. * * * NO_DECODE_TCP - * Makefile LUFA_OPTS + * NetworkConfig.h * When defined, received TCP headers will not be decoded and printed to the device serial port. * * * NO_DECODE_UDP - * Makefile LUFA_OPTS + * NetworkConfig.h * When defined, received UDP headers will not be decoded and printed to the device serial port. * * * NO_DECODE_DHCP - * Makefile LUFA_OPTS + * NetworkConfig.h * When defined, received DHCP headers will not be decoded and printed to the device serial port. * * diff --git a/Demos/Device/LowLevel/RNDISEthernet/makefile b/Demos/Device/LowLevel/RNDISEthernet/makefile index cf092e7d5..53afd78e6 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/makefile +++ b/Demos/Device/LowLevel/RNDISEthernet/makefile @@ -120,19 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" - -LUFA_OPTS += -D NO_DECODE_ETHERNET -LUFA_OPTS += -D NO_DECODE_ARP -LUFA_OPTS += -D NO_DECODE_IP -LUFA_OPTS += -D NO_DECODE_ICMP -LUFA_OPTS += -D NO_DECODE_TCP -LUFA_OPTS += -D NO_DECODE_UDP -LUFA_OPTS += -D NO_DECODE_DHCP +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -187,7 +175,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. diff --git a/Demos/Device/LowLevel/VirtualSerial/Config/LUFAConfig.h b/Demos/Device/LowLevel/VirtualSerial/Config/LUFAConfig.h new file mode 100644 index 000000000..a1d748267 --- /dev/null +++ b/Demos/Device/LowLevel/VirtualSerial/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/Demos/Device/LowLevel/VirtualSerial/makefile b/Demos/Device/LowLevel/VirtualSerial/makefile index b3862a61e..1256bbdab 100644 --- a/Demos/Device/LowLevel/VirtualSerial/makefile +++ b/Demos/Device/LowLevel/VirtualSerial/makefile @@ -120,11 +120,7 @@ LUFA_PATH = ../../../.. # LUFA library compile-time options and predefined tokens -LUFA_OPTS = -D USB_DEVICE_ONLY -LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 -LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 -LUFA_OPTS += -D USE_FLASH_DESCRIPTORS -LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER # Create the LUFA source path variables by including the LUFA root makefile @@ -168,7 +164,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. -- cgit v1.2.3 From 7f4462267aeb1f40ad6a9d582168d1b07e53d7f2 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 13 May 2012 15:11:57 +0000 Subject: AppConfigHeaders: Oops - fix up AppConfig.h for the low level AudioOutput and AudioInput demos. --- .../Device/LowLevel/AudioInput/Config/AppConfig.h | 49 ++++++++++++++++++++++ .../Device/LowLevel/AudioOutput/Config/AppConfig.h | 5 ++- 2 files changed, 52 insertions(+), 2 deletions(-) (limited to 'Demos/Device/LowLevel') diff --git a/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h b/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h index e69de29bb..01101649a 100644 --- a/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h +++ b/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h @@ -0,0 +1,49 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief Application Configuration Header File + * + * This is a header file which is be used to configure some of + * the application's compile time options, as an alternative to + * specifying the compile time constants supplied through a + * makefile or build system. + * + * For information on what each token does, refer to the + * \ref Sec_Options section of the application documentation. + */ + +#ifndef _APP_CONFIG_H_ +#define _APP_CONFIG_H_ + + #define MICROPHONE_BIASED_TO_HALF_RAIL + #define USE_TEST_TONE + +#endif \ No newline at end of file diff --git a/Demos/Device/LowLevel/AudioOutput/Config/AppConfig.h b/Demos/Device/LowLevel/AudioOutput/Config/AppConfig.h index 01101649a..8524166c8 100644 --- a/Demos/Device/LowLevel/AudioOutput/Config/AppConfig.h +++ b/Demos/Device/LowLevel/AudioOutput/Config/AppConfig.h @@ -43,7 +43,8 @@ #ifndef _APP_CONFIG_H_ #define _APP_CONFIG_H_ - #define MICROPHONE_BIASED_TO_HALF_RAIL - #define USE_TEST_TONE + #define AUDIO_OUT_STEREO +// #define AUDIO_OUT_MONO +// #define AUDIO_OUT_PORTC #endif \ No newline at end of file -- cgit v1.2.3 From ae6a51492948d621907d3e62c03c2854e6fcc19c Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 13 May 2012 18:42:12 +0000 Subject: AppConfigHeaders: Fix branch validation errors. --- Demos/Device/LowLevel/AudioInput/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Demos/Device/LowLevel') diff --git a/Demos/Device/LowLevel/AudioInput/makefile b/Demos/Device/LowLevel/AudioInput/makefile index a917c82f1..c2288f7fc 100644 --- a/Demos/Device/LowLevel/AudioInput/makefile +++ b/Demos/Device/LowLevel/AudioInput/makefile @@ -164,7 +164,7 @@ DEBUG = dwarf-2 # Each directory must be seperated by a space. # Use forward slashes for directory separators. # For a directory that has spaces, enclose it in quotes. -EXTRAINCDIRS = $(LUFA_PATH)/ +EXTRAINCDIRS = $(LUFA_PATH)/ Config/ # Compiler flag to set the C Standard level. -- cgit v1.2.3 From e9e6730d4999bea6e0eaefc2fce062ef090388b8 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 13 May 2012 21:01:23 +0000 Subject: AppConfigHeaders: Move out the last of the demo/app configurations into new AppConfig.h header files. --- Demos/Device/LowLevel/AudioInput/AudioInput.c | 2 +- Demos/Device/LowLevel/AudioInput/AudioInput.h | 6 --- .../Device/LowLevel/AudioInput/Config/AppConfig.h | 2 + .../Device/LowLevel/GenericHID/Config/AppConfig.h | 48 +++++++++++++++++ Demos/Device/LowLevel/GenericHID/Descriptors.h | 5 +- Demos/Device/LowLevel/GenericHID/GenericHID.h | 3 +- Demos/Device/LowLevel/GenericHID/GenericHID.txt | 6 +-- .../Device/LowLevel/MassStorage/Config/AppConfig.h | 50 ++++++++++++++++++ .../LowLevel/MassStorage/Lib/DataflashManager.h | 7 +-- Demos/Device/LowLevel/MassStorage/MassStorage.h | 4 +- Demos/Device/LowLevel/MassStorage/MassStorage.txt | 7 ++- Demos/Device/LowLevel/Mouse/Mouse.h | 1 + .../LowLevel/RNDISEthernet/Config/AppConfig.h | 60 ++++++++++++++++++++++ .../LowLevel/RNDISEthernet/Config/NetworkConfig.h | 55 -------------------- Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h | 6 --- Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h | 3 +- .../LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h | 3 +- .../LowLevel/RNDISEthernet/RNDISEthernet.txt | 32 ++++++++---- 18 files changed, 200 insertions(+), 100 deletions(-) create mode 100644 Demos/Device/LowLevel/GenericHID/Config/AppConfig.h create mode 100644 Demos/Device/LowLevel/MassStorage/Config/AppConfig.h create mode 100644 Demos/Device/LowLevel/RNDISEthernet/Config/AppConfig.h delete mode 100644 Demos/Device/LowLevel/RNDISEthernet/Config/NetworkConfig.h (limited to 'Demos/Device/LowLevel') diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c index eb9c4b57c..925517b39 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.c +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c @@ -77,7 +77,7 @@ void SetupHardware(void) USB_Init(); /* Start the ADC conversion in free running mode */ - ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | MIC_IN_ADC_MUX_MASK); + ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_GET_CHANNEL_MASK(MIC_IN_ADC_CHANNEL)); } /** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs, and diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.h b/Demos/Device/LowLevel/AudioInput/AudioInput.h index fc2093716..0539e0694 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.h +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.h @@ -52,12 +52,6 @@ #include /* Macros: */ - /** ADC channel number for the microphone input. */ - #define MIC_IN_ADC_CHANNEL 2 - - /** ADC channel MUX mask for the microphone input. */ - #define MIC_IN_ADC_MUX_MASK ADC_CHANNEL2 - /** Maximum audio sample value for the microphone input. */ #define SAMPLE_MAX_RANGE 0xFFFF diff --git a/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h b/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h index 01101649a..7702e259a 100644 --- a/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h +++ b/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h @@ -43,6 +43,8 @@ #ifndef _APP_CONFIG_H_ #define _APP_CONFIG_H_ + #define MIC_IN_ADC_CHANNEL 2 + #define MICROPHONE_BIASED_TO_HALF_RAIL #define USE_TEST_TONE diff --git a/Demos/Device/LowLevel/GenericHID/Config/AppConfig.h b/Demos/Device/LowLevel/GenericHID/Config/AppConfig.h new file mode 100644 index 000000000..fccd16e3b --- /dev/null +++ b/Demos/Device/LowLevel/GenericHID/Config/AppConfig.h @@ -0,0 +1,48 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief Application Configuration Header File + * + * This is a header file which is be used to configure some of + * the application's compile time options, as an alternative to + * specifying the compile time constants supplied through a + * makefile or build system. + * + * For information on what each token does, refer to the + * \ref Sec_Options section of the application documentation. + */ + +#ifndef _APP_CONFIG_H_ +#define _APP_CONFIG_H_ + + #define GENERIC_REPORT_SIZE 8 + +#endif \ No newline at end of file diff --git a/Demos/Device/LowLevel/GenericHID/Descriptors.h b/Demos/Device/LowLevel/GenericHID/Descriptors.h index e47220a1c..d9b7d42d3 100644 --- a/Demos/Device/LowLevel/GenericHID/Descriptors.h +++ b/Demos/Device/LowLevel/GenericHID/Descriptors.h @@ -41,6 +41,8 @@ #include + #include "Config/AppConfig.h" + /* Type Defines: */ /** Type define for the device configuration descriptor structure. This must be defined in the * application code, as the configuration descriptor contains several sub-descriptors which @@ -67,9 +69,6 @@ /** Size in bytes of the Generic HID reporting endpoint. */ #define GENERIC_EPSIZE 8 - /** Size in bytes of the Generic HID reports (including report ID byte). */ - #define GENERIC_REPORT_SIZE 8 - /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.h b/Demos/Device/LowLevel/GenericHID/GenericHID.h index 0fe06bb67..29bcabcbd 100644 --- a/Demos/Device/LowLevel/GenericHID/GenericHID.h +++ b/Demos/Device/LowLevel/GenericHID/GenericHID.h @@ -45,7 +45,8 @@ #include #include "Descriptors.h" - + #include "Config/AppConfig.h" + #include #include #include diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.txt b/Demos/Device/LowLevel/GenericHID/GenericHID.txt index db8eb1cec..998471a2c 100644 --- a/Demos/Device/LowLevel/GenericHID/GenericHID.txt +++ b/Demos/Device/LowLevel/GenericHID/GenericHID.txt @@ -67,9 +67,9 @@ * * * GENERIC_REPORT_SIZE - * Descriptors.h - * This token defines the size of the device reports, both sent and received. The value must be an - * integer ranging from 1 to 255. + * AppConfig.h + * This token defines the size of the device reports, both sent and received (including report ID byte). The value + * must be an integer ranging from 1 to 255. * * */ diff --git a/Demos/Device/LowLevel/MassStorage/Config/AppConfig.h b/Demos/Device/LowLevel/MassStorage/Config/AppConfig.h new file mode 100644 index 000000000..2582279ea --- /dev/null +++ b/Demos/Device/LowLevel/MassStorage/Config/AppConfig.h @@ -0,0 +1,50 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief Application Configuration Header File + * + * This is a header file which is be used to configure some of + * the application's compile time options, as an alternative to + * specifying the compile time constants supplied through a + * makefile or build system. + * + * For information on what each token does, refer to the + * \ref Sec_Options section of the application documentation. + */ + +#ifndef _APP_CONFIG_H_ +#define _APP_CONFIG_H_ + + #define TOTAL_LUNS 1 + + #define DISK_READ_ONLY false + +#endif \ No newline at end of file diff --git a/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h b/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h index d70a86c19..7612ddadb 100644 --- a/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h +++ b/Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h @@ -45,7 +45,7 @@ #include #include #include - + /* Preprocessor Checks: */ #if (DATAFLASH_PAGE_SIZE % 16) #error Dataflash page size must be a multiple of 16 bytes. @@ -65,11 +65,6 @@ */ #define VIRTUAL_MEMORY_BLOCKS (VIRTUAL_MEMORY_BYTES / VIRTUAL_MEMORY_BLOCK_SIZE) - /** Total number of Logical Units (drives) in the device. The total device capacity is shared equally between - * each drive - this can be set to any positive non-zero amount. - */ - #define TOTAL_LUNS 1 - /** Blocks in each LUN, calculated from the total capacity divided by the total number of Logical Units in the device. */ #define LUN_MEDIA_BLOCKS (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS) diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.h b/Demos/Device/LowLevel/MassStorage/MassStorage.h index c1573706d..e457a6ed5 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.h +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.h @@ -46,6 +46,7 @@ #include "Lib/SCSI.h" #include "Lib/DataflashManager.h" + #include "Config/AppConfig.h" #include #include @@ -68,9 +69,6 @@ /** LED mask for the library LED driver, to indicate that the USB interface is busy. */ #define LEDMASK_USB_BUSY LEDS_LED2 - /** Indicates if the disk is write protected or not. */ - #define DISK_READ_ONLY false - /* Global Variables: */ extern MS_CommandBlockWrapper_t CommandBlock; extern MS_CommandStatusWrapper_t CommandStatus; diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.txt b/Demos/Device/LowLevel/MassStorage/MassStorage.txt index 8d0488265..35b47a46a 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.txt +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.txt @@ -83,10 +83,15 @@ * * * TOTAL_LUNS - * MassStorage.h + * AppConfig.h * Total number of Logical Units (drives) in the device. The total device capacity is shared equally between each drive * - this can be set to any positive non-zero amount. * + * + * DISK_READ_ONLY + * AppConfig.h + * Indicates if the disk should be write protected or not. + * * */ diff --git a/Demos/Device/LowLevel/Mouse/Mouse.h b/Demos/Device/LowLevel/Mouse/Mouse.h index c04f457a1..182ea2511 100644 --- a/Demos/Device/LowLevel/Mouse/Mouse.h +++ b/Demos/Device/LowLevel/Mouse/Mouse.h @@ -45,6 +45,7 @@ #include #include "Descriptors.h" + #include "Config/AppConfig.h" #include #include diff --git a/Demos/Device/LowLevel/RNDISEthernet/Config/AppConfig.h b/Demos/Device/LowLevel/RNDISEthernet/Config/AppConfig.h new file mode 100644 index 000000000..3b1ca5366 --- /dev/null +++ b/Demos/Device/LowLevel/RNDISEthernet/Config/AppConfig.h @@ -0,0 +1,60 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2012. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief Application Configuration Header File + * + * This is a header file which is be used to configure some of + * the application's compile time options, as an alternative to + * specifying the compile time constants supplied through a + * makefile or build system. + * + * For information on what each token does, refer to the + * \ref Sec_Options section of the application documentation. + */ + +#ifndef _APP_CONFIG_H_ +#define _APP_CONFIG_H_ + + #define CLIENT_IP_ADDRESS { 10, 0, 0, 1} + #define SERVER_IP_ADDRESS { 10, 0, 0, 2} + + #define ADAPTER_MAC_ADDRESS {0x02, 0x00, 0x02, 0x00, 0x02, 0x00} + #define SERVER_MAC_ADDRESS {0x00, 0x01, 0x00, 0x01, 0x00, 0x01} + + #define NO_DECODE_ETHERNET + #define NO_DECODE_ARP + #define NO_DECODE_IP + #define NO_DECODE_ICMP + #define NO_DECODE_TCP + #define NO_DECODE_UDP + #define NO_DECODE_DHCP + +#endif diff --git a/Demos/Device/LowLevel/RNDISEthernet/Config/NetworkConfig.h b/Demos/Device/LowLevel/RNDISEthernet/Config/NetworkConfig.h deleted file mode 100644 index e6ac093ad..000000000 --- a/Demos/Device/LowLevel/RNDISEthernet/Config/NetworkConfig.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2012. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, distribute, and sell this - software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in - all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - - The author disclaim all warranties with regard to this - software, including all implied warranties of merchantability - and fitness. In no event shall the author be liable for any - special, indirect or consequential damages or any damages - whatsoever resulting from loss of use, data or profits, whether - in an action of contract, negligence or other tortious action, - arising out of or in connection with the use or performance of - this software. -*/ - -/** \file - * \brief Network Configuration Header File - * - * This header file is used to configure various portions of the - * network stack used by the application. - * - * For information on what each token does, refer to the LUFA - * manual section "Summary of Compile Tokens". - */ - -#ifndef _NETWORK_CONFIG_H_ -#define _NETWORK_CONFIG_H_ - - #define CLIENT_IP_ADDRESS { 10, 0, 0, 1} - #define SERVER_IP_ADDRESS { 10, 0, 0, 2} - - #define NO_DECODE_ETHERNET - #define NO_DECODE_ARP - #define NO_DECODE_IP - #define NO_DECODE_ICMP - #define NO_DECODE_TCP - #define NO_DECODE_UDP - #define NO_DECODE_DHCP - -#endif diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h index 37d482de2..06be68926 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h @@ -50,12 +50,6 @@ #include "IP.h" /* Macros: */ - /** Physical MAC address of the USB RNDIS network adapter. */ - #define ADAPTER_MAC_ADDRESS {0x02, 0x00, 0x02, 0x00, 0x02, 0x00} - - /** Physical MAC address of the virtual server on the network. */ - #define SERVER_MAC_ADDRESS {0x00, 0x01, 0x00, 0x01, 0x00, 0x01} - /** Physical MAC address of the network broadcast address. */ #define BROADCAST_MAC_ADDRESS {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h index b878693bd..18c1c812b 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h @@ -43,8 +43,7 @@ #include "EthernetProtocols.h" #include "Ethernet.h" #include "ProtocolDecoders.h" - - #include "Config/NetworkConfig.h" + #include "Config/AppConfig.h" /* Macros: */ /** Protocol IP address of the broadcast address. */ diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h index b3ad1affd..bb640928d 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h @@ -45,8 +45,7 @@ #include "EthernetProtocols.h" #include "Ethernet.h" - - #include "Config/NetworkConfig.h" + #include "Config/AppConfig.h" /* Function Prototypes: */ void DecodeEthernetFrameHeader(void* InDataStart); diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt index 08cb05324..a458370da 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt +++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt @@ -85,47 +85,57 @@ * * * CLIENT_IP_ADDRESS - * NetworkConfig.h + * AppConfig.h * Configures the IP address given to the client (PC) via the DHCP server. * * - * HOST_IP_ADDRESS - * NetworkConfig.h - * Configures the IP address used in the virtual server for communications to/from the client. + * SERVER_IP_ADDRESS + * AppConfig.h + * Configures the IP address of the virtual server. + * + * + * ADAPTER_MAC_ADDRESS + * AppConfig.h + * Configures the MAC address of the RNDIS adapter on the host (PC) side. + * + * + * SERVER_MAC_ADDRESS + * AppConfig.h + * Configures the MAC address of the virtual server on the network. * * * NO_DECODE_ETHERNET - * NetworkConfig.h + * AppConfig.h * When defined, received Ethernet headers will not be decoded and printed to the device serial port. * * * NO_DECODE_ARP - * NetworkConfig.h + * AppConfig.h * When defined, received ARP headers will not be decoded and printed to the device serial port. * * * NO_DECODE_IP - * NetworkConfig.h + * AppConfig.h * When defined, received IP headers will not be decoded and printed to the device serial port. * * * NO_DECODE_ICMP - * NetworkConfig.h + * AppConfig.h * When defined, received ICMP headers will not be decoded and printed to the device serial port. * * * NO_DECODE_TCP - * NetworkConfig.h + * AppConfig.h * When defined, received TCP headers will not be decoded and printed to the device serial port. * * * NO_DECODE_UDP - * NetworkConfig.h + * AppConfig.h * When defined, received UDP headers will not be decoded and printed to the device serial port. * * * NO_DECODE_DHCP - * NetworkConfig.h + * AppConfig.h * When defined, received DHCP headers will not be decoded and printed to the device serial port. * * -- cgit v1.2.3 From cb9e7392c5f9f1c51710df1b4bbe1aa11168576f Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 15 May 2012 19:51:41 +0000 Subject: AppConfigHeaders: Make sure that in applications using an AppConfig.h configuration file, all application headers include the configuration file. --- Demos/Device/LowLevel/AudioInput/AudioInput.h | 1 - Demos/Device/LowLevel/AudioInput/Descriptors.h | 2 ++ Demos/Device/LowLevel/AudioOutput/AudioOutput.h | 1 - Demos/Device/LowLevel/AudioOutput/Descriptors.h | 2 ++ Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h | 1 - Demos/Device/LowLevel/GenericHID/GenericHID.h | 1 - Demos/Device/LowLevel/Joystick/Joystick.h | 1 - Demos/Device/LowLevel/Keyboard/Keyboard.h | 1 - Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h | 1 - Demos/Device/LowLevel/MIDI/MIDI.h | 1 - Demos/Device/LowLevel/MassStorage/Descriptors.h | 2 ++ Demos/Device/LowLevel/MassStorage/MassStorage.h | 1 - Demos/Device/LowLevel/Mouse/Mouse.h | 1 - Demos/Device/LowLevel/RNDISEthernet/Descriptors.h | 2 ++ Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h | 2 ++ Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h | 4 ++-- Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h | 1 - 17 files changed, 12 insertions(+), 13 deletions(-) (limited to 'Demos/Device/LowLevel') diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.h b/Demos/Device/LowLevel/AudioInput/AudioInput.h index 0539e0694..f534e8198 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.h +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.h @@ -45,7 +45,6 @@ #include "Descriptors.h" #include "Config/AppConfig.h" - #include #include #include #include diff --git a/Demos/Device/LowLevel/AudioInput/Descriptors.h b/Demos/Device/LowLevel/AudioInput/Descriptors.h index 4680294c9..7c419a2f7 100644 --- a/Demos/Device/LowLevel/AudioInput/Descriptors.h +++ b/Demos/Device/LowLevel/AudioInput/Descriptors.h @@ -41,6 +41,8 @@ #include + #include "Config/AppConfig.h" + /* Macros: */ /** Endpoint address of the Audio isochronous streaming data IN endpoint. */ #define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_IN | 1) diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h index 3bcfc239e..fad49ec09 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h @@ -45,7 +45,6 @@ #include "Descriptors.h" #include "Config/AppConfig.h" - #include #include #include diff --git a/Demos/Device/LowLevel/AudioOutput/Descriptors.h b/Demos/Device/LowLevel/AudioOutput/Descriptors.h index e0c756744..c8b7feaf1 100644 --- a/Demos/Device/LowLevel/AudioOutput/Descriptors.h +++ b/Demos/Device/LowLevel/AudioOutput/Descriptors.h @@ -41,6 +41,8 @@ #include + #include "Config/AppConfig.h" + /* Macros: */ /** Endpoint address of the Audio isochronous streaming data OUT endpoint. */ #define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_OUT | 1) diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h index cf7316ca6..5edbb18fe 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h +++ b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h @@ -45,7 +45,6 @@ #include "Descriptors.h" - #include #include #include #include diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.h b/Demos/Device/LowLevel/GenericHID/GenericHID.h index 29bcabcbd..26e63ce98 100644 --- a/Demos/Device/LowLevel/GenericHID/GenericHID.h +++ b/Demos/Device/LowLevel/GenericHID/GenericHID.h @@ -47,7 +47,6 @@ #include "Descriptors.h" #include "Config/AppConfig.h" - #include #include #include diff --git a/Demos/Device/LowLevel/Joystick/Joystick.h b/Demos/Device/LowLevel/Joystick/Joystick.h index f3cdf36b7..7a7cf6111 100644 --- a/Demos/Device/LowLevel/Joystick/Joystick.h +++ b/Demos/Device/LowLevel/Joystick/Joystick.h @@ -45,7 +45,6 @@ #include "Descriptors.h" - #include #include #include #include diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.h b/Demos/Device/LowLevel/Keyboard/Keyboard.h index 4936527e3..140fa0265 100644 --- a/Demos/Device/LowLevel/Keyboard/Keyboard.h +++ b/Demos/Device/LowLevel/Keyboard/Keyboard.h @@ -47,7 +47,6 @@ #include "Descriptors.h" - #include #include #include #include diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h index a50a29e23..fe0c65015 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h +++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h @@ -42,7 +42,6 @@ #include "Descriptors.h" - #include #include #include #include diff --git a/Demos/Device/LowLevel/MIDI/MIDI.h b/Demos/Device/LowLevel/MIDI/MIDI.h index 8b08ddc1c..f270c09f9 100644 --- a/Demos/Device/LowLevel/MIDI/MIDI.h +++ b/Demos/Device/LowLevel/MIDI/MIDI.h @@ -45,7 +45,6 @@ #include "Descriptors.h" - #include #include #include #include diff --git a/Demos/Device/LowLevel/MassStorage/Descriptors.h b/Demos/Device/LowLevel/MassStorage/Descriptors.h index 34a85f6d1..3732ee879 100644 --- a/Demos/Device/LowLevel/MassStorage/Descriptors.h +++ b/Demos/Device/LowLevel/MassStorage/Descriptors.h @@ -41,6 +41,8 @@ #include + #include "Config/AppConfig.h" + /* Macros: */ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3) diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.h b/Demos/Device/LowLevel/MassStorage/MassStorage.h index e457a6ed5..37f3ae5a3 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.h +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.h @@ -48,7 +48,6 @@ #include "Lib/DataflashManager.h" #include "Config/AppConfig.h" - #include #include #include #include diff --git a/Demos/Device/LowLevel/Mouse/Mouse.h b/Demos/Device/LowLevel/Mouse/Mouse.h index 182ea2511..b304a61bc 100644 --- a/Demos/Device/LowLevel/Mouse/Mouse.h +++ b/Demos/Device/LowLevel/Mouse/Mouse.h @@ -47,7 +47,6 @@ #include "Descriptors.h" #include "Config/AppConfig.h" - #include #include #include #include diff --git a/Demos/Device/LowLevel/RNDISEthernet/Descriptors.h b/Demos/Device/LowLevel/RNDISEthernet/Descriptors.h index 6337335ac..dd9bdd014 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Descriptors.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Descriptors.h @@ -41,6 +41,8 @@ #include + #include "Config/AppConfig.h" + /* Macros: */ /** Endpoint address of the CDC device-to-host data IN endpoint. */ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 1) diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h index 06be68926..45ba0cfd4 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h @@ -40,6 +40,8 @@ #include #include + #include "Config/AppConfig.h" + #include "EthernetProtocols.h" #include "ProtocolDecoders.h" #include "ICMP.h" diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h index 6a91586a7..155544cc0 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h +++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h @@ -50,8 +50,8 @@ #include "Lib/TCP.h" #include "Lib/ARP.h" #include "Lib/Webserver.h" - - #include + #include "Config/AppConfig.h" + #include #include #include diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h index a62b468e2..311f5090b 100644 --- a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h +++ b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h @@ -45,7 +45,6 @@ #include "Descriptors.h" - #include #include #include #include -- cgit v1.2.3 From 666088a38818e371cc8ad89360c960d86b311a49 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 15 May 2012 21:01:40 +0000 Subject: AppConfigHeaders: Fix branch validation error. --- Demos/Device/LowLevel/Mouse/Mouse.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Demos/Device/LowLevel') diff --git a/Demos/Device/LowLevel/Mouse/Mouse.h b/Demos/Device/LowLevel/Mouse/Mouse.h index b304a61bc..94e74df82 100644 --- a/Demos/Device/LowLevel/Mouse/Mouse.h +++ b/Demos/Device/LowLevel/Mouse/Mouse.h @@ -45,8 +45,7 @@ #include #include "Descriptors.h" - #include "Config/AppConfig.h" - + #include #include #include -- cgit v1.2.3