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