diff src/cs/drivers/drv_core/armio/armio.c @ 179:2a9935250c95

src/cs: sync with Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 04 Jan 2020 21:38:55 +0000
parents 3a8c90814d1a
children d05fb947b50d
line wrap: on
line diff
--- a/src/cs/drivers/drv_core/armio/armio.c	Sat Jan 04 21:24:04 2020 +0000
+++ b/src/cs/drivers/drv_core/armio/armio.c	Sat Jan 04 21:38:55 2020 +0000
@@ -189,7 +189,7 @@
    * FreeCalypso change: we don't have BT, our new criterion is
    * whether or not a given board is wired for MCSI.
    */
-  #if defined(CONFIG_TARGET_FCMODEM) || defined(CONFIG_TARGET_PIRELLI)
+  #if defined(CONFIG_MCSI_MODEM) || defined(CONFIG_TARGET_PIRELLI)
     AI_DisableBit(5);
     AI_DisableBit(6);
     AI_DisableBit(7);
@@ -268,7 +268,7 @@
     // if we are in an MMI!=0 build - for ACI builds use the AT@SPKR command.
 #ifdef CONFIG_TARGET_GTM900
       *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01;
-#elif (MMI != 0)
+#elif (MMI != 0) || defined(CONFIG_GPIO1_HIGH)
       *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02;
 #else
       *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00;
@@ -283,7 +283,9 @@
       AI_ConfigBitAsOutput(0);
     #endif
     AI_ConfigBitAsOutput(1);
-    AI_ConfigBitAsOutput(2);
+    #ifndef CONFIG_TARGET_LEONARDO	/* GPIO 2 is an input on Leonardo! */
+      AI_ConfigBitAsOutput(2);
+    #endif
     #ifdef CONFIG_TARGET_GTAMODEM
       AI_ConfigBitAsOutput(3);
     #endif
@@ -295,7 +297,7 @@
       AI_ConfigBitAsOutput(6);
     #endif
     AI_ConfigBitAsOutput(7);
-    #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM)
+    #if 1	/* FreeCalypso addition for all targets */
       AI_ConfigBitAsOutput(8);
     #endif
     AI_ConfigBitAsOutput(9);
@@ -304,7 +306,7 @@
       AI_ConfigBitAsOutput(11);
       AI_ConfigBitAsOutput(12);
     #endif
-    #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM)
+    #if 1	/* FreeCalypso addition for all targets */
       AI_ConfigBitAsOutput(13);
     #endif
     AI_ConfigBitAsOutput(14);