From dfc471c4f68eba0c054e61dbb3567ee89e3a036f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 9 Mar 2017 07:04:55 +0100 Subject: Update spiblink example to use examples.mk --- examples/blink/Kconfig | 5 +++++ examples/blink/Makefile | 1 + examples/blink/blink.c | 6 +++--- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'examples/blink') 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 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); } } -- cgit v1.2.3