Changed encoder folder and gave it a namespace
This commit is contained in:
parent
ba076ccc7b
commit
2eb6a0cf3e
|
@ -29,5 +29,5 @@ add_subdirectory(hub75)
|
|||
add_subdirectory(uc8151)
|
||||
add_subdirectory(pwm)
|
||||
add_subdirectory(servo)
|
||||
add_subdirectory(encoder-pio)
|
||||
add_subdirectory(encoder)
|
||||
add_subdirectory(motor)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
include(encoder-pio.cmake)
|
|
@ -0,0 +1 @@
|
|||
include(encoder.cmake)
|
|
@ -1,4 +1,4 @@
|
|||
set(DRIVER_NAME encoder-pio)
|
||||
set(DRIVER_NAME encoder)
|
||||
add_library(${DRIVER_NAME} INTERFACE)
|
||||
|
||||
target_sources(${DRIVER_NAME} INTERFACE
|
|
@ -6,7 +6,7 @@ add_executable(
|
|||
pico_generate_pio_header(explorerencoder ${CMAKE_CURRENT_LIST_DIR}/quadrature_out.pio)
|
||||
|
||||
# Pull in pico libraries that we need
|
||||
target_link_libraries(explorerencoder pico_stdlib pico_explorer encoder-pio)
|
||||
target_link_libraries(explorerencoder pico_stdlib pico_explorer encoder)
|
||||
|
||||
# create map/bin/hex file etc.
|
||||
pico_add_extra_outputs(explorerencoder)
|
|
@ -1,4 +1,4 @@
|
|||
#include "drivers/encoder-pio/encoder.hpp"
|
||||
#include "drivers/encoder/encoder.hpp"
|
||||
#include <cstdio>
|
||||
#include <cfloat>
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@ 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
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/encoder-pio/encoder.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/encoder/encoder.cpp
|
||||
)
|
||||
pico_generate_pio_header(usermod_${MOD_NAME} ${CMAKE_CURRENT_LIST_DIR}/../../../drivers/encoder-pio/encoder.pio)
|
||||
pico_generate_pio_header(usermod_${MOD_NAME} ${CMAKE_CURRENT_LIST_DIR}/../../../drivers/encoder/encoder.pio)
|
||||
|
||||
target_include_directories(usermod_${MOD_NAME} INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/encoder-pio/
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/encoder/
|
||||
)
|
||||
|
||||
target_compile_definitions(usermod_${MOD_NAME} INTERFACE
|
||||
|
|
Loading…
Reference in New Issue