2022-02-17 17:59:09 +00:00
|
|
|
set(MOD_NAME servo)
|
|
|
|
string(TOUPPER ${MOD_NAME} MOD_NAME_UPPER)
|
|
|
|
add_library(usermod_${MOD_NAME} INTERFACE)
|
|
|
|
|
|
|
|
target_sources(usermod_${MOD_NAME} INTERFACE
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.c
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/${MOD_NAME}.cpp
|
2022-02-20 11:00:36 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/pwm/pwm.cpp
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/pwm/pwm_cluster.cpp
|
2022-02-17 17:59:09 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/servo/servo.cpp
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/servo/servo_cluster.cpp
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/servo/servo_state.cpp
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/servo/calibration.cpp
|
|
|
|
)
|
2022-04-05 20:44:03 +01:00
|
|
|
# pico_generate_pio_header(usermod_${MOD_NAME} ${CMAKE_CURRENT_LIST_DIR}/../../../drivers/pwm/pwm_cluster.pio)
|
2022-02-17 17:59:09 +00:00
|
|
|
|
|
|
|
target_include_directories(usermod_${MOD_NAME} INTERFACE
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}
|
2022-02-20 11:00:36 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/pwm/
|
2022-02-17 17:59:09 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/servo/
|
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_definitions(usermod_${MOD_NAME} INTERFACE
|
2022-04-05 20:44:03 +01:00
|
|
|
MODULE_PWM_ENABLED=1
|
2022-02-17 17:59:09 +00:00
|
|
|
MODULE_SERVO_ENABLED=1
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(usermod INTERFACE usermod_${MOD_NAME})
|