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
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
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio