USB host library, support isochronous,bulk,interrupt and control.

Dependents:   BaseUsbHost_example BaseJpegDecode_example SimpleJpegDecode_example

Import programBaseUsbHost_example

BaseUsbHost example program

Committer:
va009039
Date:
Mon Feb 11 12:00:47 2013 +0000
Revision:
5:8a2d056e9b38
Parent:
3:ae77d63a1eda
add GetStringDescriptor()

Who changed what in which revision?

UserRevisionLine numberNew contents of line
va009039 3:ae77d63a1eda 1 // BaseUsbHostDebug.h 2013/1/2
va009039 3:ae77d63a1eda 2 #pragma once
va009039 3:ae77d63a1eda 3
va009039 0:b7d6879637a8 4 #ifdef DEBUG
va009039 0:b7d6879637a8 5 #define DBG(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0);
va009039 0:b7d6879637a8 6 #define DBG_PRINTF(...) do{fprintf(stderr,__VA_ARGS__);}while(0);
va009039 0:b7d6879637a8 7 #define DBG_TD(A) do{fprintf(stderr,"[%s@%d]\n",__PRETTY_FUNCTION__,__LINE__);print_td(stderr,A);}while(0);
va009039 0:b7d6879637a8 8 #define DBG_ED(A) do{fprintf(stderr,"[%s@%d]\n",__PRETTY_FUNCTION__,__LINE__);print_ed(stderr,A);}while(0);
va009039 0:b7d6879637a8 9 #define DBG_ITD(A) do{fprintf(stderr,"[%s@%d]\n",__PRETTY_FUNCTION__,__LINE__);print_itd(stderr,A);}while(0);
va009039 0:b7d6879637a8 10 #define DBG_IED(A) do{fprintf(stderr,"[%s@%d]\n",__PRETTY_FUNCTION__,__LINE__);print_ied(stderr,A);}while(0);
va009039 0:b7d6879637a8 11 #define DBG_BYTES(A,B,C) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);print_bytes(stderr,A,B,C);}while(0);
va009039 0:b7d6879637a8 12 #define DBG_HEX(A,B) do{fprintf(stderr,"[%s@%d]\n",__PRETTY_FUNCTION__,__LINE__);print_hex(stderr,A,B);}while(0);
va009039 0:b7d6879637a8 13 #define DBG_OHCI(A) do{fprintf(stderr,"[%s@%d] %s: %08X\n",__PRETTY_FUNCTION__,__LINE__,#A,A);}while(0);
va009039 0:b7d6879637a8 14 #else //DEBUG
va009039 0:b7d6879637a8 15 #define DBG(...) while(0);
va009039 0:b7d6879637a8 16 #define DBG_PRINTF(...) while(0);
va009039 0:b7d6879637a8 17 #define DBG_TD(A) while(0);
va009039 0:b7d6879637a8 18 #define DBG_ED(A) while(0);
va009039 0:b7d6879637a8 19 #define DBG_ITD(A) while(0);
va009039 0:b7d6879637a8 20 #define DBG_IED(A) while(0);
va009039 0:b7d6879637a8 21 #define DBG_BYTES(A,B,C) while(0);
va009039 0:b7d6879637a8 22 #define DBG_HEX(A,B) while(0);
va009039 0:b7d6879637a8 23 #define DBG_OHCI(A) while(0);
va009039 0:b7d6879637a8 24 #endif //DEBUG
va009039 0:b7d6879637a8 25
va009039 0:b7d6879637a8 26 void print_td(FILE* stream, HCTD* td);
va009039 0:b7d6879637a8 27 void print_ed(FILE* stream, HCED* ed);
va009039 0:b7d6879637a8 28 void print_itd(FILE* stream, HCITD* itd);
va009039 0:b7d6879637a8 29 void print_ied(FILE* stream, HCED* ed);
va009039 0:b7d6879637a8 30 void print_bytes(FILE* stream, char* s, uint8_t* buf, int len);
va009039 0:b7d6879637a8 31 void print_hex(FILE* stream, uint8_t* p, int len);