#include <avr32/ioap7000.h>
#include <intrinsics.h>
Include dependency graph for interrupt_example_iar.c:

Go to the source code of this file.
Defines | |
| #define | ERROR -1; |
| #define | INPUT_MASK 0x000000ff |
| #define | OUTPUT_MASK 0x0000ff00 |
| #define | SUCCESS 0; |
Functions | |
| int | main (void) |
| Sets up the pio and enables interrupts. Push switches to generate interrupts. | |
| __interrupt __root void | pioc_interrupt_handler () |
| The IAR PIO interrupt handler. | |
|
|
Definition at line 51 of file interrupt_example_iar.c. |
|
|
Definition at line 53 of file interrupt_example_iar.c. |
|
|
Definition at line 54 of file interrupt_example_iar.c. |
|
|
Definition at line 50 of file interrupt_example_iar.c. |
|
|
Sets up the pio and enables interrupts. Push switches to generate interrupts.
Definition at line 78 of file interrupt_example_iar.c. References INPUT_MASK, and OUTPUT_MASK. 00079 { 00080 volatile struct avr32_pio_t *pioc = &AVR32_PIOC; 00081 00082 /* 00083 Setup the PIO controller. Set PIOC[8..15] as output, PIOC[0..7] as input. 00084 */ 00085 00086 pioc->oer = OUTPUT_MASK; 00087 pioc->odr= INPUT_MASK; 00088 pioc->per = OUTPUT_MASK&INPUT_MASK; 00089 pioc->codr = INPUT_MASK & OUTPUT_MASK; 00090 pioc->puer = INPUT_MASK & OUTPUT_MASK; 00091 00092 pioc->idr &= ~INPUT_MASK; 00093 pioc->ier = INPUT_MASK; 00094 pioc->ower = OUTPUT_MASK; 00095 00096 __enable_interrupt(); 00097 00098 while(1); 00099 00100 }
|
|
|
The IAR PIO interrupt handler.
Definition at line 63 of file interrupt_example_iar.c. References INPUT_MASK. 00064 { 00065 volatile struct avr32_pio_t *pioc = &AVR32_PIOC; 00066 int status; 00067 00068 status = pioc->isr; 00069 status = pioc->pdsr; 00070 pioc->odsr =~(status&INPUT_MASK)<<8; /* set led */ 00071 }
|
1.4.6