discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] reading and writing registers


From: seph 004
Subject: [Discuss-gnuradio] reading and writing registers
Date: Fri, 3 Nov 2006 02:43:46 -0800 (PST)

Hi

I am having some trouble trying to get register writing and reading from the C++ level to work. I've created two methods:

for writing

static bool
write_a_reg (usrp_basic *u, int address, int amount)
{
  bool isit = u->_write_fpga_reg (address, amount);

  return isit;
}

for  reading

int
read_a_reg (usrp_basic *u, int address)
{
  int val = u->_read_fpga_reg (address);

  return val;
}


When I use the write method:

bool fine2 = write_a_reg (urx, 78, 60);

The returned boolean indicates that the write was successful. If I try to read the same register though:

int value = read_a_reg (urx, 78);

it always returns zero no matter what I put in. The urx is the handle of a usrp_standard_rx object, and if I'm not mistaken, register number 78 (`FR_USER_14) shoul be free to use. What am I doing wrong?

Regards

Lance


reply via email to

[Prev in Thread] Current Thread [Next in Thread]