file(GLOB FILELIST 
stddriver/src/misc.c
stddriver/src/stm32f4xx_rcc.c
stddriver/src/stm32f4xx_gpio.c
stddriver/src/stm32f4xx_tim.c
stddriver/src/stm32f4xx_spi.c
stddriver/src/stm32f4xx_i2c.c
stddriver/src/stm32f4xx_usart.c
stddriver/src/stm32f4xx_dma.c
stddriver/src/stm32f4xx_sdio.c
stddriver/src/stm32f4xx_flash.c
stddriver/src/stm32f4xx_adc.c
stddriver/src/system_stm32f4xx.c

sdcard/fatfs_drv.c
sdcard/sdio_lowlevel.c
sdcard/sdio_sd.c
)

add_library(driver STATIC ${FILELIST})
target_include_directories(driver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/stddriver/inc)
target_include_directories(driver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/cmsis/inc)
target_include_directories(driver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/sdcard)
target_include_directories(driver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../component/fatfs/inc)
