| Index: app/dartino/leds.c
|
| diff --git a/app/dartino/leds.c b/app/dartino/leds.c
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ceeebc31578979a9eae4ebf8434fd64c56aa7c61
|
| --- /dev/null
|
| +++ b/app/dartino/leds.c
|
| @@ -0,0 +1,30 @@
|
| +
|
| +// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE.md file.
|
| +
|
| +#include <kernel/port.h>
|
| +
|
| +#if defined(TARGET_DARTUINOP0)
|
| +#include <dev/gpio.h>
|
| +#include <target/gpioconfig.h>
|
| +
|
| +int led_get_gpio(int led) {
|
| + switch (led) {
|
| + case 0:
|
| + return GPIO_LED108;
|
| + case 1:
|
| + return GPIO_LED109;
|
| + case 2:
|
| + return GPIO_LED110;
|
| + case 3:
|
| + return GPIO_LED111;
|
| + default:
|
| + return -1;
|
| + }
|
| +}
|
| +#else
|
| +int led_get_gpio(int led) {
|
| + return -1;
|
| +}
|
| +#endif
|
|
|