diff --git a/tests/unit/modules/motion/CMakeLists.txt b/tests/unit/modules/motion/CMakeLists.txt index b7d93fc..ce17dff 100644 --- a/tests/unit/modules/motion/CMakeLists.txt +++ b/tests/unit/modules/motion/CMakeLists.txt @@ -1,9 +1,13 @@ # common include and source directories set(include_common ${CMAKE_SOURCE_DIR}/src/modules ${CMAKE_SOURCE_DIR}/src/hal) set(source_common - ${CMAKE_SOURCE_DIR}/src/modules/motion.cpp ${CMAKE_SOURCE_DIR}/src/modules/speed_table.cpp - ${CMAKE_SOURCE_DIR}/src/modules/pulse_gen.cpp ${MODULES_STUBS_DIR}/stub_gpio.cpp - ${MODULES_STUBS_DIR}/stub_shr16.cpp ${MODULES_STUBS_DIR}/stub_tmc2130.cpp + ${CMAKE_SOURCE_DIR}/src/modules/motion.cpp + ${CMAKE_SOURCE_DIR}/src/modules/speed_table.cpp + ${CMAKE_SOURCE_DIR}/src/modules/pulse_gen.cpp + ${MODULES_STUBS_DIR}/stub_gpio.cpp + ${CMAKE_SOURCE_DIR}/src/hal/avr/tmc2130.cpp + ${MODULES_STUBS_DIR}/stub_shr16.cpp + ${MODULES_STUBS_DIR}/stub_spi.cpp ) # general motion tests diff --git a/tests/unit/modules/stubs/stub_spi.cpp b/tests/unit/modules/stubs/stub_spi.cpp new file mode 100644 index 0000000..030338b --- /dev/null +++ b/tests/unit/modules/stubs/stub_spi.cpp @@ -0,0 +1,14 @@ +#include "spi.h" + +namespace hal { +namespace spi { + +void Init(SPI_TypeDef *const hspi, SPI_InitTypeDef *const conf) { +} + +uint8_t TxRx(SPI_TypeDef *hspi, uint8_t val) { + return 0; +} + +} // namespace spi +} // namespace hal