Beispiel #1
0
/*
** ===================================================================
**     Event       :  SW_B_OnInterrupt (module Events)
**
**     Component   :  SW_B [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW_B_OnInterrupt(void)
{
    #if PL_HAS_KBI
        if(KEY2_Get()){
            KEY_OnInterrupt(KEY_BTN2);
        }
    #endif
}
Beispiel #2
0
/*
** ===================================================================
**     Event       :  SW_A_OnInterrupt (module Events)
**
**     Component   :  SW_A [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW_A_OnInterrupt(void)
{
    #if PL_HAS_KBI
        if(KEY1_Get()){
            KEY_OnInterrupt(KEY_BTN1);
        }
    #endif
}
Beispiel #3
0
/*
** ===================================================================
**     Event       :  SW_D_OnInterrupt (module Events)
**
**     Component   :  SW_D [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW_D_OnInterrupt(void)
{
    #if PL_HAS_KBI
        if(KEY4_Get()){
            KEY_OnInterrupt(KEY_BTN4);
        }
    #endif
}
Beispiel #4
0
/*
** ===================================================================
**     Event       :  SW_C_OnInterrupt (module Events)
**
**     Component   :  SW_C [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW_C_OnInterrupt(void)
{
    #if PL_HAS_KBI
        if(KEY3_Get()){
            KEY_OnInterrupt(KEY_BTN3);
        }
    #endif
}
Beispiel #5
0
/*
** ===================================================================
**     Event       :  SW_G_OnInterrupt (module Events)
**
**     Component   :  SW_G [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW_G_OnInterrupt(void)
{
    #if PL_HAS_KBI
        if(KEY7_Get()){
            KEY_OnInterrupt(KEY_BTN7);
        }
    #endif
}
Beispiel #6
0
/*
** ===================================================================
**     Event       :  SW3_OnInterrupt (module Events)
**
**     Component   :  SW3 [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW3_OnInterrupt(void)
{
#if PL_HAS_KBI
#if 1 /* Problem with Processor Expert and sharing PTA4/NMI interrupt: code below is missing in ExtIntLdd3_OnInterrupt() */
  /* Check the pin interrupt flag of the shared interrupt */
  if (PORT_PDD_GetPinInterruptFlag(PORTA_BASE_PTR, ExtIntLdd4_PIN_INDEX)) {
    /* Clear the interrupt flag */
    PORT_PDD_ClearPinInterruptFlag(PORTA_BASE_PTR, ExtIntLdd4_PIN_INDEX);
    /* call user event */
    KEY_OnInterrupt(KEY_BTN3);
  }
#else
  if (KEY3_Get()) {
    KEY_OnInterrupt(KEY_BTN3);
  }
#endif
#endif
}
Beispiel #7
0
/*
** ===================================================================
**     Event       :  SW7_OnInterrupt (module Events)
**
**     Component   :  SW7 [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW7_OnInterrupt(void)
{
  /* Write your code here ... */
#if PL_HAS_KBI
  if (KEY7_Get()) {
    KEY_OnInterrupt(KEY_BTN7);
  }
#endif
}
Beispiel #8
0
/*
** ===================================================================
**     Event       :  SW3_OnInterrupt (module Events)
**
**     Component   :  SW3 [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW3_OnInterrupt(void)
{
#ifdef PL_HAS_KBI
	if (PORT_PDD_GetPinInterruptFlag(PORTA_BASE_PTR, ExtIntLdd3_PIN_INDEX))
	{
		PORT_PDD_ClearPinInterruptFlag(PORTA_BASE_PTR, ExtIntLdd3_PIN_INDEX);
		KEY_OnInterrupt(KEY_BTN3);
	}
#endif
}
Beispiel #9
0
/*
** ===================================================================
**     Event       :  SW2_OnInterrupt (module Events)
**
**     Component   :  SW2 [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW2_OnInterrupt(void)
{
	if(KEY2_Get()){
		KEY_OnInterrupt(KEY_BTN2);
	}
}
Beispiel #10
0
void SW1_OnInterrupt(void)
{
	if(KEY1_Get()){
		KEY_OnInterrupt(KEY_BTN1);
	}
}
Beispiel #11
0
/*
** ===================================================================
**     Event       :  SW7_OnInterrupt (module Events)
**
**     Component   :  SW7 [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW7_OnInterrupt(void)
{
	if(KEY7_Get()){
		KEY_OnInterrupt(KEY_BTN7);
	}
}
Beispiel #12
0
/*
** ===================================================================
**     Event       :  SW4_OnInterrupt (module Events)
**
**     Component   :  SW4 [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW4_OnInterrupt(void)
{
	if(KEY4_Get()){
		KEY_OnInterrupt(KEY_BTN4);
	}
}
Beispiel #13
0
/*
** ===================================================================
**     Event       :  KB1_OnInterrupt (module Events)
**
**     Component   :  KB1 [KBI]
**     Description :
**         This event is called when the active signal edge/level
**         occurs. This event is enabled only if <Interrupt
**         service/event> property is enabled.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void KB1_OnInterrupt(void)
{
#if PL_HAS_KEYS
  KEY_OnInterrupt();
#endif
}
Beispiel #14
0
/*
** ===================================================================
**     Event       :  SW4_OnInterrupt (module Events)
**
**     Component   :  SW4 [ExtInt]
**     Description :
**         This event is called when an active signal edge/level has
**         occurred.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void SW4_OnInterrupt(void)
{
#if PL_CONFIG_HAS_KEYS
  KEY_OnInterrupt(KEY_BTN4);
#endif
}
/*
 ** ===================================================================
 **     Event       :  SW1_OnInterrupt (module Events)
 **
 **     Component   :  SW1 [ExtInt]
 **     Description :
 **         This event is called when an active signal edge/level has
 **         occurred.
 **     Parameters  : None
 **     Returns     : Nothing
 ** ===================================================================
 */
void SW1_OnInterrupt(void) {
	KEY_OnInterrupt(KEY_BTN1);
}