waf: enable CANARD_MULTI_IFACE on AP_Periph if more than one interface

This commit is contained in:
Andrew Tridgell 2023-09-01 19:03:44 +10:00
parent 5c8a29b47e
commit 3623d20479

View File

@ -578,6 +578,8 @@ def configure(cfg):
load_env_vars(cfg.env) load_env_vars(cfg.env)
if env.HAL_NUM_CAN_IFACES and not env.AP_PERIPH: if env.HAL_NUM_CAN_IFACES and not env.AP_PERIPH:
setup_canmgr_build(cfg) setup_canmgr_build(cfg)
if env.HAL_NUM_CAN_IFACES and env.AP_PERIPH and int(env.HAL_NUM_CAN_IFACES)>1 and not env.BOOTLOADER:
env.DEFINES += [ 'CANARD_MULTI_IFACE=1' ]
setup_optimization(cfg.env) setup_optimization(cfg.env)
def generate_hwdef_h(env): def generate_hwdef_h(env):