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

Unified Diff: app/dartino/main.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/dartino/leds.c ('k') | app/dartino/rules.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/dartino/main.c
diff --git a/app/dartino/main.c b/app/dartino/main.c
index 44df2a42bdd733129069e7310d554025dfbfbe71..2ba560af577cf6e144689547ae4eb20a70e50020 100644
--- a/app/dartino/main.c
+++ b/app/dartino/main.c
@@ -15,6 +15,7 @@
#include <endian.h>
#include <platform.h>
#include <dev/display.h>
+#include <dev/gpio.h>
#include <kernel/port.h>
@@ -33,6 +34,8 @@
void SensorsInit(void);
+int led_get_gpio(int);
+
enum {
MODE_RUN,
MODE_BURN
@@ -78,6 +81,11 @@ DARTINO_EXPORT_TABLE_ENTRY("gfx_flush", gfx_flush)
DARTINO_EXPORT_TABLE_ENTRY("port_open", port_open)
DARTINO_EXPORT_TABLE_ENTRY("port_close", port_open)
DARTINO_EXPORT_TABLE_ENTRY("port_read", port_read)
+#if defined(TARGET_DARTUINOP0)
+DARTINO_EXPORT_TABLE_ENTRY("led_get_gpio", led_get_gpio)
+DARTINO_EXPORT_TABLE_ENTRY("gpio_set", gpio_set)
+DARTINO_EXPORT_TABLE_ENTRY("gpio_get", gpio_get)
+#endif
DARTINO_EXPORT_TABLE_END
//////////////// Port debug ///////////////////////////////////////////////////
« no previous file with comments | « app/dartino/leds.c ('k') | app/dartino/rules.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698