1# Copyright (c) 2024 TDK Invensense 2# SPDX-License-Identifier: Apache-2.0 3 4if(CONFIG_TDK_HAL) 5 6 zephyr_library() 7 8 if(CONFIG_USE_EMD_ICM42670 OR CONFIG_USE_EMD_ICM42370) 9 10 zephyr_include_directories( 11 common 12 icm42x7x 13 icm42x7x/icm42x7x_h 14 ) 15 16 zephyr_library_sources( 17 icm42x7x/imu/inv_imu_driver.c 18 icm42x7x/imu/inv_imu_transport.c 19 ) 20 zephyr_library_sources_ifdef(CONFIG_TDK_APEX icm42x7x/imu/inv_imu_apex.c) 21 22 endif() 23 24 if(CONFIG_USE_EMD_ICP201XX) 25 zephyr_include_directories( 26 common/Invn 27 icp201xx 28 ) 29 30 zephyr_library_sources( 31 icp201xx/Icp201xx.c 32 icp201xx/Icp201xxDriver.c 33 icp201xx/Icp201xxSerif.c 34 ) 35 endif() 36 37 if(CONFIG_USE_EMD_ICP101XX) 38 zephyr_include_directories( 39 common/Invn 40 icp101xx 41 ) 42 43 # When building native_sim on Zephyr we need to explicitely disable messages 44 zephyr_compile_definitions(-DINV_MSG_DISABLE=1) 45 46 if (NOT CONFIG_CPU_HAS_FPU STREQUAL "y") 47 zephyr_compile_definitions(ICP101XX_DISABLE_FLOATING_POINT) 48 endif() 49 zephyr_library_sources( 50 icp101xx/Icp101xx.c 51 ) 52 endif() 53 54endif() 55