interrupt_iar.h File Reference


Detailed Description

PDC and interrupt control example application.

This file gives an example of using the PDC to burst data on the USART. With and without the use of interrupts.

Author:
Atmel Corporation: http://www.atmel.com
Support email: avr32@atmel.com
Name
RELEASE_1_0
Revision
1.6
RCSfile
interrupt_iar.h,v
Date
2006/05/09 10:32:56

Definition in file interrupt_iar.h.

#include <avr32/ioap7000.h>
#include <intrinsics.h>
#include "settings.h"
#include "usart.h"
#include "pdc.h"

Include dependency graph for interrupt_iar.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void init_usart_interrupts (void)
 Setup the interrupt.
void start_interrupts (void)
 Start the interrupt.
void stop_interrupts (void)
 Disables the interrupt.


Function Documentation

void init_usart_interrupts void   ) 
 

Setup the interrupt.

Definition at line 72 of file interrupt_gcc.c.

References pdc_interrupt_handler(), and USART_MODULE_IRQ.

00073 {
00074     set_interrupts_base((void *) AVR32_INTC_ADDRESS);
00075 
00076     /* register_interrupt((__int_handler) INT_HANDLER_FUNC,
00077        GROUP,
00078        LINE,
00079        PRIORITY); */
00080     register_interrupt((__int_handler) pdc_interrupt_handler,
00081             USART_MODULE_IRQ / 32,
00082             USART_MODULE_IRQ % 32,
00083             INT0);
00084 }

Here is the call graph for this function:

void start_interrupts void   ) 
 

Start the interrupt.

Definition at line 89 of file interrupt_gcc.c.

References pdc_disable(), pdc_enable(), pdc_flushCache(), pdc_setTxBuf(), pdc_translatePtr(), stringINT, stringINT2, stringSizeINT, stringSizeINT2, and USART_MODULE.

00090 {
00091     pdc_disable((void *) &USART_MODULE);
00092 
00093     stringINT = "INT: AVR32 PDC application demo\r\n";
00094     stringSizeINT = 33;
00095     stringINT2 = "INT: AVR32 PDC application demo ENDTX int\r\n";
00096     stringSizeINT2 = 43;
00097 
00098     pdc_flushCache((void *)stringINT, stringSizeINT/4);
00099     pdc_flushCache((void *)stringINT2, stringSizeINT2/4);
00100 
00101     pdc_setTxBuf((void *) &USART_MODULE,
00102             pdc_translatePtr((void *)stringINT), stringSizeINT,
00103             pdc_translatePtr((void *)stringINT), stringSizeINT);
00104 
00105     /* Turn on ENDTX interrupts from USART */
00106     USART_MODULE.ier = AVR32_USART_IER_ENDTX_MASK;
00107     init_interrupts();
00108 
00109     pdc_enable((void *) &USART_MODULE);
00110 }

Here is the call graph for this function:

void stop_interrupts void   ) 
 

Disables the interrupt.

Definition at line 115 of file interrupt_gcc.c.

References pdc_disable(), pdc_txBytesLeft(), and USART_MODULE.

00116 {
00117     USART_MODULE.idr = AVR32_USART_IDR_ENDTX_MASK;
00118 
00119     /* Wait for current PDC transfer to complete */
00120     do {
00121     } while(pdc_txBytesLeft((void *) &USART_MODULE) != 0);
00122 
00123     pdc_disable((void *) &USART_MODULE);
00124 }

Here is the call graph for this function:


Generated on Wed May 10 15:03:13 2006 for AVR32108 - Peripheral Direct Memory Access Driver by  doxygen 1.4.6-NO