aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/SPI
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-19 11:07:54 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-19 11:07:54 +0000
commit1f18297e2a7c96659a63821a766050013e23bf67 (patch)
treec2630de175662f9a774f688a78f97aa15e7d8d46 /testhal/STM32/SPI
parentfa1b222c21a4c2aee932d6605facb9706bf0dae3 (diff)
downloadChibiOS-1f18297e2a7c96659a63821a766050013e23bf67.tar.gz
ChibiOS-1f18297e2a7c96659a63821a766050013e23bf67.tar.bz2
ChibiOS-1f18297e2a7c96659a63821a766050013e23bf67.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2504 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/SPI')
-rw-r--r--testhal/STM32/SPI/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/testhal/STM32/SPI/main.c b/testhal/STM32/SPI/main.c
index 674a1c558..146894a0a 100644
--- a/testhal/STM32/SPI/main.c
+++ b/testhal/STM32/SPI/main.c
@@ -87,8 +87,7 @@ static msg_t spi_thread_2(void *p) {
}
/*
- * Entry point, note, the main() function is already a thread in the system
- * on entry.
+ * Application entry point.
*/
int main(int argc, char **argv) {
unsigned i;
@@ -97,6 +96,16 @@ int main(int argc, char **argv) {
(void)argv;
/*
+ * System initializations.
+ * - HAL initialization, this also initializes the configured device drivers
+ * and performs the board-specific initializations.
+ * - Kernel initialization, the main() function becomes a thread and the
+ * RTOS is active.
+ */
+ halInit();
+ chSysInit();
+
+ /*
* SPI1 I/O pins setup.
*/
palSetPadMode(IOPORT1, 5, PAL_MODE_STM32_ALTERNATE_PUSHPULL); /* SCK. */