mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
[ion] Add stdio console
Change-Id: If608587fb88912c887a26fb1ba729740357d39c9
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
objs += $(addprefix ion/src/blackbox/, boot.o ion.o)
|
||||
objs += $(addprefix ion/src/shared/, \
|
||||
console_line.o \
|
||||
console_stdio.o \
|
||||
crc32.o \
|
||||
events.o \
|
||||
events_stdin.o \
|
||||
@@ -7,5 +9,6 @@ objs += $(addprefix ion/src/shared/, \
|
||||
)
|
||||
|
||||
ion/src/shared/log_printf.o: SFLAGS=-Iion/include
|
||||
ion/src/shared/console_stdio.o: SFLAGS=-Iion/include
|
||||
ion/src/shared/events_stdin.o: SFLAGS=-Iion/include
|
||||
ion/src/shared/random.o: SFLAGS=-Iion/include
|
||||
|
||||
17
ion/src/shared/console_stdio.cpp
Normal file
17
ion/src/shared/console_stdio.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <ion/console.h>
|
||||
#include <stdio.h>
|
||||
|
||||
namespace Ion {
|
||||
namespace Console {
|
||||
|
||||
char readChar() {
|
||||
return getchar();
|
||||
}
|
||||
|
||||
void writeChar(char c) {
|
||||
printf("%c", c);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@ objs += $(addprefix ion/src/simulator/keyboard/, fltkkbd.o)
|
||||
|
||||
objs += $(addprefix ion/src/shared/, \
|
||||
crc32.o \
|
||||
console_line.o \
|
||||
console_stdio.o \
|
||||
events_keyboard.o \
|
||||
power.o \
|
||||
random.o \
|
||||
|
||||
Reference in New Issue
Block a user