aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/Incomplete
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 /Projects/Incomplete
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 'Projects/Incomplete')
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Descriptors.c8
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Descriptors.h20
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/DiskDevice.c21
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/DiskHost.c15
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c2
5 files changed, 37 insertions, 29 deletions
diff --git a/Projects/Incomplete/StandaloneProgrammer/Descriptors.c b/Projects/Incomplete/StandaloneProgrammer/Descriptors.c
index a3319e4ab..61176e607 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Descriptors.c
+++ b/Projects/Incomplete/StandaloneProgrammer/Descriptors.c
@@ -120,20 +120,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/Projects/Incomplete/StandaloneProgrammer/Descriptors.h b/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
index 250fcf79b..c0e8f46d7 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
+++ b/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
@@ -42,14 +42,14 @@
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 5
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 5)
- /** 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
@@ -57,11 +57,11 @@
/** Size in bytes of the CDC data IN and OUT endpoints. */
#define CDC_TXRX_EPSIZE 16
- /** 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/Projects/Incomplete/StandaloneProgrammer/DiskDevice.c b/Projects/Incomplete/StandaloneProgrammer/DiskDevice.c
index bc70910e7..73bf5545a 100644
--- a/Projects/Incomplete/StandaloneProgrammer/DiskDevice.c
+++ b/Projects/Incomplete/StandaloneProgrammer/DiskDevice.c
@@ -40,15 +40,18 @@ USB_ClassInfo_MS_Device_t DiskDevice_MS_Interface =
.Config =
{
.InterfaceNumber = 0,
-
- .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
- .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
- .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
+ .DataINEndpoint =
+ {
+ .Address = MASS_STORAGE_IN_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MASS_STORAGE_OUT_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
.TotalLUNs = 1,
},
};
diff --git a/Projects/Incomplete/StandaloneProgrammer/DiskHost.c b/Projects/Incomplete/StandaloneProgrammer/DiskHost.c
index 1dafda43b..c93029c06 100644
--- a/Projects/Incomplete/StandaloneProgrammer/DiskHost.c
+++ b/Projects/Incomplete/StandaloneProgrammer/DiskHost.c
@@ -39,11 +39,16 @@ USB_ClassInfo_MS_Host_t DiskHost_MS_Interface =
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
},
};
diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c b/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c
index cac0bd957..d953875a2 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c
+++ b/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c
@@ -5,7 +5,7 @@
#include "diskio.h"
#include <string.h>
-#include <LUFA/Drivers/USB/Class/MassStorage.h>
+#include <LUFA/Drivers/USB/USB.h>
#include "../DataflashManager.h"
#include "../../DiskHost.h"