Microchip® Advanced Software Framework

ext_int_example2.c File Reference

Nested External Interrupt example for megaRF device.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include <conf_interrupt.h>

Functions

static void ext_int0_callback (void)
 Interrupt callback for External interrupt Switch ON LED1(PORTE3) for some time and then switches OFF when the interrupt is triggered. More...
 
static void ext_int1_callback (void)
 Interrupt callback for External interrupt Switch ON LED2(PORTE2) for some time and then switches OFF when the interrupt is triggered. More...
 
static void ext_int_delay (void)
 delay routine for LED to be ON for some time More...
 
int main (void)
 Main function. More...
 

static void ext_int0_callback ( void  )
static

Interrupt callback for External interrupt Switch ON LED1(PORTE3) for some time and then switches OFF when the interrupt is triggered.

Also I-bit is set so that all other interrupts are activated

Parameters
none

References cpu_irq_enable, ext_int_delay(), LED_Off, LED_On, and LED_YELLOW_GPIO.

Referenced by main().

static void ext_int1_callback ( void  )
static

Interrupt callback for External interrupt Switch ON LED2(PORTE2) for some time and then switches OFF when the interrupt is triggered.

Parameters
none

References ext_int_delay(), LED_GREEN_GPIO, LED_Off, and LED_On.

Referenced by main().

static void ext_int_delay ( void  )
inlinestatic

delay routine for LED to be ON for some time

Parameters
none

Referenced by ext_int0_callback(), and ext_int1_callback().