mbed-modbus-RTU (modbus slave to control 6 LEDs)

Dependencies:   Modbus nvt_rs485

Fork of NuMaker-mbed-modbus-sample by Nuvoton

Revision:
4:f69e05cb6714
Parent:
1:f9d748875768
Child:
5:3e19326b47f7
--- a/main.cpp	Thu Dec 15 11:18:14 2016 +0800
+++ b/main.cpp	Thu Dec 22 15:10:51 2016 +0800
@@ -35,7 +35,11 @@
 DigitalOut led3(LED3);  // For Holder CB
 
 #define DEF_PIN_NUM 6
+#if defined(TARGET_NUMAKER_PFM_NUC472)
 DigitalIn DipSwitch[DEF_PIN_NUM] = { PG_1, PG_2, PF_9, PF_10, PC_10, PC_11 } ;
+#elif defined(TARGET_NUMAKER_PFM_M453)
+DigitalIn DipSwitch[DEF_PIN_NUM] = { PD_6, PD_1, PC_6, PC_7, PC_11, PC_12 };
+#endif
 
 unsigned short GetValueOnDipSwitch()
 {