diff options
Diffstat (limited to 'testhal/STM32/ADC/main.c')
-rw-r--r-- | testhal/STM32/ADC/main.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/testhal/STM32/ADC/main.c b/testhal/STM32/ADC/main.c index 20fa6005b..ded1bd2b9 100644 --- a/testhal/STM32/ADC/main.c +++ b/testhal/STM32/ADC/main.c @@ -82,8 +82,7 @@ static msg_t Thread1(void *arg) { }
/*
- * Entry point, note, the main() function is already a thread in the system
- * on entry.
+ * Application entry point.
*/
int main(int argc, char **argv) {
@@ -91,6 +90,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();
+
+ /*
* Setting up analog inputs used by the demo. */
palSetGroupMode(GPIOC, PAL_PORT_BIT(0) | PAL_PORT_BIT(1),
|