Output Buffer
//*****************************************
//*****************************************
//********** DEBUG OUTPUT BUFFER **********
//*****************************************
//*****************************************
void DebugOutputBuffer (uint8_t* Buffer, int Length)
{
int Index;
for (Index = 0; Index < Length; Index++)
{
printf("%02X ", Buffer[Index]);
if (( Index + 1 ) % 16 == 0)
{
printf("\n");
//vTaskDelay(10 / portTICK_PERIOD_MS); //<You may need this to avoid overloading FreeRTOS for big buffers
}
if (( Index + 1 ) % 256 == 0)
{
printf("\n");
}
}
printf("\n");
}
Output null terminated buffer
//*****************************************
//*****************************************
//********** DEBUG OUTPUT BUFFER **********
//*****************************************
//*****************************************
void DebugOutputNullTerminatedBuffer (char* Buffer)
{
int Index = 0;
while (Buffer[Index] != 0x00)
{
printf("%02X ", Buffer[Index]);
if (( Index + 1 ) % 16 == 0)
{
printf("\n");
//vTaskDelay(10 / portTICK_PERIOD_MS); //<You may need this to avoid overloading FreeRTOS for big buffers
}
if (( Index + 1 ) % 256 == 0)
{
printf("\n");
}
Index++;
}
printf("\n");
}
