diff nuc-fw/bsp/niq32.c @ 112:4179acab05f7

nuc-fw/bsp: niq32.c and sim.h replaced with new versions
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 20 Oct 2013 08:43:41 +0000
parents 45911ad957fd
children 3b2e941043d8
line wrap: on
line diff
--- a/nuc-fw/bsp/niq32.c	Sun Oct 20 07:58:00 2013 +0000
+++ b/nuc-fw/bsp/niq32.c	Sun Oct 20 08:43:41 2013 +0000
@@ -16,55 +16,96 @@
 
    Author         	: proussel@ti.com  Patrick Roussel.
 
-   Version number	: 1.12
+   Version number   : 1.25
 
-   Date and time	: 02/19/01 14:01:50
+   Date             : 08/22/03
 
    Previous delta 	: 12/19/00 14:24:51
 
-   SCCS file      	: /db/gsm_asp/db_ht96/dsp_0/gsw/rel_0/mcu_l1/release_gprs/mod/emu_p/EMU_P_FRED_ADC/drivers1/common/SCCS/s.niq32.c
-
-   Sccs Id  (SID)       : '@(#) niq32.c 1.12 02/19/01 14:01:50 '
 *******************************************************************************/
 
-#include "l1_sw.cfg"
+#include "l1sw.cfg"
+
+#include "chipset.cfg"
+#include "board.cfg"
+#include "rf.cfg"
+#include "swconfig.cfg"
 
-#if(!OP_L1_STANDALONE)
-  #include "chipset.cfg"
+#if(OP_L1_STANDALONE == 0)
   #include "debug.cfg"
-  #include "board.cfg"
-  #include "rv_defined_swe.h"    
-  #include "rtc_config.h"
+  #include "rv/rv_defined_swe.h"    
+  #include "rtc/board/rtc_config.h"
+#else
+  #include "l1_macro.h"
+  #include "l1_confg.h"
+#endif
+
+#if(OP_L1_STANDALONE == 0)
+#include "swconfig.cfg"
+#ifdef BLUETOOTH_INCLUDED
+#include "btemobile.cfg"
+#ifdef BT_CLK_REQ_INT
+#include "board/bth_drv.h"
+#endif
+#endif
 #endif
 
-#include "sys_types.h"
-#include "serialswitch.h"
+
+#if(L1_DYN_DSP_DWNLD == 1)
+  #include "l1_api_hisr.h"
+#endif
+  
+#if (OP_L1_STANDALONE == 0)
+  #include "main/sys_types.h"
+#else
+  #include "sys_types.h"
+#endif
 
-#include  "mem.h"
-#include  "inth.h"
-#include  "sim.h"
-#include  "abb_inth.h"	  // for External Interrupt
+#if (CHIPSET == 12)
+  #include "sys_inth.h"
+#else
+  #include "inth/inth.h"
+  #include "memif/mem.h"
+  #if (OP_L1_STANDALONE == 1)
+    #include "serialswitch_core.h"
+  #else
+    #include "uart/serialswitch.h"
+  #endif
 
+  #if (OP_L1_STANDALONE == 0)
+    #include "sim/sim.h"
+  #endif
+#endif
+
+#include "abb/abb_core_inth.h"	  // for External Interrupt
 #define IQ_H
-#include  "iq.h"
-#include  "ulpd.h"
+#include "inth/iq.h"
+#include "ulpd/ulpd.h"
+#if (BOARD == 34)
+  #include "csmi/csmi.h"
+#endif
 
 #if (defined RVM_DAR_SWE) && (defined _GSM)
   extern void dar_watchdog_reset(void);
 #endif
 
-#if ((BOARD == 8) || (BOARD == 9) || (BOARD == 40) || (BOARD == 41) || (BOARD == 43) || (BOARD == 45))
-#include "armio.h"
-#include "uartfax.h"
+#if ((BOARD == 8) || (BOARD == 9) || (BOARD == 40) || (BOARD == 41) || (BOARD == 42) || (BOARD == 43) || (BOARD == 45))
+#include "armio/armio.h"
+  #if (OP_L1_STANDALONE == 0)
+    #include "uart/uartfax.h"
+  #endif
 #endif
 
 /* External declaration */
 extern void GAUGING_Handler(void);
 extern void TMT_Timer_Interrupt(void);
+#if (OP_L1_STANDALONE == 1)
+  extern void TM_Timer1Handler(void);
+#endif
 extern void kpd_key_handler(void);
 extern void TP_FrameIntHandler(void);
 
-#if (!OP_L1_STANDALONE)
+#if (OP_L1_STANDALONE == 0)
   #if (defined RVM_MPM_SWE)
    extern void MPM_InterruptHandler(void);
   #endif
@@ -73,6 +114,10 @@
     extern void ti_profiler_tdma_action(void);
   #endif
 
+  #if(RF_FAM==35)
+    extern void TSP_RxHandler(void);
+  #endif
+
   extern void RTC_GaugingHandler(void);
   extern void RTC_ItTimerHandle(void);
   extern void RTC_ItAlarmHandle(void);
@@ -88,19 +133,8 @@
 unsigned IQ_FrameCount;    /* Used to check if Frame IT TPU*/
 unsigned IQ_GsmTimerCount; /* Used to check if GSM Timer IT */
 
-/* add this two variables for imported 188 functions, Jeffrey, 02/26/04 */
-typedef struct GPIO_HISR_INFO 
-{
-	NU_HISR		hisr;
-	char		hisr_stack[1024];	
-} T_GPIO_HISR_INFOS;
 
-static T_GPIO_HISR_INFOS gpio_hisr_infos = {0};
-int g_interrupt = 0;
-
-extern void Hall_OC_IntHandler( void ) ;
-
-
+#if (CHIPSET != 12)
 /*--------------------------------------------------------------*/
 /*  	irqHandlers                                             */
 /*--------------------------------------------------------------*/
@@ -118,29 +152,27 @@
    IQ_Dummy,               /* AIRQ 3 */   
    IQ_FrameHandler,        /* TPU Frame It AIRQ 4 */
    IQ_Dummy,               /* AIRQ 5 */
-   #if (OP_L1_STANDALONE)
-     IQ_Dummy,
-   #else
-     SIM_IntHandler,         /* AIRQ 6 */
-   #endif
+#if (OP_L1_STANDALONE == 0)
+   SIM_IntHandler,         /* AIRQ 6 */
+#else
+   IQ_Dummy,               /* AIRQ 6 */
+#endif
 #if ((CHIPSET == 2) || (CHIPSET == 3))
    SER_uart_handler,       /* AIRQ 7 */
-   #elif ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
+#elif ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11))
    SER_uart_modem_handler, /* AIRQ 7 */
 #endif
-   #if (CHIPSET == 12)
-     IQ_KeypadHandler,       /* AIRQ 8 */
-   #else
 #if ((BOARD == 8) || (BOARD == 9) || (BOARD == 40) || (BOARD == 41))
+// CC test 0316
    IQ_KeypadGPIOHandler,   /* AIRQ 8 */
+// end
 #else
    IQ_KeypadHandler,       /* AIRQ 8 */
 #endif
-   #endif
    IQ_Rtc_Handler,         /* AIRQ 9 RTC Timer*/
 #if ((CHIPSET == 2) || (CHIPSET == 3))
    IQ_RtcA_GsmTim_Handler, /* AIRQ 10 RTC ALARM OR ULPD GSM TIMER*/
-   #elif ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
+#elif ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11))
    IQ_RtcA_Handler,        /* AIRQ 10 RTC ALARM */
 #endif
    IQ_Gauging_Handler,     /* AIRQ 11 ULPD GAUGING */
@@ -159,13 +191,21 @@
    IQ_Dummy,               /* External fast interrupt */
    SER_uart_irda_handler,  /* UART IrDA interrupt */
    IQ_GsmTim_Handler,      /* ULPD GSM timer */
+   #if (BOARD == 34)
+     IQ_IcrHandler32,        
+   #else
    IQ_Dummy,               /* Not mapped interrupt */
+   #endif
    IQ_Dummy,               /* Not mapped interrupt */
    IQ_Dummy,               /* Not mapped interrupt */
    IQ_Dummy,               /* Not mapped interrupt */
    IQ_Dummy                /* GEA interrupt */
 #elif ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11))
+#if (L1_DYN_DSP_DWNLD == 1)
+    IQ_ApiHandler,         /* LEAD */ 
+#else
    IQ_Dummy,               /* LEAD */
+#endif                     
    IQ_Dummy,               /* SIM card-detect fast interrupt */
    IQ_Dummy,               /* External fast interrupt */
    SER_uart_irda_handler,  /* UART IrDA interrupt */
@@ -182,30 +222,12 @@
    IQ_Dummy,               /* Not mapped interrupt */
    IQ_Dummy,               /* Not mapped interrupt */
    IQ_Dummy                /* Reserved */
-#elif (CHIPSET == 12)
-   IQ_Dummy,               /* IRQ15 - LEAD */
-   IQ_Dummy,               /* IRQ16 - GPIO */
-   IQ_Dummy,               /* IRQ17 - External fast interrupt */
-   SER_uart_irda_handler,  /* IRQ18 - UART IrDA interrupt */
-   IQ_GsmTim_Handler,      /* IRQ19 - ULPD GSM timer */
-   IQ_Dummy,               /* IRQ20 - GEA interrupt */
-   IQ_Dummy,               /* IRQ21 - External general Purpose interrupt IRQ1 */
-   IQ_Dummy,               /* IRQ22 - External general Purpose interrupt IRQ2 */
-   IQ_Dummy,               /* IRQ23 - USIM card insertion/extraction */
-   IQ_Dummy,               /* IRQ24 - USIM */
-   IQ_Dummy,               /* IRQ25 - LCD */
-   IQ_Dummy,               /* IRQ26 - USB */
-   IQ_Dummy,               /* IRQ27 - MMC/SD/Memory Stick */
-   SER_uart_modem2_handler,/* IRQ28 - UART_MODEM2 */
-   IQ_Dummy,               /* IRQ29 - 2nd level interrupt handler */
-   IQ_Dummy,               /* IRQ30 - I2C or uWIRE */
-   IQ_Dummy                /* IRQ31 - NAND FLASH */
 #else
    IQ_Dummy                /* LEAD */
 #endif
 };   
 
-#if ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
+#if ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11))
   /*--------------------------------------------------------------*/
   /*  	fiqHandlers                                               */
   /*--------------------------------------------------------------*/
@@ -220,7 +242,11 @@
     IQ_Dummy,          /* Watchdog timer */
     IQ_Dummy,          /* timer 1 */
     IQ_Dummy,          /* timer 2 */
+  #if ((OP_L1_STANDALONE == 0) && (RF_FAM == 35))
+    TSP_RxHandler,     /* 3 TSP  */
+  #else
     IQ_Dummy,          /* AIRQ 3 */   
+  #endif
     IQ_Dummy,          /* TPU Frame It AIRQ 4 */
     IQ_Dummy,          /* AIRQ 5 */
     IQ_Dummy,          /* AIRQ 6 */
@@ -233,17 +259,11 @@
     IQ_Dummy,          /* AIRQ 13 Spi Tx Rx interrupt */
     IQ_Dummy,          /* DMA interrupt */
     IQ_Dummy,          /* LEAD */
-    #if (CHIPSET == 12)
-      IQ_Dummy,        /* IRQ16 - GPIO */
-    #else
-      #if (OP_L1_STANDALONE)
-        IQ_Dummy,
-      #else
-	  /* glowing, 2004-06-08, replace SIM with Hall according to 188 */
-	  Hall_OC_IntHandler,  /* glowing,2003-12-18, Hall open-close fast interrupt, it replace SIM_CD_IntHandler */
-	  //SIM_CD_IntHandler, /* SIM card-detect fast interrupt */
-    #endif
-    #endif
+  #if (OP_L1_STANDALONE == 0)
+      SIM_CD_IntHandler, /* SIM card-detect fast interrupt */
+  #else
+      IQ_Dummy,          /* SIM card-detect fast interrupt */
+  #endif
     IQ_Dummy,          /* External fast interrupt */
     IQ_Dummy,          /* UART_IRDA interrupt */
   #if (CHIPSET == 4)
@@ -265,23 +285,10 @@
     IQ_Dummy,        /* Not mapped interrupt */
     IQ_Dummy,        /* Not mapped interrupt */
     IQ_Dummy         /* Reserved */
-  #elif (CHIPSET == 12)
-    IQ_Dummy,        /* IRQ19 - ULPD GSM timer */
-    IQ_Dummy,        /* IRQ20 - GEA interrupt */
-    IQ_Dummy,        /* IRQ21 - External general Purpose interrupt IRQ1 */
-    IQ_Dummy,        /* IRQ22 - External general Purpose interrupt IRQ2 */
-    IQ_Dummy,        /* IRQ23 - USIM card insertion/extraction */
-    IQ_Dummy,        /* IRQ24 - USIM */
-    IQ_Dummy,        /* IRQ25 - LCD */
-    IQ_Dummy,        /* IRQ26 - USB */
-    IQ_Dummy,        /* IRQ27 - MMC/SD/Memory Stick */
-    IQ_Dummy,        /* IRQ28 - UART_MODEM2 */
-    IQ_Dummy,        /* IRQ29 - 2nd level interrupt handler */
-    IQ_Dummy,        /* IRQ30 - I2C or uWIRE */
-    IQ_Dummy         /* IRQ31 - NAND FLASH */
   #endif
 };   
 #endif
+#endif /* (CHIPSET != 12)*/
 
 /*--------------------------------------------------------------*/
 /*  IQ_Gauging_Handler				                */
@@ -293,7 +300,7 @@
 void IQ_Gauging_Handler(void)
 {
    GAUGING_Handler();
-#if (!OP_L1_STANDALONE)
+#if (OP_L1_STANDALONE == 0)
    RTC_GaugingHandler();
 #endif
 } 
@@ -308,17 +315,28 @@
 /*--------------------------------------------------------------*/
 void IQ_External(void)
 {
-  // Mask external interrupt (12)
-  IQ_Mask(IQ_EXT);
+   #if (CHIPSET == 12)
+      // Mask external interrupt 12
+      F_INTH_DISABLE_ONE_IT(C_INTH_ABB_IRQ_IT);
+   #else
+     // Mask external interrupt 12
+     IQ_Mask(IQ_EXT);
+   #endif
 
   // The external IRQ is mapped on the ABB interrupt.
   // The associated HISR ABB_Hisr is activated on reception on the external IRQ.
   if(Activate_ABB_HISR())
   {
+   #if (CHIPSET == 12)
+      F_INTH_ENABLE_ONE_IT(C_INTH_ABB_IRQ_IT);
+   #else
+     // Mask external interrupt 12
      IQ_Unmask(IQ_EXT);
+   #endif
   }
 }
 
+#if (CHIPSET != 12)
 /*--------------------------------------------------------------*/
 /*  IQ_Dummy							*/
 /*--------------------------------------------------------------*/
@@ -330,6 +348,7 @@
 {
     IQ_DummyCount++;
 }   
+#endif
 
 /*--------------------------------------------------------------*/
 /*  IQ_RTCHandler						*/
@@ -341,7 +360,7 @@
 
 void IQ_Rtc_Handler(void)
 {
-#if (!OP_L1_STANDALONE)
+#if (OP_L1_STANDALONE == 0)
   RTC_ItTimerHandle();
 #endif
 }
@@ -357,7 +376,7 @@
 #if ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
 void IQ_RtcA_Handler(void)
 {
-  #if (!OP_L1_STANDALONE)
+  #if (OP_L1_STANDALONE == 0)
     /* INTH_DISABLEONEIT(IQ_RTC_ALARM); *//* RTC ALARM IT  */
     if ( (* (SYS_WORD8 *) RTC_STATUS_REG) & RTC_ALARM )
       RTC_ItAlarmHandle();
@@ -376,7 +395,7 @@
 #else
 void IQ_RtcA_GsmTim_Handler(void)
 {
-  #if (!OP_L1_STANDALONE)
+  #if (OP_L1_STANDALONE == 0)
    if ( (* (SYS_UWORD16 *) ULDP_GSM_TIMER_IT_REG) & ULPD_IT_TIMER_GSM  )
    {
      // it is GSM Timer it.....
@@ -392,6 +411,17 @@
 }
 #endif
 
+#if (BOARD == 34)
+/*
+ * IQ_IcrHandler32
+ *
+ */
+  void IQ_IcrHandler32(void)
+  {
+    CSMI_InterruptHandler();  
+  }
+#endif
+
 /*--------------------------------------------------------------*/
 /*  IQ_TimerHandler						*/
 /*--------------------------------------------------------------*/
@@ -420,7 +450,7 @@
    IQ_FrameCount++;
    TMT_Timer_Interrupt();
    TP_FrameIntHandler();
-   #if (!OP_L1_STANDALONE)
+   #if (OP_L1_STANDALONE == 0)
      #if (TI_PROFILER == 1)
        // TDMA treatment for profiling buffer
        ti_profiler_tdma_action();
@@ -438,6 +468,9 @@
 void IQ_TimerHandler1(void)
 {
   IQ_TimerCount1++;  
+  #if (OP_L1_STANDALONE == 1)
+    TM_Timer1Handler();
+  #endif
 }
  
 /*--------------------------------------------------------------*/
@@ -451,7 +484,23 @@
 {
   IQ_TimerCount2++;  
  }
+#if(L1_DYN_DSP_DWNLD == 1)
 
+/*-------------------------------------------------------*/
+/* IQ_ApiHandler()                                       */
+/*-------------------------------------------------------*/
+/* Parameters : none                                     */
+/* Return     : none                                     */
+/* Functionality : API int management                    */
+/*-------------------------------------------------------*/
+void IQ_ApiHandler(void)
+{
+  l1_api_handler();
+} /* IQ_ApiHandler() */
+#endif
+
+
+#if (CHIPSET !=12)
 /*--------------------------------------------------------------*/
 /*  IQ_IRQ_isr							*/
 /*--------------------------------------------------------------*/
@@ -474,11 +523,12 @@
 /*--------------------------------------------------------------*/
 void IQ_FIQ_isr(void)
 {
-  #if ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
+  #if ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11))
     fiqHandlers[((* (SYS_UWORD16 *) INTH_B_FIQ_REG) & INTH_SRC_NUM)]();  /* ACK IT */
   #endif
     * (SYS_UWORD16 *) INTH_CTRL_REG |= (1 << INTH_FIQ);	/* valid next FIQ */
 }   
+#endif /* chipset != 12 ) */
 
 #if ((BOARD == 8) || (BOARD == 9) || (BOARD == 40) || (BOARD == 41))
 
@@ -489,109 +539,55 @@
 /* Return        : none                                            */
 /* Functionality : Handle keypad and GPIO interrupts          */
 /*--------------------------------------------------------------*/
+// CC test 0316
+//#include "rvm/rvm_use_id_list.h"
+//#include "rvf/rvf_api.h"
+//static char debug_buffer[50];
+// end
+
 void IQ_KeypadGPIOHandler(void)
 {
- #if (!OP_L1_STANDALONE)
+
+ #if (OP_L1_STANDALONE == 0)
     /*
      * GPIO interrupt must be checked before the keypad interrupt. The GPIO
      * status bit is reset when the register is read.
      */
      
-	     g_interrupt = 80;
-    if (AI_CheckITSource (ARMIO_GPIO_INT)) {
-    #if 0
+    if (AI_CheckITSource (ARMIO_GPIO_INT))
+
+// CC test 0315
+{	       
+        AI_MaskIT (ARMIO_MASKIT_GPIO);
+//sprintf(debug_buffer, "GPIO_Interrupt");
+//rvf_send_trace(debug_buffer, 40, NULL_PARAM, RV_TRACE_LEVEL_ERROR, RVT_USE_ID);
+        AI_UnmaskIT(ARMIO_MASKIT_GPIO);       //0x0002  
+// end
+/*
     #ifdef RVM_MPM_SWE
-      /* check if the SWE has been started */
-      MPM_InterruptHandler ();
+      // check if the SWE has been started
+       MPM_InterruptHandler ();
+    #elif BT_CLK_REQ_INT
+
+      BT_DRV_ClkReqInterruptHandler( );
     #else
       UAF_DTRInterruptHandler ();
     #endif
-    #endif
-	  /* Jeffrey, 02/26/04, add this line from 188 */
-	  gpio_handler();
-	}
+*/    
+}
+    if (AI_CheckITSource (ARMIO_KEYPDAD_INT))
+    {
+// CC test 0316
+//sprintf(debug_buffer, "Key_Interrupt");
+//rvf_send_trace(debug_buffer, 40, NULL_PARAM, RV_TRACE_LEVEL_ERROR, RVT_USE_ID);
+// end
+      kpd_key_handler ();
+    }
 
-    if (AI_CheckITSource (ARMIO_KEYPDAD_INT))
-      kpd_key_handler ();
  #endif
 }   
 
-/**
- * function: gpio_handler  hall
- */
-void gpio_handler(void)
-{
-	/* 2003/11/01 Robert.Chen for melody interrupt from GPIO1*/
-	/* modify from */
-	
-	/*
-	   AI_MaskIT(2);
-	 */
-	 
-	/* to */
-	AI_MaskIT(2);
-	/* end Robert.Chen */
-
-    /* Activate HISR to process the key event */
-      NU_Activate_HISR(&gpio_hisr_infos.hisr);
-	}
-
-/* 2003/11/01 Robert.Chen  Melody HISR entry */
-void MI_Melody_Hisr(void)
-{
-	MaDevDrv_IntHandler();
-	AI_UnmaskIT(0x02);
-}
-
-/**
- * function: kpd_initialize_keypad_hardware
- */
-void Gpio_hisr_initialize(void)
-{
-   int i;
-   
-	/* 2003/11/01 Robert.Chen, modify for Melody HISR */
-	/* modify from */
-   #if 0
-   /* HISR creation */
-   NU_Create_HISR(&gpio_hisr_infos.hisr,
-                  "GPIO_HISR",                  
-                  gpio_hisr_entry,
-                  2,
-                  gpio_hisr_infos.hisr_stack,
-                  sizeof(gpio_hisr_infos.hisr_stack));
-
-	AI_UnmaskIT(0x02);
-	
-   	i = HallOnOff();
-	
-	if(i){
-		AI_SelectIOForIT (2, 0);//ARMIO_FALLING_EDGE
-	}
-	else{
-
-		AI_SelectIOForIT (2, 1);//ARMIO_RISING_EDGE
-	}	
-	#endif
-	/* to */
-	NU_Create_HISR(&gpio_hisr_infos.hisr,
-                  "GPIO_HISR",                  
-                  MI_Melody_Hisr,
-                  2,
-                  gpio_hisr_infos.hisr_stack,
-                  sizeof(gpio_hisr_infos.hisr_stack));
-	
-	AI_EnableBit(5); /* MCSI_TXD as GPIO9 */
-	AI_ConfigBitAsInput(9); /* GPIO9 as input pin for YMU765 ~IRQ */		
-	AI_SelectIOForIT (9, 0); /* GPIO9 as input, falling edge triggered */
-	AI_UnmaskIT(0x02);		 /* enable GPIO IRQ */
-	
-	/* end modify, Robert.Chen */
-}
-/* end of imported functins, Jeffrey, 02/26/04 */
-/* ---------------------------------------------*/
-
-#elif ((BOARD == 43) || (BOARD == 45))
+#elif ((BOARD == 34) || (BOARD == 42) || (BOARD == 43) || (BOARD == 45))
 
 /*--------------------------------------------------------------*/
 /*  IQ_KeypadHandler							*/
@@ -602,8 +598,12 @@
 /*--------------------------------------------------------------*/
 void IQ_KeypadHandler(void)
 {
- #if (!OP_L1_STANDALONE)
+ #if (OP_L1_STANDALONE == 0)
+   #if (BOARD == 34)
+     IQ_Mask (IQ_ARMIO);
+   #else
      kpd_key_handler ();
+   #endif
  #endif
 }