EXTERNAL INTERRUPTS
Chapter 4 External Interrupt Examples
MCU-AN -300203-E-V17
- 16 -
© Fujitsu Microelectronics Europe GmbH
Please note, that the corresponding interrupt vector and level has to be defined in the
vectors.c
module of our standard template project.
/* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
/* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
/* ELIGIBILITY FOR ANY PURPOSES. */
/* (C) Fujitsu Microelectronics Europe GmbH */
/*---------------------------------------------------------------------------*/
void
InitIrqLevels(
void
)
{
. . .
ICR = ((17 & 0xFF) << 8) | 6;
// Priority Level 6 for External
// Interrupt 0 of MB96340 Series
ICR = ((18 & 0xFF) << 8) | 6;
// Priority Level 6 for External
// Interrupt 1 of MB96340 Series
}
. . .
__interrupt
void
IRQ_extint0 (
void
);
// Prototype EXT0
__interrupt
void
IRQ_extint1 (
void
);
// Prototype EXT1
. . .
#
pragma
intvect IRQ_extint0 17
// EXT0 of MB96340 Series
#
pragma
intvect IRQ_extint1 18
// EXT1 of MB96340 Series
. . .