aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2016-07-18 14:34:00 -0700
committerMartin Braun <martin.braun@ettus.com>2016-09-02 11:10:46 -0700
commit59ed6e1a0f9710c7bfca0a348d07f8c96f9f6bc0 (patch)
tree368f9aa5e9b2031beb92bc3916fa2a7bba8b372a /host/include
parent196e93a387dea47ab8a3ad600b90446e98840a54 (diff)
downloaduhd-59ed6e1a0f9710c7bfca0a348d07f8c96f9f6bc0.tar.gz
uhd-59ed6e1a0f9710c7bfca0a348d07f8c96f9f6bc0.tar.bz2
uhd-59ed6e1a0f9710c7bfca0a348d07f8c96f9f6bc0.zip
GPSDO: Make sure read_uart() returns only complete strings for all devices.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/types/serial.hpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/host/include/uhd/types/serial.hpp b/host/include/uhd/types/serial.hpp
index 7b565c633..dca0cfb2a 100644
--- a/host/include/uhd/types/serial.hpp
+++ b/host/include/uhd/types/serial.hpp
@@ -124,7 +124,7 @@ namespace uhd{
*/
spi_config_t(edge_t edge = EDGE_RISE);
};
-
+
/*!
* The SPI interface class.
* Provides routines to transact SPI and do other useful things which haven't been defined yet.
@@ -151,12 +151,12 @@ namespace uhd{
size_t num_bits,
bool readback
) = 0;
-
+
/*!
* Read from the SPI bus.
* \param which_slave the slave device number
* \param config spi config args
- * \param data the bits to write out (be sure to set write bit)
+ * \param data the bits to write out (be sure to set write bit)
* \param num_bits how many bits in data
* \return spi data
*/
@@ -166,7 +166,7 @@ namespace uhd{
boost::uint32_t data,
size_t num_bits
);
-
+
/*!
* Write to the SPI bus.
* \param which_slave the slave device number
@@ -183,7 +183,7 @@ namespace uhd{
};
/*!
- * UART interface to write and read bytes.
+ * UART interface to write and read strings.
*/
class UHD_API uart_iface{
public:
@@ -198,10 +198,9 @@ namespace uhd{
virtual void write_uart(const std::string &buf) = 0;
/*!
- * Read from a serial port.
- * Reads until complete line or timeout.
+ * Read a line from a serial port.
* \param timeout the timeout in seconds
- * \return the data read from the serial port
+ * \return the line or empty string upon timeout
*/
virtual std::string read_uart(double timeout) = 0;
};