The PBL has console support now, so add memory_display support aswell which can be a good debugging aid. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
43 lines
560 B
C
43 lines
560 B
C
#include <common.h>
|
|
#include <debug_ll.h>
|
|
|
|
int printf(const char *fmt, ...)
|
|
{
|
|
va_list args;
|
|
uint i;
|
|
char printbuffer[CFG_PBSIZE];
|
|
|
|
va_start(args, fmt);
|
|
i = vsprintf(printbuffer, fmt, args);
|
|
va_end(args);
|
|
|
|
puts_ll(printbuffer);
|
|
|
|
return i;
|
|
}
|
|
|
|
int pr_print(int level, const char *fmt, ...)
|
|
{
|
|
va_list args;
|
|
uint i;
|
|
char printbuffer[CFG_PBSIZE];
|
|
|
|
va_start(args, fmt);
|
|
i = vsprintf(printbuffer, fmt, args);
|
|
va_end(args);
|
|
|
|
puts_ll(printbuffer);
|
|
|
|
return i;
|
|
}
|
|
|
|
int ctrlc(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
void console_putc(unsigned int ch, char c)
|
|
{
|
|
putc_ll(c);
|
|
}
|