Shingo FUKUYA / Mbed 2 deprecated Airio-Base_SD_power_test

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mbed_crane_elec
Date:
Thu Aug 09 04:21:09 2018 +0000
Commit message:
1st release.

Changed in this revision

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
diff -r 000000000000 -r 606f4b3ea74c main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Aug 09 04:21:09 2018 +0000
@@ -0,0 +1,38 @@
+#include "mbed.h"
+//-------------------------------------------------------------------------------
+//Port Settings
+DigitalOut led1(P0_7,1);
+DigitalOut led2(P1_13,1);
+
+DigitalOut sd_en(P1_16, 0);//SD card power on/off control port. and OFF default.
+//DigitalIn sd_dat3(P0_17); // 0x10
+//DigitalIn sd_dat2(P1_22); // 0x08
+//DigitalIn sd_dat1(P1_14); // 0x04
+//DigitalIn sd_dat0(P0_22); // 0x02
+//DigitalIn sd_cmd(P0_21);  // 0x01
+
+DigitalIn sw(P1_20);
+DigitalIn isp(P0_1);
+
+//-------------------------------------------------------------------------------
+//Program
+int main()
+{
+    while(1)
+    {
+        // Button "SW" function
+        if(sw == 0)
+        {
+            sd_en = 1;//SD card power turn ON
+            led2 = 0;//LED2 turn ON
+        }    
+        
+        // Button "ISP" function
+        if(isp == 0)
+        {
+            sd_en = 0;//SD card power turn OFF
+            led2 = 1;//LED2 turn OFF
+        }    
+
+    }
+}
diff -r 000000000000 -r 606f4b3ea74c mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Aug 09 04:21:09 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a7c7b631e539
\ No newline at end of file