1# Ambiq HAL 2# 3# Copyright (c) 2023 Antmicro Ltd <www.antmicro.com> 4# Copyright (c) 2023 Ambiq Micro Inc. <www.ambiq.com> 5# 6# SPDX-License-Identifier: Apache-2.0 7 8# Sources and headers necessary for every build. 9# These contain definitions and implementation used mostly for 10# initializing the SoC, and therefore are always required. 11zephyr_library() 12zephyr_library_sources(hal/am_hal_global.c) 13zephyr_library_sources(hal/am_hal_pwrctrl.c) 14zephyr_library_sources(hal/am_hal_queue.c) 15zephyr_library_sources(hal/am_hal_security.c) 16zephyr_library_sources(hal/mcu/am_hal_bootrom_helper.c) 17zephyr_library_sources(hal/mcu/am_hal_cachectrl.c) 18zephyr_library_sources(hal/mcu/am_hal_clkgen.c) 19zephyr_library_sources(hal/mcu/am_hal_interrupt.c) 20zephyr_library_sources(hal/mcu/am_hal_mcuctrl.c) 21zephyr_library_sources(hal/mcu/am_hal_mram.c) 22zephyr_library_sources(hal/mcu/am_hal_rtc.c) 23zephyr_library_sources(hal/mcu/am_hal_sysctrl.c) 24zephyr_library_sources(hal/mcu/am_hal_utils.c) 25 26if(CONFIG_AMBIQ_HAL_USE_ADC) 27 zephyr_library_sources(hal/am_hal_adc.c) 28endif() 29 30if(CONFIG_AMBIQ_HAL_USE_GPIO) 31 zephyr_library_sources(hal/am_hal_gpio.c) 32endif() 33 34if(CONFIG_AMBIQ_HAL_USE_HWINFO) 35 zephyr_library_sources(hal/mcu/am_hal_reset.c) 36endif() 37 38if(CONFIG_AMBIQ_HAL_USE_I2C OR CONFIG_AMBIQ_HAL_USE_SPI) 39 zephyr_library_sources(hal/mcu/am_hal_iom.c) 40 zephyr_library_sources(hal/mcu/am_hal_cmdq.c) 41 zephyr_library_sources(hal/mcu/am_hal_fault.c) 42endif() 43 44if(CONFIG_AMBIQ_HAL_USE_MSPI) 45 zephyr_library_sources(hal/mcu/am_hal_mspi.c) 46 zephyr_library_sources(hal/mcu/am_hal_cmdq.c) 47endif() 48 49if(CONFIG_AMBIQ_HAL_USE_STIMER) 50 zephyr_library_sources(hal/am_hal_stimer.c) 51endif() 52 53if(CONFIG_AMBIQ_HAL_USE_TIMER) 54 zephyr_library_sources(hal/am_hal_timer.c) 55endif() 56 57if(CONFIG_AMBIQ_HAL_USE_WDT) 58 zephyr_library_sources(hal/am_hal_wdt.c) 59endif() 60 61zephyr_include_directories(hal) 62