Skip to content

Commit

Permalink
descriptor_parser added
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Mazurov committed May 17, 2010
1 parent 0a44fda commit 4d1a10b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions examples/descriptor_parser.h
Expand Up @@ -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";
Expand All @@ -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";
Expand Down Expand Up @@ -281,4 +279,4 @@ const char * usage_pages [] PROGMEM =
up_uni
};

#endif //_DESCRIPTOR_PARSER_
#endif //_DESCRIPTOR_PARSER_
3 changes: 2 additions & 1 deletion examples/descriptor_parser.pde
Expand Up @@ -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();
Expand Down Expand Up @@ -711,4 +712,4 @@ void printProgStr(const char* str)
Serial.print(c,BYTE);
}
return;
}
}

0 comments on commit 4d1a10b

Please sign in to comment.