OLD | NEW |
(Empty) | |
| 1 |
| 2 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE.md file. |
| 5 |
| 6 #include <kernel/port.h> |
| 7 |
| 8 #if defined(TARGET_DARTUINOP0) |
| 9 #include <dev/gpio.h> |
| 10 #include <target/gpioconfig.h> |
| 11 |
| 12 int led_get_gpio(int led) { |
| 13 switch (led) { |
| 14 case 0: |
| 15 return GPIO_LED108; |
| 16 case 1: |
| 17 return GPIO_LED109; |
| 18 case 2: |
| 19 return GPIO_LED110; |
| 20 case 3: |
| 21 return GPIO_LED111; |
| 22 default: |
| 23 return -1; |
| 24 } |
| 25 } |
| 26 #else |
| 27 int led_get_gpio(int led) { |
| 28 return -1; |
| 29 } |
| 30 #endif |
OLD | NEW |