aboutsummaryrefslogtreecommitdiff
path: root/examples/blink
diff options
context:
space:
mode:
Diffstat (limited to 'examples/blink')
-rw-r--r--examples/blink/Kconfig5
-rw-r--r--examples/blink/Makefile1
-rw-r--r--examples/blink/blink.c6
3 files changed, 9 insertions, 3 deletions
diff --git a/examples/blink/Kconfig b/examples/blink/Kconfig
index 9c3a502..ba7889c 100644
--- a/examples/blink/Kconfig
+++ b/examples/blink/Kconfig
@@ -6,4 +6,9 @@ config BLINK_DEFAULTS
default y
select CONFIG_IOPORTS
+config CONFIG_BLINK_IO
+ string "Output pin used to connect led"
+ depends on BLINK_DEFAULTS
+ default "IO_B0"
+
source "../../ioe.Kconfig"
diff --git a/examples/blink/Makefile b/examples/blink/Makefile
index c70ed33..4e4f81e 100644
--- a/examples/blink/Makefile
+++ b/examples/blink/Makefile
@@ -1,4 +1,5 @@
EXAMPLE_NAME = blink
SRC = blink.c
+IOEROOT=../../
include ../examples.mk
diff --git a/examples/blink/blink.c b/examples/blink/blink.c
index a1411e6..adc215b 100644
--- a/examples/blink/blink.c
+++ b/examples/blink/blink.c
@@ -3,12 +3,12 @@
#include <ioport.h>
int main() {
- io_setout(IO_B0);
+ io_setout(CONFIG_BLINK_IO);
while (1) {
- io_high(IO_B0);
+ io_high(CONFIG_BLINK_IO);
_delay_ms(500);
- io_low(IO_B0);
+ io_low(CONFIG_BLINK_IO);
_delay_ms(500);
}
}