From fb65f85e0f915b8587f218bde433210cc574b21f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 17 Mar 2011 17:41:12 -0700 Subject: uhd: whoops, spi convenience functions have 32 bit data --- host/include/uhd/types/serial.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/types/serial.hpp b/host/include/uhd/types/serial.hpp index 5c6de162b..ef6125933 100644 --- a/host/include/uhd/types/serial.hpp +++ b/host/include/uhd/types/serial.hpp @@ -151,7 +151,7 @@ namespace uhd{ virtual boost::uint32_t read_spi( int which_slave, const spi_config_t &config, - boost::uint16_t data, + boost::uint32_t data, size_t num_bits ); @@ -165,7 +165,7 @@ namespace uhd{ virtual void write_spi( int which_slave, const spi_config_t &config, - boost::uint16_t data, + boost::uint32_t data, size_t num_bits ); }; -- cgit v1.2.3 From e460ae41da48a5853898366a403dae9a874a2981 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 17 Mar 2011 17:50:18 -0700 Subject: usrp: dboard iface can inherit from i2c iface --- host/include/uhd/usrp/dboard_iface.hpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp index c5898365d..1ec0fa1ff 100644 --- a/host/include/uhd/usrp/dboard_iface.hpp +++ b/host/include/uhd/usrp/dboard_iface.hpp @@ -55,7 +55,7 @@ struct UHD_API dboard_iface_special_props_t{ * This interface provides i2c, spi, gpio, atr, aux dac/adc access. * Each mboard should have a specially tailored iface for its dboard. */ -class UHD_API dboard_iface{ +class UHD_API dboard_iface : public uhd::i2c_iface{ public: typedef boost::shared_ptr sptr; typedef dboard_iface_special_props_t special_props_t; @@ -208,23 +208,6 @@ public: */ virtual boost::uint16_t read_gpio(unit_t unit) = 0; - /*! - * Write to an I2C peripheral. - * - * \param addr I2C bus address (7-bits) - * \param bytes the data to write - */ - virtual void write_i2c(boost::uint8_t addr, const byte_vector_t &bytes) = 0; - - /*! - * Read from an I2C peripheral. - * - * \param addr I2C bus address (7-bits) - * \param num_bytes number of bytes to read - * \return the data read if successful, else a zero length string. - */ - virtual byte_vector_t read_i2c(boost::uint8_t addr, size_t num_bytes) = 0; - /*! * Write data to SPI bus peripheral. * -- cgit v1.2.3 From 2183c502ee556013e543fcb1f2cf66386b8d7288 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 21 Mar 2011 10:44:46 -0700 Subject: uhd: added comments/documentation to clock_config --- host/include/uhd/types/clock_config.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'host/include') diff --git a/host/include/uhd/types/clock_config.hpp b/host/include/uhd/types/clock_config.hpp index a72eb63de..7301d43a0 100644 --- a/host/include/uhd/types/clock_config.hpp +++ b/host/include/uhd/types/clock_config.hpp @@ -26,10 +26,17 @@ namespace uhd{ * Clock configuration settings: * The source for the 10MHz reference clock. * The source and polarity for the PPS clock. + * + * Use the convenience functions external() and internal(), + * unless you have a special purpose and cannot use them. */ struct UHD_API clock_config_t{ //------ simple usage --------// + + //! A convenience function to create an external clock configuration static clock_config_t external(void); + + //! A convenience function to create an internal clock configuration static clock_config_t internal(void); //------ advanced usage --------// -- cgit v1.2.3 From a963caab9b6500ecef015fa5c514f2a7ae23046f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 21 Mar 2011 16:40:21 -0700 Subject: uhd: setup cpack components for component based installers --- host/CMakeLists.txt | 2 ++ host/Modules/UHDPackage.cmake | 37 ++++++++++++++++++++++++++++++- host/docs/CMakeLists.txt | 6 ++--- host/examples/CMakeLists.txt | 4 ++-- host/include/uhd/CMakeLists.txt | 1 + host/include/uhd/transport/CMakeLists.txt | 1 + host/include/uhd/types/CMakeLists.txt | 1 + host/include/uhd/usrp/CMakeLists.txt | 3 ++- host/include/uhd/utils/CMakeLists.txt | 1 + host/lib/CMakeLists.txt | 1 + host/tests/CMakeLists.txt | 6 +---- host/utils/CMakeLists.txt | 5 +++-- 12 files changed, 54 insertions(+), 14 deletions(-) (limited to 'host/include') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index bbcf34373..590f1b138 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -156,6 +156,7 @@ CONFIGURE_FILE( INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc DESTINATION ${LIBRARY_DIR}/pkgconfig + COMPONENT libraries ) ######################################################################## @@ -166,6 +167,7 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS DESTINATION ${PKG_DOC_DIR} + COMPONENT libraries ) ######################################################################## diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 2a11d407b..ed705148a 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -19,7 +19,7 @@ INCLUDE(UHDVersion) #sets version information ######################################################################## -# Setup CPack +# Setup CPack General ######################################################################## SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ettus Research - Universal Hardware Driver") SET(CPACK_PACKAGE_VENDOR "Ettus Research LLC") @@ -29,6 +29,35 @@ SET(CPACK_PACKAGE_VERSION_MINOR ${UHD_VERSION_MINOR}) SET(CPACK_PACKAGE_VERSION_PATCH ${UHD_VERSION_PATCH}) SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README) SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE) + +######################################################################## +# Setup CPack Components +######################################################################## +SET(CPACK_COMPONENT_LIBRARIES_GROUP "Development") +SET(CPACK_COMPONENT_HEADERS_GROUP "Development") +SET(CPACK_COMPONENT_UTILITIES_GROUP "Runtime") +SET(CPACK_COMPONENT_EXAMPLES_GROUP "Runtime") +SET(CPACK_COMPONENT_TESTS_GROUP "Runtime") +SET(CPACK_COMPONENT_MANUAL_GROUP "Documentation") +SET(CPACK_COMPONENT_DOXYGEN_GROUP "Documentation") + +SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries") +SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers") +SET(CPACK_COMPONENT_UTILITIES_DISPLAY_NAME "Utilities") +SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples") +SET(CPACK_COMPONENT_TESTS_DISPLAY_NAME "Unit Tests") +SET(CPACK_COMPONENT_MANUAL_DISPLAY_NAME "Manual") +SET(CPACK_COMPONENT_DOXYGEN_DISPLAY_NAME "Doxygen") + +SET(CPACK_COMPONENT_UTILITIES_DEPENDS libraries) +SET(CPACK_COMPONENT_EXAMPLES_DEPENDS libraries) +SET(CPACK_COMPONENT_TESTS_DEPENDS libraries) + +SET(CPACK_COMPONENTS_ALL libraries headers utilities examples tests manual doxygen) + +######################################################################## +# Setup CPack Debian +######################################################################## SET(BOOST_MIN_VERSION 1.36) #used in setup for boost STRING(REPLACE "," ", " CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-date-time-dev (>= ${BOOST_MIN_VERSION})," @@ -40,5 +69,11 @@ STRING(REPLACE "," ", " CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-thread-dev (>= ${BOOST_MIN_VERSION})" ) SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk") + +######################################################################## +# Setup CPack RPM +######################################################################## SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel >= ${BOOST_MIN_VERSION}") + +######################################################################## INCLUDE(CPack) #include after setting vars diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt index c04262b63..1a2738647 100644 --- a/host/docs/CMakeLists.txt +++ b/host/docs/CMakeLists.txt @@ -64,14 +64,14 @@ IF(ENABLE_MANUAL) #make the manual target depend on the html file LIST(APPEND manual_html_files ${htmlfile}) - INSTALL(FILES ${htmlfile} DESTINATION ${PKG_DOC_DIR}/manual/html) + INSTALL(FILES ${htmlfile} DESTINATION ${PKG_DOC_DIR}/manual/html COMPONENT manual) ENDFOREACH(rstfile ${manual_sources}) #make the html manual a build-time dependency ADD_CUSTOM_TARGET(manual_html ALL DEPENDS ${manual_html_files}) ENDIF(ENABLE_MANUAL) -INSTALL(FILES ${manual_sources} DESTINATION ${PKG_DOC_DIR}/manual/rst) +INSTALL(FILES ${manual_sources} DESTINATION ${PKG_DOC_DIR}/manual/rst COMPONENT manual) ######################################################################## # Setup Doxygen @@ -99,5 +99,5 @@ IF(ENABLE_DOXYGEN) #make the doxygen generation a built-time dependency ADD_CUSTOM_TARGET(doxygen_docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN}) - INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR} COMPONENT doxygen) ENDIF(ENABLE_DOXYGEN) diff --git a/host/examples/CMakeLists.txt b/host/examples/CMakeLists.txt index 44ed55380..1bb037d16 100644 --- a/host/examples/CMakeLists.txt +++ b/host/examples/CMakeLists.txt @@ -37,7 +37,7 @@ FOREACH(example_source ${example_sources}) GET_FILENAME_COMPONENT(example_name ${example_source} NAME_WE) ADD_EXECUTABLE(${example_name} ${example_source}) TARGET_LINK_LIBRARIES(${example_name} uhd) - INSTALL(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/examples) + INSTALL(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/examples COMPONENT examples) ENDFOREACH(example_source) ######################################################################## @@ -49,5 +49,5 @@ IF(CURSES_FOUND) INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR}) ADD_EXECUTABLE(rx_ascii_art_dft rx_ascii_art_dft.cpp) TARGET_LINK_LIBRARIES(rx_ascii_art_dft uhd ${CURSES_LIBRARIES}) - INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_DATA_DIR}/examples) + INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_DATA_DIR}/examples COMPONENT examples) ENDIF(CURSES_FOUND) diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt index db755511e..74dc4a7d6 100644 --- a/host/include/uhd/CMakeLists.txt +++ b/host/include/uhd/CMakeLists.txt @@ -29,4 +29,5 @@ INSTALL(FILES version.hpp wax.hpp DESTINATION ${INCLUDE_DIR}/uhd + COMPONENT headers ) diff --git a/host/include/uhd/transport/CMakeLists.txt b/host/include/uhd/transport/CMakeLists.txt index 14ca82226..bf7497ee7 100644 --- a/host/include/uhd/transport/CMakeLists.txt +++ b/host/include/uhd/transport/CMakeLists.txt @@ -29,4 +29,5 @@ INSTALL(FILES vrt_if_packet.hpp zero_copy.hpp DESTINATION ${INCLUDE_DIR}/uhd/transport + COMPONENT headers ) diff --git a/host/include/uhd/types/CMakeLists.txt b/host/include/uhd/types/CMakeLists.txt index c856e5568..0971ca472 100644 --- a/host/include/uhd/types/CMakeLists.txt +++ b/host/include/uhd/types/CMakeLists.txt @@ -34,4 +34,5 @@ INSTALL(FILES tune_request.hpp tune_result.hpp DESTINATION ${INCLUDE_DIR}/uhd/types + COMPONENT headers ) diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt index 59a1302af..e441433fd 100644 --- a/host/include/uhd/usrp/CMakeLists.txt +++ b/host/include/uhd/usrp/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -46,4 +46,5 @@ INSTALL(FILES mboard_iface.hpp DESTINATION ${INCLUDE_DIR}/uhd/usrp + COMPONENT headers ) diff --git a/host/include/uhd/utils/CMakeLists.txt b/host/include/uhd/utils/CMakeLists.txt index 70f724c2d..71808ac98 100644 --- a/host/include/uhd/utils/CMakeLists.txt +++ b/host/include/uhd/utils/CMakeLists.txt @@ -31,4 +31,5 @@ INSTALL(FILES thread_priority.hpp warning.hpp DESTINATION ${INCLUDE_DIR}/uhd/utils + COMPONENT headers ) diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index dbfa234b6..a30b380c4 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -121,4 +121,5 @@ INSTALL(TARGETS uhd LIBRARY DESTINATION ${LIBRARY_DIR} # .so file ARCHIVE DESTINATION ${LIBRARY_DIR} # .lib file RUNTIME DESTINATION ${LIBRARY_DIR} # .dll file + COMPONENT libraries ) diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt index 79b20cd47..821b2eb9e 100644 --- a/host/tests/CMakeLists.txt +++ b/host/tests/CMakeLists.txt @@ -44,7 +44,7 @@ FOREACH(test_source ${test_sources}) ADD_EXECUTABLE(${test_name} ${test_source}) TARGET_LINK_LIBRARIES(${test_name} uhd) ADD_TEST(${test_name} ${test_name}) - INSTALL(TARGETS ${test_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/tests) + INSTALL(TARGETS ${test_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/tests COMPONENT tests) ENDFOREACH(test_source) ######################################################################## @@ -52,7 +52,3 @@ ENDFOREACH(test_source) ######################################################################## ADD_LIBRARY(module_test MODULE module_test.cpp) TARGET_LINK_LIBRARIES(module_test uhd) - -INSTALL(TARGETS - RUNTIME DESTINATION ${PKG_DATA_DIR}/tests -) diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt index 53527c03d..3c18324a5 100644 --- a/host/utils/CMakeLists.txt +++ b/host/utils/CMakeLists.txt @@ -28,7 +28,7 @@ FOREACH(util_source ${util_runtime_sources}) GET_FILENAME_COMPONENT(util_name ${util_source} NAME_WE) ADD_EXECUTABLE(${util_name} ${util_source}) TARGET_LINK_LIBRARIES(${util_name} uhd) - INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${RUNTIME_DIR}) + INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities) ENDFOREACH(util_source) ######################################################################## @@ -50,7 +50,7 @@ FOREACH(util_source ${util_share_sources}) GET_FILENAME_COMPONENT(util_name ${util_source} NAME_WE) ADD_EXECUTABLE(${util_name} ${util_source}) TARGET_LINK_LIBRARIES(${util_name} uhd) - INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/utils) + INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/utils COMPONENT utilities) ENDFOREACH(util_source) IF(ENABLE_USRP2) @@ -60,5 +60,6 @@ IF(ENABLE_USRP2) usrp2_card_burner_gui.py usrp_n2xx_net_burner.py DESTINATION ${PKG_DATA_DIR}/utils + COMPONENT utilities ) ENDIF(ENABLE_USRP2) -- cgit v1.2.3 From 95b966a599c0030921dc6b530ca8c94633d905f6 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 23 Mar 2011 18:48:30 -0700 Subject: uhd: update copyright headers with automated script --- host/Modules/UHDComponent.cmake | 2 +- host/Modules/UHDPackage.cmake | 2 +- host/Modules/UHDPython.cmake | 2 +- host/include/uhd/types/serial.hpp | 2 +- host/include/uhd/types/time_spec.hpp | 2 +- host/include/uhd/usrp/gps_ctrl.hpp | 2 +- host/include/uhd/usrp/tune_helper.hpp | 2 +- host/lib/device.cpp | 2 +- host/lib/ic_reg_maps/common.py | 2 +- host/lib/ic_reg_maps/gen_ad9522_regs.py | 2 +- host/lib/transport/if_addrs.cpp | 2 +- host/lib/usrp/CMakeLists.txt | 2 +- host/lib/usrp/dboard_base.cpp | 2 +- host/lib/usrp/dsp_utils.cpp | 2 +- host/lib/usrp/gps_ctrl.cpp | 2 +- host/lib/usrp/tune_helper.cpp | 2 +- host/lib/usrp/usrp1/clock_ctrl.hpp | 2 +- host/lib/usrp/usrp1/usrp1_ctrl.cpp | 2 +- host/lib/usrp/usrp1/usrp1_ctrl.hpp | 2 +- host/lib/usrp/usrp1/usrp1_iface.cpp | 2 +- host/lib/usrp/usrp1/usrp1_iface.hpp | 2 +- host/lib/usrp/usrp2/CMakeLists.txt | 2 +- host/lib/usrp/usrp2/clock_ctrl.cpp | 2 +- host/lib/usrp/usrp2/usrp2_iface.hpp | 2 +- host/lib/usrp/usrp_e100/clock_ctrl.hpp | 2 +- host/lib/usrp/usrp_e100/usrp_e100_iface.hpp | 2 +- host/lib/utils/images.cpp | 2 +- host/tests/addr_test.cpp | 2 +- host/tests/byteswap_test.cpp | 2 +- host/tests/dict_test.cpp | 2 +- host/tests/module_test.cpp | 2 +- host/tests/subdev_spec_test.cpp | 2 +- host/tests/time_spec_test.cpp | 2 +- host/tests/tune_helper_test.cpp | 2 +- host/tests/vrt_test.cpp | 2 +- host/tests/warning_test.cpp | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) (limited to 'host/include') diff --git a/host/Modules/UHDComponent.cmake b/host/Modules/UHDComponent.cmake index 4ea55bbb9..52b7450d5 100644 --- a/host/Modules/UHDComponent.cmake +++ b/host/Modules/UHDComponent.cmake @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 03483e042..8ca8995cd 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/Modules/UHDPython.cmake b/host/Modules/UHDPython.cmake index 345e0187d..90a778609 100644 --- a/host/Modules/UHDPython.cmake +++ b/host/Modules/UHDPython.cmake @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/include/uhd/types/serial.hpp b/host/include/uhd/types/serial.hpp index ef6125933..8281fd3ec 100644 --- a/host/include/uhd/types/serial.hpp +++ b/host/include/uhd/types/serial.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/include/uhd/types/time_spec.hpp b/host/include/uhd/types/time_spec.hpp index 2046fbd3f..02de20ea1 100644 --- a/host/include/uhd/types/time_spec.hpp +++ b/host/include/uhd/types/time_spec.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/include/uhd/usrp/gps_ctrl.hpp b/host/include/uhd/usrp/gps_ctrl.hpp index 74f984ee0..21d400b3b 100644 --- a/host/include/uhd/usrp/gps_ctrl.hpp +++ b/host/include/uhd/usrp/gps_ctrl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/include/uhd/usrp/tune_helper.hpp b/host/include/uhd/usrp/tune_helper.hpp index e97ab0298..0d468a4e2 100644 --- a/host/include/uhd/usrp/tune_helper.hpp +++ b/host/include/uhd/usrp/tune_helper.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/device.cpp b/host/lib/device.cpp index 0002bee6e..1b3daa103 100644 --- a/host/lib/device.cpp +++ b/host/lib/device.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/ic_reg_maps/common.py b/host/lib/ic_reg_maps/common.py index a509936b4..24f5bf8be 100644 --- a/host/lib/ic_reg_maps/common.py +++ b/host/lib/ic_reg_maps/common.py @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/lib/ic_reg_maps/gen_ad9522_regs.py b/host/lib/ic_reg_maps/gen_ad9522_regs.py index 86605c34a..1512da811 100755 --- a/host/lib/ic_reg_maps/gen_ad9522_regs.py +++ b/host/lib/ic_reg_maps/gen_ad9522_regs.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/lib/transport/if_addrs.cpp b/host/lib/transport/if_addrs.cpp index b7c8ad844..83a1ee56f 100644 --- a/host/lib/transport/if_addrs.cpp +++ b/host/lib/transport/if_addrs.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/CMakeLists.txt b/host/lib/usrp/CMakeLists.txt index 59dabbd58..018beb417 100644 --- a/host/lib/usrp/CMakeLists.txt +++ b/host/lib/usrp/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/dboard_base.cpp b/host/lib/usrp/dboard_base.cpp index 999dd9ffc..e14c9d144 100644 --- a/host/lib/usrp/dboard_base.cpp +++ b/host/lib/usrp/dboard_base.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/dsp_utils.cpp b/host/lib/usrp/dsp_utils.cpp index a3a557060..2686e895b 100644 --- a/host/lib/usrp/dsp_utils.cpp +++ b/host/lib/usrp/dsp_utils.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp index e0ab6de90..ff8e9cee6 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/tune_helper.cpp b/host/lib/usrp/tune_helper.cpp index ced80c187..9637301ad 100644 --- a/host/lib/usrp/tune_helper.cpp +++ b/host/lib/usrp/tune_helper.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp1/clock_ctrl.hpp b/host/lib/usrp/usrp1/clock_ctrl.hpp index 645472f02..339d547e6 100644 --- a/host/lib/usrp/usrp1/clock_ctrl.hpp +++ b/host/lib/usrp/usrp1/clock_ctrl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp1/usrp1_ctrl.cpp b/host/lib/usrp/usrp1/usrp1_ctrl.cpp index 3fa6cb8b7..22e9fd1ce 100644 --- a/host/lib/usrp/usrp1/usrp1_ctrl.cpp +++ b/host/lib/usrp/usrp1/usrp1_ctrl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp1/usrp1_ctrl.hpp b/host/lib/usrp/usrp1/usrp1_ctrl.hpp index ee68f8401..970ca2951 100644 --- a/host/lib/usrp/usrp1/usrp1_ctrl.hpp +++ b/host/lib/usrp/usrp1/usrp1_ctrl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp index 0c37610ce..ea7c1cea5 100644 --- a/host/lib/usrp/usrp1/usrp1_iface.cpp +++ b/host/lib/usrp/usrp1/usrp1_iface.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp1/usrp1_iface.hpp b/host/lib/usrp/usrp1/usrp1_iface.hpp index fdb7464ce..2ebcdbacc 100644 --- a/host/lib/usrp/usrp1/usrp1_iface.hpp +++ b/host/lib/usrp/usrp1/usrp1_iface.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp2/CMakeLists.txt b/host/lib/usrp/usrp2/CMakeLists.txt index e8811a8fb..49be9ac7d 100644 --- a/host/lib/usrp/usrp2/CMakeLists.txt +++ b/host/lib/usrp/usrp2/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp2/clock_ctrl.cpp b/host/lib/usrp/usrp2/clock_ctrl.cpp index abda53bf2..7572ed6b1 100644 --- a/host/lib/usrp/usrp2/clock_ctrl.cpp +++ b/host/lib/usrp/usrp2/clock_ctrl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp2/usrp2_iface.hpp b/host/lib/usrp/usrp2/usrp2_iface.hpp index df53ec66a..08f3955f1 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.hpp +++ b/host/lib/usrp/usrp2/usrp2_iface.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp_e100/clock_ctrl.hpp b/host/lib/usrp/usrp_e100/clock_ctrl.hpp index 1f9960ce4..623fbc73b 100644 --- a/host/lib/usrp/usrp_e100/clock_ctrl.hpp +++ b/host/lib/usrp/usrp_e100/clock_ctrl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp_e100/usrp_e100_iface.hpp b/host/lib/usrp/usrp_e100/usrp_e100_iface.hpp index cb0ca2dd4..d9fe96db7 100644 --- a/host/lib/usrp/usrp_e100/usrp_e100_iface.hpp +++ b/host/lib/usrp/usrp_e100/usrp_e100_iface.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/utils/images.cpp b/host/lib/utils/images.cpp index 2b6c02772..a124cc208 100644 --- a/host/lib/utils/images.cpp +++ b/host/lib/utils/images.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/addr_test.cpp b/host/tests/addr_test.cpp index d4b45aa1a..01a7ab607 100644 --- a/host/tests/addr_test.cpp +++ b/host/tests/addr_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/byteswap_test.cpp b/host/tests/byteswap_test.cpp index 3d50c9bfa..7d94bbfba 100644 --- a/host/tests/byteswap_test.cpp +++ b/host/tests/byteswap_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/dict_test.cpp b/host/tests/dict_test.cpp index 0501a7878..7b388d090 100644 --- a/host/tests/dict_test.cpp +++ b/host/tests/dict_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/module_test.cpp b/host/tests/module_test.cpp index 47a0e1af9..af2f749a7 100644 --- a/host/tests/module_test.cpp +++ b/host/tests/module_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/subdev_spec_test.cpp b/host/tests/subdev_spec_test.cpp index 8817d5eee..aa0b9a119 100644 --- a/host/tests/subdev_spec_test.cpp +++ b/host/tests/subdev_spec_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/time_spec_test.cpp b/host/tests/time_spec_test.cpp index 070392f93..e57bbced1 100644 --- a/host/tests/time_spec_test.cpp +++ b/host/tests/time_spec_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/tune_helper_test.cpp b/host/tests/tune_helper_test.cpp index aabaaaf6e..51d216825 100644 --- a/host/tests/tune_helper_test.cpp +++ b/host/tests/tune_helper_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/vrt_test.cpp b/host/tests/vrt_test.cpp index 9e131a10b..066f1493b 100644 --- a/host/tests/vrt_test.cpp +++ b/host/tests/vrt_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/warning_test.cpp b/host/tests/warning_test.cpp index db19955de..3394f84d4 100644 --- a/host/tests/warning_test.cpp +++ b/host/tests/warning_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by -- cgit v1.2.3 From 592af4a86be7309a858e04d1e930d8ac6932db18 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 1 Apr 2011 10:28:58 -0700 Subject: uhd: disable visibility=hidden on non-dll platforms (cygwin) --- host/CMakeLists.txt | 6 ++++-- host/include/uhd/config.hpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'host/include') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 244793b9e..606742865 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -72,8 +72,10 @@ IF(CMAKE_COMPILER_IS_GNUCXX) ADD_DEFINITIONS(-Wextra) #ADD_DEFINITIONS(-pedantic) #ADD_DEFINITIONS(-ansi) - #only export symbols that are declared to be part of the uhd api: - UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN) + IF(NOT WIN32) + #only export symbols that are declared to be part of the uhd api (non dll platforms) + UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN) + ENDIF(NOT WIN32) ENDIF(CMAKE_COMPILER_IS_GNUCXX) IF(MSVC) diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp index 1a04680e9..fdb168950 100644 --- a/host/include/uhd/config.hpp +++ b/host/include/uhd/config.hpp @@ -49,7 +49,7 @@ typedef ptrdiff_t ssize_t; #endif //BOOST_MSVC //define cross platform attribute macros -#if defined(BOOST_MSVC) || defined(BOOST_HAS_DECLSPEC) +#if defined(BOOST_HAS_DECLSPEC) #define UHD_EXPORT __declspec(dllexport) #define UHD_IMPORT __declspec(dllimport) #define UHD_INLINE __forceinline -- cgit v1.2.3 From 7cd216e967161a0d3a4d7b9bc03583d270ce4de3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 4 Apr 2011 13:10:06 -0700 Subject: uhd: specify msvc for implementations known only to work on msvc --- host/CMakeLists.txt | 9 +++++++-- host/Modules/UHDPackage.cmake | 12 ++++++------ host/include/uhd/config.hpp | 2 +- host/include/uhd/utils/byteswap.ipp | 6 +++--- host/lib/transport/CMakeLists.txt | 4 ++-- 5 files changed, 19 insertions(+), 14 deletions(-) (limited to 'host/include') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 3808481bf..7df04995c 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -80,16 +80,21 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX) IF(MSVC) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/msvc) - ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp - ADD_DEFINITIONS(-DNOMINMAX) #disables stupidity and enables std::min and std::max ADD_DEFINITIONS( #stop all kinds of compatibility warnings -D_SCL_SECURE_NO_WARNINGS + -D_SCL_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE ) ENDIF(MSVC) +IF(WIN32) + ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp + ADD_DEFINITIONS(-DNOMINMAX) #disables stupidity and enables std::min and std::max +ENDIF(WIN32) + ######################################################################## # Setup Boost ######################################################################## diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 7ac677d28..4986e314c 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -21,18 +21,18 @@ INCLUDE(UHDVersion) #sets version information ######################################################################## # Setup additional defines for OS types ######################################################################## -IF(UNIX AND EXISTS "/etc/debian_version") +IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + SET(LINUX TRUE) +ENDIF() + +IF(LINUX AND EXISTS "/etc/debian_version") SET(DEBIAN TRUE) ENDIF() -IF(UNIX AND EXISTS "/etc/redhat-release") +IF(LINUX AND EXISTS "/etc/redhat-release") SET(REDHAT TRUE) ENDIF() -IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") - SET(LINUX TRUE) -ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") - ######################################################################## # Setup package file name ######################################################################## diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp index fdb168950..6fd2932cf 100644 --- a/host/include/uhd/config.hpp +++ b/host/include/uhd/config.hpp @@ -49,7 +49,7 @@ typedef ptrdiff_t ssize_t; #endif //BOOST_MSVC //define cross platform attribute macros -#if defined(BOOST_HAS_DECLSPEC) +#if defined(BOOST_MSVC) #define UHD_EXPORT __declspec(dllexport) #define UHD_IMPORT __declspec(dllimport) #define UHD_INLINE __forceinline diff --git a/host/include/uhd/utils/byteswap.ipp b/host/include/uhd/utils/byteswap.ipp index a070a7cf5..c090dee55 100644 --- a/host/include/uhd/utils/byteswap.ipp +++ b/host/include/uhd/utils/byteswap.ipp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,8 +21,8 @@ /*********************************************************************** * Platform-specific implementation details for byteswap below: **********************************************************************/ -#if defined(UHD_PLATFORM_WIN32) //http://msdn.microsoft.com/en-us/library/a3140177%28VS.80%29.aspx - #include +#if defined(BOOST_MSVC) //http://msdn.microsoft.com/en-us/library/a3140177%28VS.80%29.aspx + #include UHD_INLINE boost::uint16_t uhd::byteswap(boost::uint16_t x){ return _byteswap_ushort(x); diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt index 656ca9987..a7179d561 100644 --- a/host/lib/transport/CMakeLists.txt +++ b/host/lib/transport/CMakeLists.txt @@ -31,10 +31,10 @@ IF(ENABLE_USB) MESSAGE(STATUS "USB support enabled via libusb.") INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR}) LIBUHD_APPEND_LIBS(${LIBUSB_LIBRARIES}) - IF(WIN32) + IF(MSVC) #needed when statically linking libusb LIBUHD_APPEND_LIBS(Setupapi.lib) - ENDIF(WIN32) + ENDIF(MSVC) LIBUHD_APPEND_SOURCES( ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_control.cpp ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_zero_copy.cpp -- cgit v1.2.3