mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
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 true;
|
||||
}
|
||||
else
|
||||
if (dir_tx)
|
||||
{
|
||||
if (LMS_SetNCOIndex(device, dir_tx, chan, LMS_NCO_VAL_COUNT, true) < 0)
|
||||
{
|
||||
fprintf(stderr, "DeviceLimeSDR::setNCOFrequency: cannot disable NCO\n");
|
||||
if (LMS_WriteParam(device,LMS7param(CMIX_BYP_TXTSP),0) < 0) {
|
||||
fprintf(stderr, "DeviceLimeSDR::setNCOFrequency: cannot enable Tx NCO\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
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
Block a user