changeset 513:383abdbc5d35

gsm-fw/bsp/armio.c: Compal configuration added
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 02 Jul 2014 03:40:42 +0000
parents 6f4cadd1fd7f
children e201f2130c9b
files gsm-fw/bsp/armio.c
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/bsp/armio.c	Wed Jul 02 01:30:03 2014 +0000
+++ b/gsm-fw/bsp/armio.c	Wed Jul 02 03:40:42 2014 +0000
@@ -253,6 +253,26 @@
 }
 #endif
 
+#ifdef CONFIG_TARGET_COMPAL
+/* same for all C1xx variants */
+void AI_InitIOConfig(void)
+{
+  // reset the IOs config
+  AI_ResetIoConfig();
+
+  /*
+   * I don't feel like scrutinizing every Calypso signal on the C139
+   * and C155 schematics right now, so for now we'll use a GPIO
+   * configuration based on OsmocomBB.
+   */
+  /* GPIO out all zeros */
+  *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000;
+  /* make GPIOs 1 and 3 outputs */
+  AI_ConfigBitAsOutput(1);
+  AI_ConfigBitAsOutput(3);
+}
+#endif
+
 /*
  * AI_SelectIOForIT
  *