diff --git a/Ubiquitous/XiZi/board/ok1052-c/board.c b/Ubiquitous/XiZi/board/ok1052-c/board.c index 55786560d..7ff852c2b 100644 --- a/Ubiquitous/XiZi/board/ok1052-c/board.c +++ b/Ubiquitous/XiZi/board/ok1052-c/board.c @@ -17,10 +17,10 @@ File name: board.c Description: support imxrt1052-board init function Others: take SDK_2.6.1_MIMXRT1052xxxxB for references -History: +History: 1. Date: 2022-01-25 Author: AIIT XUOS Lab -Modification: +Modification: 1. support imxrt1052-board MPU、clock、memory init 2. support imxrt1052-board uart、semc、sdio driver init 3. support imxrt1052-board I2C, SPI, ADC, RTC driver init @@ -68,9 +68,18 @@ int MountSDCard(void) #include #include + +#ifdef BSP_USING_ADC #include +#endif + +#ifdef BSP_USING_SPI #include +#endif + +#ifdef BSP_USING_RTC #include +#endif #define NVIC_PRIORITYGROUP_0 0x00000007U /*!< 0 bits for pre-emption priority 4 bits for subpriority */ diff --git a/Ubiquitous/XiZi/board/ok1052-c/third_party_driver/Kconfig b/Ubiquitous/XiZi/board/ok1052-c/third_party_driver/Kconfig index ed032333a..0ec9c3aa4 100644 --- a/Ubiquitous/XiZi/board/ok1052-c/third_party_driver/Kconfig +++ b/Ubiquitous/XiZi/board/ok1052-c/third_party_driver/Kconfig @@ -22,7 +22,7 @@ menuconfig BSP_USING_GPIO menuconfig BSP_USING_I2C bool "Using I2C device" - default y + default n select RESOURCES_I2C if BSP_USING_I2C @@ -31,7 +31,7 @@ menuconfig BSP_USING_I2C menuconfig BSP_USING_ADC bool "Using ADC device" - default y + default n select RESOURCES_ADC if BSP_USING_ADC @@ -40,7 +40,7 @@ menuconfig BSP_USING_ADC menuconfig BSP_USING_SPI bool "Using SPI device" - default y + default n select RESOURCES_SPI if BSP_USING_SPI diff --git a/Ubiquitous/XiZi/board/ok1052-c/third_party_driver/spi/Makefile b/Ubiquitous/XiZi/board/ok1052-c/third_party_driver/spi/Makefile index 7eaf163ae..8765fdab1 100755 --- a/Ubiquitous/XiZi/board/ok1052-c/third_party_driver/spi/Makefile +++ b/Ubiquitous/XiZi/board/ok1052-c/third_party_driver/spi/Makefile @@ -1,3 +1,7 @@ -SRC_FILES := fsl_lpspi.c connect_spi.c connect_flash_spi.c +SRC_FILES := fsl_lpspi.c connect_spi.c + +ifeq ($(CONFIG_RESOURCES_SPI_SFUD),y) + SRC_FILES += connect_flash_spi.c +endif include $(KERNEL_ROOT)/compiler.mk