From 983920ddc9e3f074defd7ab68e72248401d8ca3c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 4 Oct 2008 10:03:33 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@456 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-AT91SAM7X-WEB-GCC/board.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'demos/ARM7-AT91SAM7X-WEB-GCC/board.c') diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/board.c b/demos/ARM7-AT91SAM7X-WEB-GCC/board.c index 2bc9c6395..8c483f1f0 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/board.c +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/board.c @@ -55,11 +55,11 @@ static void SYSIrqHandler(void) { } /* - * Board initialization code. + * Early initialization code. + * This initialization is performed just after reset before BSS and DATA + * segments initialization. */ -void hwinit(void) { - int i; - +void hwinit0(void) { /* * Flash Memory: 1 wait state, about 50 cycles in a microsecond. */ @@ -100,6 +100,15 @@ void hwinit(void) { AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_PIOA) | (1 << AT91C_ID_PIOB); AT91C_BASE_PIOA->PIO_PER = 0xFFFFFFFF; AT91C_BASE_PIOB->PIO_PER = 0xFFFFFFFF; +} + +/* + * Late initialization code. + * This initialization is performed after BSS and DATA segments initialization + * and before invoking the main() function. + */ +void hwinit1(void) { + int i; /* * Default AIC setup, the device drivers will modify it as needed. -- cgit v1.2.3