From 4d1a10b53e6fc0fbd4d50acc159386460a926400 Mon Sep 17 00:00:00 2001 From: Oleg Mazurov Date: Mon, 17 May 2010 16:51:59 -0600 Subject: [PATCH] descriptor_parser added --- examples/descriptor_parser.h | 4 +--- examples/descriptor_parser.pde | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/descriptor_parser.h b/examples/descriptor_parser.h index 7570841..0ad3c8b 100644 --- a/examples/descriptor_parser.h +++ b/examples/descriptor_parser.h @@ -8,7 +8,6 @@ typedef void (*PARSE)( uint8_t bytes ); /* Common Messages */ - const char descr_len [] PROGMEM = "\r\nDescriptor Length:\t"; const char descr_type [] PROGMEM = "\r\nDescriptor type:\t"; const char class_str [] PROGMEM = "\r\nClass:\t\t\t"; @@ -20,7 +19,6 @@ const char reserved_msg [] PROGMEM = "Reserved"; const char rcode_error_msg [] PROGMEM = "\r\nRequest error. Reurn code: "; /* Endpoint attributes */ - const char control_tr [] PROGMEM = "Control"; const char iso_tr [] PROGMEM = "Isochronous"; const char bulk_tr [] PROGMEM = "Bulk"; @@ -281,4 +279,4 @@ const char * usage_pages [] PROGMEM = up_uni }; -#endif //_DESCRIPTOR_PARSER_ +#endif //_DESCRIPTOR_PARSER_ diff --git a/examples/descriptor_parser.pde b/examples/descriptor_parser.pde index c41d28e..4bf1a38 100644 --- a/examples/descriptor_parser.pde +++ b/examples/descriptor_parser.pde @@ -12,6 +12,7 @@ #define getReportDescr( addr, ep, nbytes, parse_func, nak_limit ) ctrlXfer( addr, ep, bmREQ_HIDREPORT, USB_REQUEST_GET_DESCRIPTOR, 0x00, HID_DESCRIPTOR_REPORT, 0x0000, nbytes, parse_func, nak_limit ) #define getReport( addr, ep, nbytes, interface, report_type, report_id, parse_func, nak_limit ) ctrlXfer( addr, ep, bmREQ_HIDIN, HID_REQUEST_GET_REPORT, report_id, report_type, interface, nbytes, parse_func, nak_limit ) + /* Foeward declarations */ void setup(); void loop(); @@ -711,4 +712,4 @@ void printProgStr(const char* str) Serial.print(c,BYTE); } return; -} +}