aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/CAN/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32/CAN/main.c')
-rw-r--r--testhal/STM32/CAN/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/testhal/STM32/CAN/main.c b/testhal/STM32/CAN/main.c
index 21a04d4bf..b23e85b3c 100644
--- a/testhal/STM32/CAN/main.c
+++ b/testhal/STM32/CAN/main.c
@@ -78,8 +78,7 @@ static msg_t can_tx(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) {
@@ -87,6 +86,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();
+
+ /*
* Activates the CAN driver 1.
*/
canStart(&CAND1, &cancfg);