えれくら ! / Mbed 2 deprecated gacb_hello

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
elecra296
Date:
Thu May 07 18:01:11 2015 +0000
Commit message:
Gachacom board sample program

Changed in this revision

gacb_GXP.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gacb_GXP.h	Thu May 07 18:01:11 2015 +0000
@@ -0,0 +1,30 @@
+// GXP port definition : for GachaCOM board
+#ifndef GACB_GXP_H
+#define GACB_GXP_H
+
+// GXP01 : 5V
+// GXP02 : 3.3V
+// GXP03 : GND
+
+#define GXP04 P0_8
+#define GXP05 P0_9
+#define GXP06 P0_11
+#define GXP07 P0_5
+#define GXP08 P0_6
+#define GXP09 P1_0
+#define GXP10 P1_1
+#define GXP11 P1_2
+#define GXP12 P1_4
+#define GXP13 P1_5
+#define GXP14 P1_6
+#define GXP15 P1_7
+#define GXP16 P1_8
+#define GXP17 P1_9
+#define GXP18 P0_0
+#define GXP19 P0_1
+#define GXP20 P0_2
+#define GXP21 P0_3
+#define GXP22 P0_4
+#define GXP23 P0_7
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu May 07 18:01:11 2015 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "gacb_GXP.h"
+
+DigitalOut led1(GXP23);
+DigitalOut led2(GXP23);
+DigitalOut ledGX1(GXP13);
+
+int main() {
+    while(1) {
+        led1 = 1;
+        wait(0.5);
+        led2 = 1;
+        wait(0.5);
+        ledGX1 = 1;
+        wait(0.5);
+        
+        led1 = 0;
+        led2 = 0;
+        ledGX1 = 0;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu May 07 18:01:11 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058
\ No newline at end of file