Skip to content

Commit

Permalink
Generalize Picoscope interface
Browse files Browse the repository at this point in the history
This allows the Block to be extended with support for various Picoscope
models.

Furthermore, this ports the custom work implementation to processBulk()
and implements the inclusion of timing messages received over the
message port.

Fixes #113
  • Loading branch information
vimpostor committed Jun 12, 2024
1 parent 3040814 commit a747b06
Show file tree
Hide file tree
Showing 6 changed files with 939 additions and 553 deletions.
8 changes: 7 additions & 1 deletion blocklib/picoscope/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ set_property(TARGET ps4000a PROPERTY
target_link_libraries(ps4000a INTERFACE PkgConfig::zlib PkgConfig::libusb)
target_include_directories(ps4000a INTERFACE ${PICOSCOPE_PREFIX}/include/libps4000a ${PICOSCOPE_PREFIX}/include/libps5000a) # Hack: PicoCallback.h is missing in libps4000a/

add_library(ps5000a SHARED IMPORTED GLOBAL)
set_property(TARGET ps5000a PROPERTY
IMPORTED_LOCATION ${PICOSCOPE_PREFIX}/lib/libps5000a.so)
target_link_libraries(ps5000a INTERFACE PkgConfig::zlib PkgConfig::libusb)
target_include_directories(ps5000a INTERFACE ${PICOSCOPE_PREFIX}/include/libps5000a)

add_library(fair-picoscope INTERFACE)
target_include_directories(fair-picoscope INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/>)

target_link_libraries(fair-picoscope INTERFACE ps4000a gr-digitizers-options gnuradio-core refl-cpp fmt)
target_link_libraries(fair-picoscope INTERFACE ps4000a ps5000a gr-digitizers-options gnuradio-core refl-cpp fmt)
set_target_properties(gr-digitizers PROPERTIES PUBLIC_HEADER "Picoscope.hpp;Picoscope4000a.hpp;StatusMessages.hpp")

if (ENABLE_GR_DIGITIZERS_TESTING)
Expand Down
Loading

0 comments on commit a747b06

Please sign in to comment.