aboutsummaryrefslogtreecommitdiffstats
path: root/boards/OLIMEX_AVR_MT_128
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-10-08 16:56:03 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-10-08 16:56:03 +0000
commiteea23b22826e76dba443a12c651d5490a0314471 (patch)
treecb316499704694310f772679ef567b56197569fe /boards/OLIMEX_AVR_MT_128
parentb8aac8295e455e123ce1337b760e349d47cb2ede (diff)
downloadChibiOS-eea23b22826e76dba443a12c651d5490a0314471.tar.gz
ChibiOS-eea23b22826e76dba443a12c651d5490a0314471.tar.bz2
ChibiOS-eea23b22826e76dba443a12c651d5490a0314471.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3439 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'boards/OLIMEX_AVR_MT_128')
-rw-r--r--boards/OLIMEX_AVR_MT_128/board.c49
1 files changed, 30 insertions, 19 deletions
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,30 +61,12 @@ 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.
*/
EICRA = 0x00;