Library for MAXREFDES72# that supports configuration of shield for different PMOD types and the DS3231 RTC

Dependencies:   ds3231 max14661

Dependents:   ard2pmod_demo max14724_hello_world ALS_Proximity_Demo

Ard2Pmod Shield Component Page

Revision:
10:e37f2a9a2f32
Parent:
7:d3881d2c2d6b
Child:
12:6be7e55a48c3
--- a/ard2pmod.cpp	Fri Feb 06 05:16:48 2015 +0000
+++ b/ard2pmod.cpp	Sat Feb 07 22:44:48 2015 +0000
@@ -132,11 +132,23 @@
             break;
             
         case PMOD_TYPE_3_UART:
-            set_switches((SW12 | SW02), (SW11 | SW01));
+            #if defined (TARGET_KL25Z) 
+                set_switches((SW12 | SW02), (SW11 | SW01));
+            #elif defined (TARGET_K64F)
+                set_switches((SW12 | SW01), (SW11 | SW02));
+            #else
+                #error TARGET NOT DEFINED
+            #endif
             break;
             
         case PMOD_TYPE_4_UART:
-            set_switches((SW13 | SW01), (SW12 | SW02));
+            #if defined (TARGET_KL25Z) 
+                set_switches((SW13 | SW01), (SW12 | SW02));
+            #elif defined (TARGET_K64F)
+                set_switches((SW13 | SW02), (SW12 | SW01));
+            #else
+                #error TARGET NOT DEFINED
+            #endif
             break;
             
         case PMOD_TYPE_5_HBRIDGE: