#if defined (HCS08Q)

  #pragma CODE_SEG __NEAR_SEG NON_BANKED
  __interrupt void KBIisr (void);
  #define KBI_INT_ENABLE (KBI2SC |= 0x02);
  #define KBI_DEBOUNCE 20 /* Debounce in tens of msec */

  #define KBI_ENABLEINTERRUPTS (KBI2SC |= 0x02);
  #define KBI_DISABLEINTERRUPTS (KBI2SC &= ~0x02);
  #pragma CODE_SEG DEFAULT
  
#else

  interrupt void KBIisr (void);
  #define KBI_INT_ENABLE (KBI1SC |= 0x02);
  #define KBI_DEBOUNCE 20 /* Debounce in tens of msec */

  #define KBI_ENABLEINTERRUPTS (KBI1SC |= 0x02);
  #define KBI_DISABLEINTERRUPTS (KBI1SC &= ~0x02);
  
#endif



void KBIInit(void);
