Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Side by Side Diff: app/dartino/leds.c

Issue 1684433003: Add a small LED interface and demo app. (Closed) Base URL: git@github.com:domokit/sod.git@master
Patch Set: fix exports for qemu target Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | app/dartino/main.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « no previous file | app/dartino/main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698