Add branch for the conversion of demos to use standard C header files for configuration, rather than makefile defined macros.

This commit is contained in:
Dean Camera 2012-05-10 19:24:58 +00:00
parent e8570c4a37
commit 359fbfe14d
395 changed files with 9912 additions and 2756 deletions

View file

@ -136,10 +136,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
}
};

View file

@ -57,8 +57,8 @@
} USB_Descriptor_Configuration_t;
/* Macros: */
/** Endpoint number of the Mouse HID reporting IN endpoint. */
#define MOUSE_EPNUM 1
/** 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

View file

@ -48,11 +48,12 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Device_Interface =
.Config =
{
.InterfaceNumber = 0,
.ReportINEndpointNumber = MOUSE_EPNUM,
.ReportINEndpointSize = MOUSE_EPSIZE,
.ReportINEndpointDoubleBank = false,
.ReportINEndpoint =
{
.Address = MOUSE_EPADDR,
.Size = MOUSE_EPSIZE,
.Banks = 1,
},
.PrevReportINBuffer = PrevMouseHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer),
},

View file

@ -44,9 +44,16 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Host_Interface =
{
.Config =
{
.DataINPipeNumber = 1,
.DataOUTPipeNumber = 2,
.DataINPipe =
{
.Address = (PIPE_DIR_IN | 1),
.Banks = 1,
},
.DataINPipe =
{
.Address = (PIPE_DIR_OUT | 2),
.Banks = 1,
},
.HIDInterfaceProtocol = HID_CSCP_MouseBootProtocol,
},
};