// set default value for BRD_SAFETY_MASK void AP_BoardConfig::set_default_safety_ignore_mask(uint16_t mask) { #if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN px4.ignore_safety_channels.set_default(mask); px4_setup_safety_mask(); #endif }
/* 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 }