connect NuEZCam board whicih the code is located on https://github.com/OpenNuvoton/NuMaker_NuEZCam_Samples, NUC472 + NuEZCam ,

NuEZCam for NuMaker-PFM-NUC472 board. Please refer document before executing it. More details, please refer to https://github.com/OpenNuvoton/NuMaker_NuEZCam_Samples

Files at this revision

API Documentation at this revision

Comitter:
shliu1
Date:
Thu Nov 24 08:39:30 2016 +0000
Parent:
0:5cd6f0a0a7ed
Commit message:
support NUC472, M453, STM32F401 and NXP K64F by target definitions

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 5cd6f0a0a7ed -r 6a2040c019e0 main.cpp
--- a/main.cpp	Mon Nov 14 09:23:32 2016 +0000
+++ b/main.cpp	Thu Nov 24 08:39:30 2016 +0000
@@ -5,9 +5,35 @@
 // connect N3290X by UART
 //Serial pc(USBTX, USBRX); // tx, rx
 
+
+
+#if defined(TARGET_NUMAKER_PFM_NUC472)
+// The following definitions of LED and serial are for NUC472
+DigitalOut led1(LED1);
+Serial device(D1, D0);  // tx, rx
+DigitalIn button(SW1); // SW1 is OK
+
+#elif defined(TARGET_NUMAKER_PFM_M453)
+// The following definitions of LED and serial are for NUC_M453
 DigitalOut led1(LED1);
 Serial device(D1, D0);  // tx, rx
-DigitalIn button(SW1); // SW2 is OK
+DigitalIn button(SW2); // SW2 is OK
+
+#elif defined(TARGET_K64F)
+// The following definitions of LED and serial are for K64F
+
+DigitalOut led1(LED_GREEN);
+Serial device(PTC17, PTC16);  // tx, rx
+DigitalIn button(SW2); // SW2 is OK
+
+#elif defined(TARGET_NUCLEO_F401RE)
+
+//The following definitions are for STM32F401
+DigitalOut led1(LED3);
+Serial device(D8,D2);
+DigitalIn button(USER_BUTTON); // User button is OK
+
+#endif
 
 void setupCommand(int number)
 {