update for SWO - hw validation menu integrated
git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@239 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "uart.h"
|
||||
|
||||
#include "stm32f10x_rtc.h"
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -269,14 +271,16 @@ static void loggerTask(void* parameters)
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t seconds = RTC_GetCounter();
|
||||
|
||||
#if defined(ENABLE_SERIAL_LOGGING)
|
||||
// Formatted print
|
||||
snprintf(str, sizeof(str) / sizeof(str[0]), "%s[%s] %s, %s, %d: %s%s\n",
|
||||
snprintf(str, sizeof(str) / sizeof(str[0]), "%s[%s] %09d %s, %s, %d: %s%s\n",
|
||||
vt100Prefix,
|
||||
(logQueueItem.logType == LOGTYPE_DEBUG) ? "DBG" :
|
||||
(logQueueItem.logType == LOGTYPE_INFO) ? "INF" :
|
||||
(logQueueItem.logType == LOGTYPE_WARNING) ? "WRN" : "ERR",
|
||||
seconds,
|
||||
logQueueItem.fileName,
|
||||
logQueueItem.functionName,
|
||||
logQueueItem.lineNumber,
|
||||
@@ -288,12 +292,6 @@ static void loggerTask(void* parameters)
|
||||
IODevice_write(self->loggingDevice, str, strlen(str));
|
||||
#endif
|
||||
|
||||
char buffer[5] = {0,};
|
||||
size_t actualLength = 0;
|
||||
IODevice_read(self->loggingDevice, buffer, 5, &actualLength);
|
||||
|
||||
snprintf(str, sizeof(str) / sizeof(str[0]), "%d - %x %x %x %x %x", actualLength, buffer[0], buffer[1], buffer[2], buffer[3], buffer[4]);
|
||||
IODevice_write(self->loggingDevice, str, strlen(str));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user