MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / run

Method run

libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp:321–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321void 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
357static HAL_ChibiOS hal_chibios;
358

Callers

nothing calls this directly

Calls 4

usb_initialiseFunction · 0.85
main_loopFunction · 0.70
stm32_watchdog_initFunction · 0.50
stm32_watchdog_patFunction · 0.50

Tested by

no test coverage detected