From eea23b22826e76dba443a12c651d5490a0314471 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 8 Oct 2011 16:56:03 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3439 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- boards/OLIMEX_AVR_MT_128/board.c | 49 ++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 19 deletions(-) (limited to 'boards') diff --git a/boards/OLIMEX_AVR_MT_128/board.c b/boards/OLIMEX_AVR_MT_128/board.c index b1fa460a9..c7e74e2d4 100644 --- a/boards/OLIMEX_AVR_MT_128/board.c +++ b/boards/OLIMEX_AVR_MT_128/board.c @@ -21,6 +21,35 @@ #include "ch.h" #include "hal.h" +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +#if HAL_USE_PAL || defined(__DOXYGEN__) +const PALConfig pal_default_config = +{ +#if defined(PORTA) + {VAL_PORTA, VAL_DDRA}, +#endif +#if defined(PORTA) + {VAL_PORTB, VAL_DDRB}, +#endif +#if defined(PORTA) + {VAL_PORTC, VAL_DDRC}, +#endif +#if defined(PORTA) + {VAL_PORTD, VAL_DDRD}, +#endif +#if defined(PORTA) + {VAL_PORTE, VAL_DDRE}, +#endif +}; +#endif /* HAL_USE_PAL */ + +/** + * @brief Timer0 interrupt handler. + */ CH_IRQ_HANDLER(TIMER0_COMP_vect) { CH_IRQ_PROLOGUE(); @@ -32,29 +61,11 @@ CH_IRQ_HANDLER(TIMER0_COMP_vect) { CH_IRQ_EPILOGUE(); } -/* +/** * Board-specific initialization code. */ void boardInit(void) { - /* - * I/O ports setup. - */ - DDRA = VAL_DDRA; - PORTA = VAL_PORTA; - DDRB = VAL_DDRB; - PORTB = VAL_PORTB; - DDRC = VAL_DDRC; - PORTC = VAL_PORTC; - DDRD = VAL_DDRD; - PORTD = VAL_PORTD; - DDRE = VAL_DDRE; - PORTE = VAL_PORTE; - DDRF = VAL_DDRF; - PORTF = VAL_PORTF; - DDRG = VAL_DDRG; - PORTG = VAL_PORTG; - /* * External interrupts setup, all disabled initially. */ -- cgit v1.2.3