summaryrefslogtreecommitdiff
path: root/src/arch/blinkenrocket
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-08-28 15:25:37 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-08-28 15:25:37 +0200
commit3a66ae51c3f34108428e582ef693866d71496d16 (patch)
tree6a8ab3774af1b1077720671a92f40a92d5425bcf /src/arch/blinkenrocket
parente12d6d528705344628568000dc2fddb919457411 (diff)
Expose configuration via Kconfig
Diffstat (limited to 'src/arch/blinkenrocket')
-rw-r--r--src/arch/blinkenrocket/Kconfig10
-rw-r--r--src/arch/blinkenrocket/Makefile.inc21
-rw-r--r--src/arch/blinkenrocket/arch.cc4
-rw-r--r--src/arch/blinkenrocket/prompt1
4 files changed, 31 insertions, 5 deletions
diff --git a/src/arch/blinkenrocket/Kconfig b/src/arch/blinkenrocket/Kconfig
new file mode 100644
index 0000000..5b9a830
--- /dev/null
+++ b/src/arch/blinkenrocket/Kconfig
@@ -0,0 +1,10 @@
+config arch_blinkenrocket_driver_i2c
+bool "I2C"
+select meta_driver_i2c
+
+config arch_blinkenrocket_driver_uptime
+bool "Uptime Counter"
+select meta_driver_uptime
+
+config arch_blinkenrocket_kout_nop
+bool "Disable UART emulation for stdout"
diff --git a/src/arch/blinkenrocket/Makefile.inc b/src/arch/blinkenrocket/Makefile.inc
index ea4e183..ba66152 100644
--- a/src/arch/blinkenrocket/Makefile.inc
+++ b/src/arch/blinkenrocket/Makefile.inc
@@ -22,13 +22,32 @@ endif
CXX_TARGETS += src/arch/blinkenrocket/arch.cc
CXX_TARGETS += src/arch/blinkenrocket/driver/gpio.cc
CXX_TARGETS += src/arch/blinkenrocket/driver/stdout.cc
-CXX_TARGETS += src/arch/blinkenrocket/driver/uptime.cc
ifneq ($(findstring softi2c,${drivers}), )
else ifneq ($(findstring i2c,${arch_drivers}), )
+ CONFIG_arch_blinkenrocket_driver_i2c = y
+endif
+
+ifeq (${timer_s}, 1)
+ CONFIG_arch_blinkenrocket_driver_uptime = y
+endif
+
+ifdef CONFIG_arch_blinkenrocket_driver_i2c
CXX_TARGETS += src/arch/blinkenrocket/driver/i2c.cc
endif
+ifdef CONFIG_arch_blinkenrocket_driver_uptime
+ COMMON_FLAGS += -DTIMER_S
+ CXX_TARGETS += src/arch/blinkenrocket/driver/uptime.cc
+endif
+
+ifeq (${kout_nop}, 1)
+ COMMON_FLAGS += -DKOUT_NOP
+endif
+ifdef CONFIG_arch_blinkenrocket_kout_nop
+ COMMON_FLAGS += -DKOUT_NOP
+endif
+
OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o}
.cc.o:
diff --git a/src/arch/blinkenrocket/arch.cc b/src/arch/blinkenrocket/arch.cc
index 1261515..d49bfda 100644
--- a/src/arch/blinkenrocket/arch.cc
+++ b/src/arch/blinkenrocket/arch.cc
@@ -5,10 +5,6 @@
void Arch::setup(void)
{
-#ifdef TIMER_CYCLES
- TCCR0A = _BV(CS00);
-#endif
-
#if defined(WITH_LOOP) || defined(TIMER_S)
TCCR1A = 0;
TCCR1B = _BV(WGM12) | _BV(CS12) | _BV(CS10); // /1024
diff --git a/src/arch/blinkenrocket/prompt b/src/arch/blinkenrocket/prompt
new file mode 100644
index 0000000..9972aaa
--- /dev/null
+++ b/src/arch/blinkenrocket/prompt
@@ -0,0 +1 @@
+Blinkenrocket