# CMakeLists.txt for Bucky Arm EMG Robotic Hand
#
# Project structure:
#   src/
#   ├── config/     Configuration headers
#   ├── hal/        Hardware Abstraction Layer
#   ├── drivers/    Device drivers
#   ├── core/       Core business logic
#   └── app/        Application entry point

# Collect all source files from each layer
set(HAL_SOURCES
    hal/servo_hal.c
)

set(DRIVER_SOURCES
    drivers/hand.c
    drivers/emg_sensor.c
)

set(CORE_SOURCES
    core/gestures.c
    core/inference.c
)

set(APP_SOURCES
    app/main.c
)

# Register component with ESP-IDF
idf_component_register(
    SRCS
        ${HAL_SOURCES}
        ${DRIVER_SOURCES}
        ${CORE_SOURCES}
        ${APP_SOURCES}
    INCLUDE_DIRS
        .
    REQUIRES esp_adc
)
