mirror of https://github.com/f4exb/sdrangel.git
LimeSDR: use CMIX_BYP_TXTSP to control NCO on/off
This commit is contained in:
parent
229027c345
commit
7c558b15f5
|
@ -56,20 +56,41 @@ bool DeviceLimeSDR::setNCOFrequency(lms_device_t *device, bool dir_tx, std::size
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
if (dir_tx)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (LMS_SetNCOIndex(device, dir_tx, chan, LMS_NCO_VAL_COUNT, true) < 0)
|
if (LMS_WriteParam(device,LMS7param(CMIX_BYP_TXTSP),0) < 0) {
|
||||||
{
|
fprintf(stderr, "DeviceLimeSDR::setNCOFrequency: cannot enable Tx NCO\n");
|
||||||
fprintf(stderr, "DeviceLimeSDR::setNCOFrequency: cannot disable NCO\n");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "DeviceLimeSDR::setNCOFrequency: NCO disabled\n");
|
if (LMS_WriteParam(device,LMS7param(CMIX_BYP_RXTSP),0) < 0) {
|
||||||
|
fprintf(stderr, "DeviceLimeSDR::setNCOFrequency: cannot enable Rx NCO\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (dir_tx)
|
||||||
|
{
|
||||||
|
if (LMS_WriteParam(device,LMS7param(CMIX_BYP_TXTSP),1) < 0) {
|
||||||
|
fprintf(stderr, "DeviceLimeSDR::setNCOFrequency: cannot disable Tx NCO\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (LMS_WriteParam(device,LMS7param(CMIX_BYP_RXTSP),1) < 0) {
|
||||||
|
fprintf(stderr, "DeviceLimeSDR::setNCOFrequency: cannot disable Rx NCO\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue