aboutsummaryrefslogtreecommitdiffstats
path: root/boards/OLIMEX_SAM7_EX256
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-19 10:25:31 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-19 10:25:31 +0000
commit35c315a77a92d8ca0efefea329770c6bf9adca2d (patch)
treea8aa8da453470d587a2ee236de7bfe2f4c859676 /boards/OLIMEX_SAM7_EX256
parentf131e4297dc619b3f3148a079c634f2cec0fd687 (diff)
downloadChibiOS-35c315a77a92d8ca0efefea329770c6bf9adca2d.tar.gz
ChibiOS-35c315a77a92d8ca0efefea329770c6bf9adca2d.tar.bz2
ChibiOS-35c315a77a92d8ca0efefea329770c6bf9adca2d.zip
AT91SAM7x board files and demos updated.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2500 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'boards/OLIMEX_SAM7_EX256')
-rw-r--r--boards/OLIMEX_SAM7_EX256/board.c22
-rw-r--r--boards/OLIMEX_SAM7_EX256/board.h10
2 files changed, 15 insertions, 17 deletions
diff --git a/boards/OLIMEX_SAM7_EX256/board.c b/boards/OLIMEX_SAM7_EX256/board.c
index 38c84fc1d..e13a05420 100644
--- a/boards/OLIMEX_SAM7_EX256/board.c
+++ b/boards/OLIMEX_SAM7_EX256/board.c
@@ -60,10 +60,10 @@ static CH_IRQ_HANDLER(SYSIrqHandler) {
/*
* Early initialization code.
- * This initialization is performed just after reset before BSS and DATA
- * segments initialization.
+ * This initialization must be performed just after stack setup and before
+ * any other initialization.
*/
-void hwinit0(void) {
+void __early_init(void) {
/* Watchdog disabled.*/
AT91C_BASE_WDTC->WDTC_WDMR = AT91C_WDTC_WDDIS;
@@ -72,16 +72,9 @@ void hwinit0(void) {
}
/*
- * Late initialization code.
- * This initialization is performed after BSS and DATA segments initialization
- * and before invoking the main() function.
+ * Board-specific initialization code.
*/
-void hwinit1(void) {
-
- /*
- * HAL initialization.
- */
- halInit();
+void boardInit(void) {
/*
* LCD pins setup.
@@ -124,9 +117,4 @@ void hwinit1(void) {
AT91C_BASE_PIOA->PIO_PDR = AT91C_PA3_RTS0 | AT91C_PA4_CTS0;
AT91C_BASE_PIOA->PIO_ASR = AT91C_PIO_PA3 | AT91C_PIO_PA4;
AT91C_BASE_PIOA->PIO_PPUDR = AT91C_PIO_PA3 | AT91C_PIO_PA4;
-
- /*
- * ChibiOS/RT initialization.
- */
- chSysInit();
}
diff --git a/boards/OLIMEX_SAM7_EX256/board.h b/boards/OLIMEX_SAM7_EX256/board.h
index 22add597e..961fda9c0 100644
--- a/boards/OLIMEX_SAM7_EX256/board.h
+++ b/boards/OLIMEX_SAM7_EX256/board.h
@@ -91,4 +91,14 @@
#define PIOB_PHY_IRQ 26
#define PIOB_PHY_IRQ_MASK (1 << PIOB_PHY_IRQ)
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
#endif /* _BOARD_H_ */