aboutsummaryrefslogtreecommitdiff
path: root/examples/blink
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-03-09 07:04:55 +0100
committerKarel Kočí <cynerd@email.cz>2017-03-09 07:04:55 +0100
commitdfc471c4f68eba0c054e61dbb3567ee89e3a036f (patch)
tree69b6ee6b5be7da3087d782397cb0ec04734f23a9 /examples/blink
parent171e8e92686ac65e8f9a2962a975e6863c791a4f (diff)
downloadavr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.tar.gz
avr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.tar.bz2
avr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.zip
Update spiblink example to use examples.mk
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);
}
}