#
# Copyright (c) 2019 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

config MPSL
	bool "Nordic Multi Protocol Service Layer (MPSL)"
	select ZERO_LATENCY_IRQS if !SOC_SERIES_BSIM_NRFXX
	select IEEE802154_NRF5_EXT_IRQ_MGMT if IEEE802154_NRF5
	select NRF_802154_MULTIPROTOCOL_SUPPORT if NRF_802154_RADIO_DRIVER
	select MULTITHREADING_LOCK
	depends on (SOC_SERIES_BSIM_NRFXX || SOC_SERIES_NRF52X || SOC_NRF5340_CPUNET ||\
			SOC_NRF54H20_CPURAD || SOC_SERIES_NRF54LX)
	help
	  Use Nordic Multi Protocol Service Layer (MPSL) implementation,
	  providing services for single and multi-protocol implementations.

if MPSL

choice MPSL_BUILD_TYPE
	prompt "MPSL build type"
	default MPSL_BUILD_TYPE_LIB

config MPSL_BUILD_TYPE_LIB
	bool "Use library"

endchoice

if MPSL_BUILD_TYPE_LIB
config MPSL_LIB_DIR
	string
	default "nrf52" if SOC_SERIES_NRF52X
	default "nrf53" if SOC_NRF5340_CPUNET
	default "nrf54h" if SOC_NRF54H20_CPURAD
	default "nrf54l_ns" if SOC_SERIES_NRF54LX && TRUSTED_EXECUTION_NONSECURE
	default "nrf54l" if SOC_SERIES_NRF54LX && !TRUSTED_EXECUTION_NONSECURE
	default "bsim_nrf52" if SOC_SERIES_BSIM_NRF52X
	default "bsim_nrf53" if SOC_SERIES_BSIM_NRF53X
	default "bsim_nrf54l" if SOC_SERIES_BSIM_NRF54LX
	help
	  Hidden helper option to calculate the library path

config MPSL_LIB_FLOAT_ABI_DIR
	string
	default "hard-float" if FPU && FP_HARDABI
	default "softfp-float" if FPU && FP_SOFTABI
	default "soft-float"
	help
	  Hidden helper option to calculate the library path

endif # MPSL_BUILD_TYPE_LIB
endif # MPSL
