/* setup px4 peripherals and drivers */ void AP_BoardConfig::px4_setup() { px4_setup_pwm(); px4_setup_safety(); px4_setup_uart(); px4_setup_sbus(); px4_setup_drivers(); px4_setup_canbus(); }
/* setup peripherals and drivers */ void AP_BoardConfig::board_setup() { #if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN px4_setup_peripherals(); px4_setup_pwm(); px4_setup_safety_mask(); #elif CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS // init needs to be done after boardconfig is read so parameters are set hal.gpio->init(); hal.rcin->init(); hal.rcout->init(); #endif board_setup_uart(); board_setup_sbus(); #if AP_FEATURE_BOARD_DETECT board_setup_drivers(); #endif }