[ion] Get rid of log

Change-Id: Icf37d4cedb1cc3ffbc9e020cdb7b4a89d543aa23
This commit is contained in:
Romain Goyet
2017-03-17 15:08:06 +01:00
parent c7b4890708
commit bfab275a88
9 changed files with 2 additions and 61 deletions

View File

@@ -53,17 +53,14 @@ void RunLoop::step() {
}
#if ESCHER_LOG_EVENTS_BINARY
char message[2] = { (char)event.id(), 0};
ion_log_string(message);
Ion::Console::writeChar((char)event.id());
#endif
#if ESCHER_LOG_EVENTS_NAME
const char * name = event.name();
if (name == nullptr) {
name = "UNDEFINED";
}
ion_log_string("Ion::Events::");
ion_log_string(name);
ion_log_string("\n");
Ion::Console::writeLine(name);
#endif
if (event != Ion::Events::None) {

View File

@@ -3,7 +3,6 @@ include ion/src/$(PLATFORM)/Makefile
objs += $(addprefix ion/src/shared/, \
events.o \
log_uint32.o \
)
tests += $(addprefix ion/test/,\

View File

@@ -9,7 +9,6 @@
#include <ion/events.h>
#include <ion/keyboard.h>
#include <ion/led.h>
#include <ion/log.h>
#include <ion/power.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,28 +0,0 @@
#ifndef ION_LOG_H
#define ION_LOG_H
// Ion offers a C-compatible logging API
#include <stdint.h>
#ifdef DEBUG
#ifdef __cplusplus
extern "C" {
#endif
void ion_log_string(const char * message);
void ion_log_uint32(uint32_t integer);
#ifdef __cplusplus
}
#endif
#else
#define ion_log_print_string(m) ((void)0)
#define ion_log_print_uint32(i) ((void)0)
#endif
#endif

View File

@@ -3,7 +3,6 @@ objs += $(addprefix ion/src/shared/, \
crc32.o \
events.o \
events_stdin.o \
log_printf.o \
power.o \
)

View File

@@ -14,7 +14,6 @@ objs += $(addprefix ion/src/device/, \
display.o\
keyboard.o\
led.o\
log.o\
power.o\
sd_card.o\
swd.o \

View File

@@ -1,7 +0,0 @@
#include <ion/log.h>
#include <stdio.h>
void ion_log_string(const char * message) {
printf("%s", message);
fflush(stdout);
}

View File

@@ -1,16 +0,0 @@
#include <ion/log.h>
#ifdef DEBUG
void ion_log_uint32(uint32_t i) {
char buffer[9];
for (int j=0; j<8; j++) {
uint8_t v = (i & 0xF);
buffer[8-1-j] = (v>9) ? 'A'+v-10 : '0'+v;
i = i >> 4;
}
buffer[8] = 0;
ion_log_string(buffer);
}
#endif

View File

@@ -10,7 +10,6 @@ objs += $(addprefix ion/src/simulator/keyboard/, fltkkbd.o)
objs += $(addprefix ion/src/shared/, \
crc32.o \
events_keyboard.o \
log_printf.o \
power.o \
random.o \
)