pio_test.c File Reference

#include "../part.h"

Include dependency graph for pio_test.c:

Go to the source code of this file.

Defines

#define CPU_HZ   20000000
#define PIO_MASK   0x000000ff

Functions

void delay (void)
int main (void)


Define Documentation

#define CPU_HZ   20000000

Definition at line 3 of file pio_test.c.

#define PIO_MASK   0x000000ff

Definition at line 4 of file pio_test.c.


Function Documentation

void delay ( void   ) 

This function is a delay function that lasts for 1/4 second.

Parameters:
none 
Returns:
none

Definition at line 54 of file pdc_example.c.

References TIMEOUT.

Referenced by main().

00055 {
00056         unsigned int timeout = TIMEOUT;
00057 
00058         do {
00059                 --timeout;
00060         } while ( timeout > 0 );
00061 }

int main ( void   ) 

Definition at line 8 of file pio_test.c.

References delay(), and piob.

00009 {
00010         int i;
00011         avr32_pio_t *piob = (void *) AVR32_PIOB_ADDRESS;
00012         avr32_pio_t *pioc = (void *) AVR32_PIOC_ADDRESS;
00013 
00014         piob->per = 0xFFFFffff;
00015         piob->oer = 0xFFFFffff;
00016         piob->idr = 0xFFFFffff;
00017         piob->ower = 0xFFFFffff;
00018 
00019         pioc->per = 0xFFFFffff;
00020         pioc->oer = 0xFFFFffff;
00021         pioc->idr = 0xFFFFffff;
00022         pioc->ower = 0xFFFFffff;
00023 
00024 
00025         while(1){
00026                 for(i=0; i<8; i++){
00027                         piob->codr = 0x0000ffff;
00028                         pioc->codr = 0x0000ffff;
00029                         delay();
00030                         piob->sodr = 0x0000ffff;
00031                         pioc->sodr = 0x0000ffff;
00032                         delay();
00033 
00034                 }
00035         }
00036 }

Here is the call graph for this function:


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