Motion: Use an SPI stub in order to test TMC2130
parent
9a93ebecfc
commit
8e24d1e084
|
|
@ -1,9 +1,13 @@
|
||||||
# common include and source directories
|
# common include and source directories
|
||||||
set(include_common ${CMAKE_SOURCE_DIR}/src/modules ${CMAKE_SOURCE_DIR}/src/hal)
|
set(include_common ${CMAKE_SOURCE_DIR}/src/modules ${CMAKE_SOURCE_DIR}/src/hal)
|
||||||
set(source_common
|
set(source_common
|
||||||
${CMAKE_SOURCE_DIR}/src/modules/motion.cpp ${CMAKE_SOURCE_DIR}/src/modules/speed_table.cpp
|
${CMAKE_SOURCE_DIR}/src/modules/motion.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/modules/pulse_gen.cpp ${MODULES_STUBS_DIR}/stub_gpio.cpp
|
${CMAKE_SOURCE_DIR}/src/modules/speed_table.cpp
|
||||||
${MODULES_STUBS_DIR}/stub_shr16.cpp ${MODULES_STUBS_DIR}/stub_tmc2130.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
|
# general motion tests
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
Loading…
Reference in New Issue