add_library(GobotRPC STATIC
    ${CMAKE_CURRENT_LIST_DIR}/../ctrl_interface/base.cpp
    ${CMAKE_CURRENT_LIST_DIR}/../ctrl_interface/ci_instruction.cpp
    ${CMAKE_CURRENT_LIST_DIR}/../ctrl_interface/uart_rp2040/hardware_rp2040_uart.cpp
    ${CMAKE_CURRENT_LIST_DIR}/../ctrl_interface/uart_rp2040/rx.cpp
    ${CMAKE_CURRENT_LIST_DIR}/../crc16.cpp
    ${CMAKE_CURRENT_LIST_DIR}/../protocol_base.cpp
    ${CMAKE_CURRENT_LIST_DIR}/../transmission_interface/rp2040_i2c_init.cpp
    ${CMAKE_CURRENT_LIST_DIR}/../transmission_interface/rp2040_i2c_tx.cpp
    ${CMAKE_CURRENT_LIST_DIR}/../transmission_interface/rp2040_i2c_rx.cpp
    ${CMAKE_CURRENT_LIST_DIR}/../transmission_interface/rp2040_i2c_int.cpp
    ${CMAKE_CURRENT_LIST_DIR}/../transmission_interface/rp2040_i2c_ci_instructions.cpp
)

target_include_directories(GobotRPC PUBLIC 
    ${CMAKE_CURRENT_LIST_DIR}/../include
    ${CMAKE_CURRENT_LIST_DIR}/../include/ti
    ${CMAKE_CURRENT_LIST_DIR}/../../..
)

target_link_libraries(GobotRPC
    FreeRTOS-Kernel-Heap4
    pico_stdlib
    hardware_uart
    hardware_irq
    hardware_i2c
)