# SPDX-FileCopyrightText: Copyright (c) 2026 Nuvoton Technology Corporation
# SPDX-License-Identifier: Apache-2.0

# Add lacking StdDriver source files
#
# Although this approach is invasive into "nuvoton" module, it would be
# better than cloning these files here which could introduce file sync
# concern.

if(NOT ZEPHYR_NUVOTON_MODULE_DIR)
    Message(FATAL_ERROR "\"nuvoton\" module is unavailable")
endif()

zephyr_sources_ifdef(CONFIG_SOC_SERIES_M55M1X
    ${ZEPHYR_NUVOTON_MODULE_DIR}/m55m1x/StdDriver/src/dmic.c
    ${ZEPHYR_NUVOTON_MODULE_DIR}/m55m1x/StdDriver/src/lppdma.c
)
