interrupt_iar.c

Go to the documentation of this file.
00001 /*This file has been prepared for Doxygen automatic documentation generation.*/
00022 #ifdef __IAR__
00023 
00024 #include "interrupt_iar.h"
00025 
00026 char * stringINT;
00027 int stringSizeINT;
00028 volatile avr32_usart_t * usart0;
00029 
00030 #pragma handler = (AVR32_USART0_IRQ/32) : 1 /* group : level */
00031 __interrupt void pdc_interrupt_handler()
00032 {
00033         pdc_setTxNextBuf( (void *) usart0,
00034                         pdc_translatePtr( stringINT ), stringSizeINT );
00035 
00036         return (void *) AVR32_RAR_INT2;
00037 }
00038 
00039 
00040 void start_interrupts()
00041 {
00042         stringINT = "INT: AVR32 PDC application demo\r\n";
00043         stringSizeINT = 33;
00044         usart0 = (volatile avr32_usart_t *) AVR32_USART0_ADDRESS;
00045 
00046         /* Turn on interrupts from USART0 (IER.endrx) */
00047         usart0->ier = (1<<AVR32_USART_IER_ENDRX_OFFSET);
00048 
00049         volatile __asm__( "csrf 0\n" );
00050 
00051         /* PDC, full boobies */
00052         pdc_setTxBuf( (void *) usart0,
00053                         pdc_translatePtr( stringINT ), stringSizeINT,
00054                         pdc_translatePtr( stringINT ), stringSizeINT );
00055 }
00056 
00057 
00058 void stop_interrupts()
00059 {
00060 }
00061 
00062 #endif /* #ifdef __IAR__ */
00063 

Generated on Thu May 10 14:14:48 2007 for AVR321000 Communication with the AVR32 USART by  doxygen 1.5.1