diff options
author | Josh Blum <josh@joshknows.com> | 2011-04-19 17:47:36 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-04-19 17:47:36 -0700 |
commit | fdee3ba82b997c709e6822aa000df8adb61c56a5 (patch) | |
tree | ed566f55ef024fd2a45d053a719010e1b2c49366 /host/include | |
parent | ee424d797fc37a8c3c2a82a58218bf1e85456226 (diff) | |
parent | 290bb75de236cb53c54bb4599cc2dde924f9800e (diff) | |
download | uhd-fdee3ba82b997c709e6822aa000df8adb61c56a5.tar.gz uhd-fdee3ba82b997c709e6822aa000df8adb61c56a5.tar.bz2 uhd-fdee3ba82b997c709e6822aa000df8adb61c56a5.zip |
Merge branch 'master' into next
Conflicts:
fpga/usrp2/top/u2plus/Makefile.N200
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/CMakeLists.txt | 1 | ||||
-rw-r--r-- | host/include/uhd/config.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/transport/CMakeLists.txt | 1 | ||||
-rw-r--r-- | host/include/uhd/types/CMakeLists.txt | 1 | ||||
-rw-r--r-- | host/include/uhd/types/clock_config.hpp | 7 | ||||
-rw-r--r-- | host/include/uhd/types/serial.hpp | 6 | ||||
-rw-r--r-- | host/include/uhd/types/time_spec.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/usrp/CMakeLists.txt | 3 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_iface.hpp | 19 | ||||
-rw-r--r-- | host/include/uhd/usrp/gps_ctrl.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/usrp/tune_helper.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/utils/CMakeLists.txt | 1 | ||||
-rw-r--r-- | host/include/uhd/utils/byteswap.ipp | 6 |
13 files changed, 24 insertions, 29 deletions
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/config.hpp b/host/include/uhd/config.hpp index 1a04680e9..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_MSVC) || 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/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/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 --------// diff --git a/host/include/uhd/types/serial.hpp b/host/include/uhd/types/serial.hpp index 5c6de162b..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 @@ -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 ); }; 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/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/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<dboard_iface> sptr; typedef dboard_iface_special_props_t special_props_t; @@ -209,23 +209,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. * * \param unit which unit, rx or tx 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/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/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 <stdlib.h> +#if defined(BOOST_MSVC) //http://msdn.microsoft.com/en-us/library/a3140177%28VS.80%29.aspx + #include <cstdlib> UHD_INLINE boost::uint16_t uhd::byteswap(boost::uint16_t x){ return _byteswap_ushort(x); |