Add dmesg, compilation fixes

This commit is contained in:
Michal Moskal
2017-07-01 12:43:10 +02:00
parent 33b9bba2a9
commit 2fe2f93abc
4 changed files with 24 additions and 9 deletions

View File

@ -4,6 +4,18 @@
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
#include <cstdarg>
void dmesg(const char *format, ...) {
char buf[500];
va_list arg;
va_start(arg, format);
vsnprintf(buf, sizeof(buf), format, arg);
va_end(arg);
fprintf(stderr, "DMESG: %s\n", buf);
}
namespace pxt {
@ -73,5 +85,4 @@ uint32_t afterProgramPage() {
void dumpDmesg() {
// TODO
}
}