aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/RNDISEthernet
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-05-10 19:24:58 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-05-10 19:24:58 +0000
commit359fbfe14d00ab378f85a36664820ea9ba538c3f (patch)
tree0929d5663a3be4dc078dda0aba5ba798ebb627ab /Demos/Device/ClassDriver/RNDISEthernet
parente8570c4a37e41117e3fd1e989e0b41f1e9608f3c (diff)
downloadlufa-359fbfe14d00ab378f85a36664820ea9ba538c3f.tar.gz
lufa-359fbfe14d00ab378f85a36664820ea9ba538c3f.tar.bz2
lufa-359fbfe14d00ab378f85a36664820ea9ba538c3f.zip
Add branch for the conversion of demos to use standard C header files for configuration, rather than makefile defined macros.
Diffstat (limited to 'Demos/Device/ClassDriver/RNDISEthernet')
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c10
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h12
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c31
3 files changed, 29 insertions, 24 deletions
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
index 41bc4b59e..d1ca1df04 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
+++ b/Demos/Device/ClassDriver/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/ClassDriver/RNDISEthernet/Descriptors.h b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h
index 7c40d87a1..6301b83aa 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h
@@ -42,14 +42,14 @@
#include <avr/pgmspace.h>
/* Macros: */
- /** 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)
- /** 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)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
index 2a8ba9735..37fb817de 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
@@ -45,19 +45,24 @@ USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface =
.Config =
{
.ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
-
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
.AdapterVendorDescription = "LUFA RNDIS Demo Adapter",
.AdapterMACAddress = {ADAPTER_MAC_ADDRESS},
},