set(LILYGO_CPP_BUS_DRIVER_DIR
    "${CMAKE_SOURCE_DIR}/platform/esp/third_party/lilygo_cpp_bus_driver")

idf_component_register(
    SRCS
        "trail_mate_t_display_p4_runtime.cpp"
        "trail_mate_t_display_p4_keyboard.cpp"
        "t_display_p4_audio_runtime.cpp"
        "${CMAKE_SOURCE_DIR}/boards/t_display_p4/src/runtime_support.cpp"
        "hi8561_driver.c"
        "rm69a10_driver.c"
        "${LILYGO_CPP_BUS_DRIVER_DIR}/src/tool.cpp"
        "${LILYGO_CPP_BUS_DRIVER_DIR}/src/bus/bus_guide.cpp"
        "${LILYGO_CPP_BUS_DRIVER_DIR}/src/bus/i2c/software_i2c.cpp"
        "${LILYGO_CPP_BUS_DRIVER_DIR}/src/chip/chip_guide.cpp"
        "${LILYGO_CPP_BUS_DRIVER_DIR}/src/chip/i2c/tca8418.cpp"
        "${LILYGO_CPP_BUS_DRIVER_DIR}/src/chip/i2c/xl95x5.cpp"
    INCLUDE_DIRS
        "include"
        "include/bsp"
        "."
    PRIV_INCLUDE_DIRS
        "${CMAKE_SOURCE_DIR}/boards/t_display_p4/include"
        "${CMAKE_SOURCE_DIR}/platform/shared/include"
        "${LILYGO_CPP_BUS_DRIVER_DIR}/src"
    REQUIRES
        esp_lcd
        esp_lvgl_port
        esp_timer
        esp_driver_gpio
        esp_driver_i2c
        esp_driver_ledc
        esp_driver_i2s
        esp_codec_dev
    PRIV_REQUIRES
        main
)
