| 319 | } |
| 320 | |
| 321 | void HAL_ChibiOS::run(int argc, char * const argv[], Callbacks* callbacks) const |
| 322 | { |
| 323 | #if defined(HAL_EARLY_WATCHDOG_INIT) && !defined(DISABLE_WATCHDOG) |
| 324 | stm32_watchdog_init(); |
| 325 | stm32_watchdog_pat(); |
| 326 | #endif |
| 327 | /* |
| 328 | * System initializations. |
| 329 | * - ChibiOS HAL initialization, this also initializes the configured device drivers |
| 330 | * and performs the board-specific initializations. |
| 331 | * - Kernel initialization, the main() function becomes a thread and the |
| 332 | * RTOS is active. |
| 333 | */ |
| 334 | |
| 335 | #if HAL_USE_SERIAL_USB == TRUE |
| 336 | usb_initialise(); |
| 337 | #endif |
| 338 | |
| 339 | #ifdef HAL_STDOUT_SERIAL |
| 340 | //STDOUT Initialisation |
| 341 | SerialConfig stdoutcfg = |
| 342 | { |
| 343 | HAL_STDOUT_BAUDRATE, |
| 344 | 0, |
| 345 | USART_CR2_STOP1_BITS, |
| 346 | 0 |
| 347 | }; |
| 348 | sdStart((SerialDriver*)&HAL_STDOUT_SERIAL, &stdoutcfg); |
| 349 | #endif |
| 350 | |
| 351 | g_callbacks = callbacks; |
| 352 | |
| 353 | //Takeover main |
| 354 | main_loop(); |
| 355 | } |
| 356 | |
| 357 | static HAL_ChibiOS hal_chibios; |
| 358 |
nothing calls this directly
no test coverage detected