Permalink
Browse files

descriptor_parser added

  • Loading branch information...
1 parent 0a44fda commit 4d1a10b53e6fc0fbd4d50acc159386460a926400 @felis committed May 17, 2010
Showing with 3 additions and 4 deletions.
  1. +1 −3 examples/descriptor_parser.h
  2. +2 −1 examples/descriptor_parser.pde
@@ -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_
@@ -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;
-}
+}

0 comments on commit 4d1a10b

Please sign in to comment.