Xmega Application Note


init.c File Reference

STK600 with RC100X routing board init. More...

#include "board.h"
#include "compiler.h"
#include "stk600_rc100x.h"
#include "conf_board.h"
#include "ioport.h"
Include dependency graph for init.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void board_init (void)
 < Default RCOsc frequency.

Detailed Description

STK600 with RC100X routing board init.

To use this board, define BOARD=STK600_RC100X.

Copyright (C) 2010 Atmel Corporation. All rights reserved.

Definition in file init.c.


Function Documentation

void board_init ( void   ) 

< Default RCOsc frequency.

This function initializes the board target ressources This function should be called to ensure proper initialization of the target board hardware connected to the part.

Definition at line 46 of file init.c.

References AT45DBX_CS, AT45DBX_MASTER_MISO, AT45DBX_MASTER_MOSI, AT45DBX_MASTER_SCK, AT45DBX_MASTER_SS, GPIO_PUSH_BUTTON_0, GPIO_PUSH_BUTTON_1, GPIO_PUSH_BUTTON_2, GPIO_PUSH_BUTTON_3, GPIO_PUSH_BUTTON_4, GPIO_PUSH_BUTTON_5, GPIO_PUSH_BUTTON_6, GPIO_PUSH_BUTTON_7, ioport_configure_pin(), IOPORT_CREATE_PIN, IOPORT_DIR_INPUT, IOPORT_DIR_OUTPUT, IOPORT_INIT_HIGH, IOPORT_PULL_UP, LED0_GPIO, LED1_GPIO, LED2_GPIO, LED3_GPIO, LED4_GPIO, LED5_GPIO, LED6_GPIO, and LED7_GPIO.

00047 {
00048         ioport_configure_pin(LED0_GPIO, IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00049         ioport_configure_pin(LED1_GPIO, IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00050         ioport_configure_pin(LED2_GPIO, IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00051         ioport_configure_pin(LED3_GPIO, IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00052         ioport_configure_pin(LED4_GPIO, IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00053         ioport_configure_pin(LED5_GPIO, IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00054         ioport_configure_pin(LED6_GPIO, IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00055         ioport_configure_pin(LED7_GPIO, IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00056 
00057         ioport_configure_pin(GPIO_PUSH_BUTTON_0,IOPORT_DIR_INPUT | IOPORT_PULL_UP);
00058         ioport_configure_pin(GPIO_PUSH_BUTTON_1,IOPORT_DIR_INPUT | IOPORT_PULL_UP);
00059         ioport_configure_pin(GPIO_PUSH_BUTTON_2,IOPORT_DIR_INPUT | IOPORT_PULL_UP);
00060         ioport_configure_pin(GPIO_PUSH_BUTTON_3,IOPORT_DIR_INPUT | IOPORT_PULL_UP);
00061         ioport_configure_pin(GPIO_PUSH_BUTTON_4,IOPORT_DIR_INPUT | IOPORT_PULL_UP);
00062         ioport_configure_pin(GPIO_PUSH_BUTTON_5,IOPORT_DIR_INPUT | IOPORT_PULL_UP);
00063         ioport_configure_pin(GPIO_PUSH_BUTTON_6,IOPORT_DIR_INPUT | IOPORT_PULL_UP);
00064         ioport_configure_pin(GPIO_PUSH_BUTTON_7,IOPORT_DIR_INPUT | IOPORT_PULL_UP);
00065   
00066         #ifdef CONF_BOARD_AT45DBX
00067         ioport_configure_pin(AT45DBX_MASTER_SS,IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00068         ioport_configure_pin(AT45DBX_MASTER_SCK,IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00069         ioport_configure_pin(AT45DBX_MASTER_MOSI,IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00070         ioport_configure_pin(AT45DBX_MASTER_MISO, IOPORT_DIR_INPUT);
00071         ioport_configure_pin(AT45DBX_CS,IOPORT_DIR_OUTPUT | IOPORT_INIT_HIGH);
00072         #endif
00073 
00074         #ifdef CONF_BOARD_ENABLE_USARTC0
00075         ioport_configure_pin(IOPORT_CREATE_PIN(PORTC, 3), IOPORT_DIR_OUTPUT
00076                         | IOPORT_INIT_HIGH);
00077         ioport_configure_pin(IOPORT_CREATE_PIN(PORTC, 2), IOPORT_DIR_INPUT);
00078         #endif
00079 
00080         #ifdef CONF_BOARD_ENABLE_USARTC1
00081         ioport_configure_pin(IOPORT_CREATE_PIN(PORTC, 7), IOPORT_DIR_OUTPUT
00082                         | IOPORT_INIT_HIGH);
00083         ioport_configure_pin(IOPORT_CREATE_PIN(PORTC, 6), IOPORT_DIR_INPUT);
00084         #endif
00085 
00086         #ifdef CONF_BOARD_ENABLE_USARTD0
00087         ioport_configure_pin(IOPORT_CREATE_PIN(PORTD, 3), IOPORT_DIR_OUTPUT
00088                         | IOPORT_INIT_HIGH);
00089         ioport_configure_pin(IOPORT_CREATE_PIN(PORTD, 2), IOPORT_DIR_INPUT);
00090         #endif
00091 
00092         #ifdef CONF_BOARD_ENABLE_USARTD1
00093         ioport_configure_pin(IOPORT_CREATE_PIN(PORTD, 7), IOPORT_DIR_OUTPUT
00094                         | IOPORT_INIT_HIGH);
00095         ioport_configure_pin(IOPORT_CREATE_PIN(PORTD, 6), IOPORT_DIR_INPUT);
00096         #endif
00097 
00098         #ifdef CONF_BOARD_ENABLE_USARTE0
00099         ioport_configure_pin(IOPORT_CREATE_PIN(PORTE, 3), IOPORT_DIR_OUTPUT
00100                         | IOPORT_INIT_HIGH);
00101         ioport_configure_pin(IOPORT_CREATE_PIN(PORTE, 2), IOPORT_DIR_INPUT);
00102         #endif
00103 
00104         #ifdef CONF_BOARD_ENABLE_USARTE1
00105         ioport_configure_pin(IOPORT_CREATE_PIN(PORTE, 7), IOPORT_DIR_OUTPUT
00106                         | IOPORT_INIT_HIGH);
00107         ioport_configure_pin(IOPORT_CREATE_PIN(PORTE, 6), IOPORT_DIR_INPUT);
00108         #endif
00109 
00110         #ifdef CONF_BOARD_ENABLE_USARTF0
00111         ioport_configure_pin(IOPORT_CREATE_PIN(PORTF, 3), IOPORT_DIR_OUTPUT
00112                         | IOPORT_INIT_HIGH);
00113         ioport_configure_pin(IOPORT_CREATE_PIN(PORTF, 2), IOPORT_DIR_INPUT);
00114         #endif
00115 
00116         #ifdef CONF_BOARD_ENABLE_USARTF1
00117         ioport_configure_pin(IOPORT_CREATE_PIN(PORTF, 7), IOPORT_DIR_OUTPUT
00118                         | IOPORT_INIT_HIGH);
00119         ioport_configure_pin(IOPORT_CREATE_PIN(PORTF, 6), IOPORT_DIR_INPUT);
00120         #endif
00121 }

Here is the call graph for this function:

@DOC_TITLE@
Generated on Fri Oct 22 12:15:25 2010 for AVR1300 Using the Xmega ADC by doxygen 1.6.3