list(APPEND incs ".")
list(APPEND incs "../components/lib")
list(APPEND incs "../components/system/include")
list(APPEND incs "../components/system/source")
list(APPEND incs "../components/system/source/k_kit")
list(APPEND incs "../components/system/source/shell")
list(APPEND incs "drivers/data_port/usb-host")
list(APPEND incs "drivers/data_port/ble_spp")
list(APPEND incs "drivers/data_port/socket_inet")
list(APPEND incs "drivers/sertrf")


list(APPEND srcs "app_main.c")
list(APPEND srcs "app_info.c")
list(APPEND srcs "ota.c")
list(APPEND srcs "console.c")
list(APPEND srcs "drivers/data_port/sb_data_port.c")
list(APPEND srcs "drivers/data_port/uart/uart_port.c")
list(APPEND srcs "drivers/ws2812_spi/ws2812_spi.c")
list(APPEND srcs "drivers/ws2812_spi/ws2812_spi_shell.c")
list(APPEND srcs "button/button.c")
list(APPEND srcs "button/multi_button.c")
list(APPEND srcs "config/board_config.c")
list(APPEND srcs "config/app_config.c")
list(APPEND srcs "config/app_log.c")
list(APPEND srcs "utils/crc.c")
list(APPEND srcs "utils/sb_aes.c")


list(APPEND srcs "drivers/sertrf/sertrf.c")
list(APPEND srcs "drivers/sertrf/device.c")
list(APPEND srcs "drivers/sertrf/key.c")

list(APPEND srcs "drivers/led_strip/led_strip.c")
list(APPEND srcs "drivers/led_strip/led_strip_encoder.c")

list(APPEND srcs "drivers/pin_io/pin_io.c")

if(CONFIG_BUILD_BLE)
list(APPEND srcs "drivers/data_port/ble_spp/ble_spp_server.c")
list(APPEND srcs "drivers/data_port/ble_spp/ble_spp_server_shell.c")
endif()

if(CONFIG_BUILD_WIFI)
list(APPEND srcs "drivers/data_port/socket_inet/wifi.c")
list(APPEND srcs "drivers/data_port/socket_inet/wifi_shell.c")
list(APPEND srcs "drivers/data_port/socket_inet/socket_inet.c")
list(APPEND srcs "drivers/data_port/socket_inet/socket_inet_server.c")
list(APPEND srcs "drivers/data_port/socket_inet/socket_inet_server_shell.c")
endif()

if(CONFIG_IDF_TARGET_ESP32S3)
list(APPEND srcs "drivers/data_port/usb-host/usbport.c")
list(APPEND srcs "drivers/data_port/usb-host/msc/diskio_usb.c")
list(APPEND srcs "drivers/data_port/usb-host/msc/msc_host_vfs.c")
list(APPEND srcs "drivers/data_port/usb-host/msc/msc_host.c")
list(APPEND srcs "drivers/data_port/usb-host/msc/msc_scsi_bot.c")
endif()

idf_component_register(
    INCLUDE_DIRS ${incs}
    SRCS ${srcs}
    REQUIRES 
        driver
        spi_flash
        nvs_flash
        app_update
        esp_wifi
        mbedtls
        bt
        usb
        fatfs
        vfs
    )
