void DebugDumpBytes(A_UCHAR *buffer, A_UINT16 length, char *pDescription) { A_CHAR stream[60]; A_CHAR byteOffsetStr[10]; A_UINT32 i; A_UINT16 offset, count, byteOffset; A_PRINTF("<---------Dumping %d Bytes : %s ------>\n", length, pDescription); count = 0; offset = 0; byteOffset = 0; for(i = 0; i < length; i++) { A_SPRINTF(stream + offset, "%2.2X ", buffer[i]); count ++; offset += 3; if(count == 16) { count = 0; offset = 0; A_SPRINTF(byteOffsetStr,"%4.4X",byteOffset); A_PRINTF("[%s]: %s\n", byteOffsetStr, stream); A_MEMZERO(stream, 60); byteOffset += 16; } } if(offset != 0) { A_SPRINTF(byteOffsetStr,"%4.4X",byteOffset); A_PRINTF("[%s]: %s\n", byteOffsetStr, stream); } A_PRINTF("<------------------------------------------------->\n"); }
void DebugDumpBytes(A_UCHAR *buffer, A_UINT16 length, char *pDescription) { A_CHAR stream[60]; A_UINT32 i; A_UINT16 offset, count; AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("<---------Dumping %d Bytes : %s ------>\n", length, pDescription)); count = 0; offset = 0; for(i = 0; i < length; i++) { A_SPRINTF(stream + offset, "%2.2X ", buffer[i]); count ++; offset += 3; if(count == 16) { count = 0; offset = 0; AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("[H]: %s\n", stream)); A_MEMZERO(stream, 60); } } if(offset != 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("[H]: %s\n", stream)); } AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("<------------------------------------------------->\n")); }