summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-05-05 11:14:29 -0700
committerJosh Blum <josh@joshknows.com>2011-05-05 11:14:29 -0700
commit5092a25ad0103b7093c1de711e2d0b83fa4cce4b (patch)
tree9867b37798060eb32e117a925be612b4d261cffd /host/lib/usrp
parent9734a74366dd095256c2e2c58c5c9bcd7547f72d (diff)
downloaduhd-5092a25ad0103b7093c1de711e2d0b83fa4cce4b.tar.gz
uhd-5092a25ad0103b7093c1de711e2d0b83fa4cce4b.tar.bz2
uhd-5092a25ad0103b7093c1de711e2d0b83fa4cce4b.zip
usrp1: added more logging to usrp1 iface for debugging
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/usrp1/usrp1_iface.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp
index d7e8f601f..f66337ef9 100644
--- a/host/lib/usrp/usrp1/usrp1_iface.cpp
+++ b/host/lib/usrp/usrp1/usrp1_iface.cpp
@@ -72,6 +72,11 @@ public:
boost::uint32_t peek32(boost::uint32_t addr)
{
+ UHD_LOGV(always)
+ << "peek32("
+ << std::dec << std::setw(2) << addr << ")" << std::endl
+ ;
+
boost::uint32_t value_out;
boost::uint8_t w_index_h = SPI_ENABLE_FPGA & 0xff;
@@ -116,6 +121,10 @@ public:
void write_i2c(boost::uint8_t addr, const byte_vector_t &bytes)
{
+ UHD_LOGV(always) << "write_i2c:" << std::endl
+ << " addr 0x" << std::hex << int(addr) << std::endl
+ << " len " << bytes.size() << std::endl
+ ;
UHD_ASSERT_THROW(bytes.size() < max_i2c_data_bytes);
unsigned char buff[max_i2c_data_bytes];
@@ -132,6 +141,10 @@ public:
byte_vector_t read_i2c(boost::uint8_t addr, size_t num_bytes)
{
+ UHD_LOGV(always) << "read_i2c:" << std::endl
+ << " addr 0x" << std::hex << int(addr) << std::endl
+ << " len " << num_bytes << std::endl
+ ;
UHD_ASSERT_THROW(num_bytes < max_i2c_data_bytes);
unsigned char buff[max_i2c_data_bytes];
@@ -169,6 +182,13 @@ public:
size_t num_bits,
bool readback)
{
+ UHD_LOGV(always)
+ << "transact_spi: " << std::endl
+ << " slave: " << which_slave << std::endl
+ << " bits: " << bits << std::endl
+ << " num_bits: " << num_bits << std::endl
+ << " readback: " << readback << std::endl
+ ;
UHD_ASSERT_THROW((num_bits <= 32) && !(num_bits % 8));
size_t num_bytes = num_bits / 8;