diff --git a/cores/nRF5/utility/debug.cpp b/cores/nRF5/utility/debug.cpp index 4bbe866a..666fd32b 100644 --- a/cores/nRF5/utility/debug.cpp +++ b/cores/nRF5/utility/debug.cpp @@ -106,14 +106,14 @@ static void printMemRegion(const char* name, uint32_t top, uint32_t bottom, uint sprintf(buffer, "%lu", top-bottom); } - printf("| %-5s| 0x%04X - 0x%04X | %-19s |\n", name, (uint16_t) bottom, (uint16_t) (top-1), buffer); + PRINTF("| %-5s| 0x%04X - 0x%04X | %-19s |\n", name, (uint16_t) bottom, (uint16_t) (top-1), buffer); } void dbgMemInfo(void) { - printf(" ______________________________________________\n"); - printf("| Name | Addr 0x2000xxxx | Usage |\n"); - printf("| ---------------------------------------------|\n"); + PRINTF(" ______________________________________________\n"); + PRINTF("| Name | Addr 0x2000xxxx | Usage |\n"); + PRINTF("| ---------------------------------------------|\n"); // Pritn SRAM used for Stack executed by Softdevice and ISR printMemRegion("Stack", ((uint32_t) __StackTop), ((uint32_t) __StackLimit), dbgStackUsed() ); @@ -127,8 +127,8 @@ void dbgMemInfo(void) // Print SRAM Used by SoftDevice printMemRegion("SD", (uint32_t) __data_start__, 0x20000000, 0); - printf("|______________________________________________|\n"); - printf("\n"); + PRINTF("|______________________________________________|\n"); + PRINTF("\n"); // Print Task list uint32_t tasknum = uxTaskGetNumberOfTasks(); @@ -136,20 +136,20 @@ void dbgMemInfo(void) vTaskList(buf); - printf("Task State Prio StackLeft Num\n"); - printf("-----------------------------------\n"); - printf(buf); - printf("\n"); + PRINTF("Task State Prio StackLeft Num\n"); + PRINTF("-----------------------------------\n"); + PRINTF(buf); + PRINTF("\n"); rtos_free(buf); } void dbgPrintVersion(void) { - printf("\n"); - printf("BSP Library : " ARDUINO_BSP_VERSION "\n"); - printf("Bootloader : %s\n", getBootloaderVersion()); - printf("Serial No : %s\n", getMcuUniqueID()); - printf("\n"); + PRINTF("\n"); + PRINTF("BSP Library : " ARDUINO_BSP_VERSION "\n"); + PRINTF("Bootloader : %s\n", getBootloaderVersion()); + PRINTF("Serial No : %s\n", getMcuUniqueID()); + PRINTF("\n"); } /******************************************************************************/ @@ -163,7 +163,7 @@ static void dump_str_line(uint8_t const* buf, uint16_t count) for(int i=0; i