aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/PWM
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/PWM
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/PWM')
-rw-r--r--testhal/STM32/PWM/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/testhal/STM32/PWM/main.c b/testhal/STM32/PWM/main.c
index bda66573d..71daaacdc 100644
--- a/testhal/STM32/PWM/main.c
+++ b/testhal/STM32/PWM/main.c
@@ -60,8 +60,7 @@ static PWMConfig pwmcfg = {
};
/*
- * Entry point, note, the main() function is already a thread in the system
- * on entry.
+ * Application entry point.
*/
int main(int argc, char **argv) {
@@ -69,6 +68,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();
+
+ /*
* Creates the blinker thread.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);