Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: ce18cf4763
Fetching contributors…

Cannot retrieve contributors at this time

136 lines (129 sloc) 2.78 kB
#include <setupdat.h>
#include "descriptors.h"
#pragma constseg DSCR_AREA
__code struct device_descriptor dev_dscr = {
sizeof(struct device_descriptor),
DSCR_DEVICE_TYPE,
0x0200,
0xff,
0xff,
0xff,
64,
0x0547,
0xff01,
0x0001,
2,
1,
0,
1
};
__code struct qualifier_descriptor dev_qual_dscr = {
sizeof(struct qualifier_descriptor),
DSCR_DEVQUAL_TYPE,
0x0200,
0xff,
0xff,
0xff,
64,
1,
0
};
__code struct highspd_dscr_t {
struct configuration_descriptor descriptor;
struct interface_descriptor interface;
struct endpoint_descriptor endpoint2;
struct endpoint_descriptor endpoint6;
} highspd_dscr = {
{
sizeof(struct configuration_descriptor),
DSCR_CONFIG_TYPE,
sizeof(struct highspd_dscr_t),
1,
1,
0,
0x80,
0x32
},
{
sizeof(struct interface_descriptor),
DSCR_INTERFACE_TYPE,
0,
0,
2,
0xff,
0xff,
0xff,
3
},
{
sizeof(struct endpoint_descriptor),
DSCR_ENDPOINT_TYPE,
0x02,
ENDPOINT_TYPE_BULK,
512,
0x00
},
{
sizeof(struct endpoint_descriptor),
DSCR_ENDPOINT_TYPE,
0x86,
ENDPOINT_TYPE_BULK,
512,
0x00
}
};
__code struct fullspd_dscr_t {
struct configuration_descriptor descriptor;
struct interface_descriptor interface;
struct endpoint_descriptor endpoint2;
struct endpoint_descriptor endpoint6;
} fullspd_dscr = {
{
sizeof(struct configuration_descriptor),
DSCR_CONFIG_TYPE,
sizeof(struct fullspd_dscr_t),
1,
1,
0,
0x80,
0x32
},
{
sizeof(struct interface_descriptor),
DSCR_INTERFACE_TYPE,
0,
0,
2,
0xff,
0xff,
0xff,
3
},
{
sizeof(struct endpoint_descriptor),
DSCR_ENDPOINT_TYPE,
0x02,
ENDPOINT_TYPE_BULK,
64,
0x00
},
{
sizeof(struct endpoint_descriptor),
DSCR_ENDPOINT_TYPE,
0x86,
ENDPOINT_TYPE_BULK,
64,
0x00
}
};
// Strings are no go for now, need to adjust setupdat.c
//#define USB_STRING(str) {sizeof(str) + 1, DSCR_STRING_TYPE, str}
//
//__code __at 0x3e00+sizeof(struct device_descriptor)+sizeof(struct qualifier_descriptor)+sizeof(struct highspd_dscr_t)+sizeof(struct fullspd_dscr_t)
//__code
//struct usb_string dev_strings[2] = {
// {sizeof("H\0i\0!") + 1, DSCR_STRING_TYPE, "H\0i\0!"}
// {sizeof("H\0i\0!") + 1, DSCR_STRING_TYPE, "H\0i\0!"}
// USB_STRING("H\0i\0!\0"),
// USB_STRING("T\0h\0e\0r\0e\0")
//};
Jump to Line
Something went wrong with that request. Please try again.