1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-15 21:01:45 -05:00

LimeRFE USB support: reviewed closing device

This commit is contained in:
f4exb 2020-01-22 07:46:52 +01:00
parent e3bea93676
commit e6f945bd41

View File

@ -60,16 +60,12 @@ LimeRFEController::LimeRFEController() :
LimeRFEController::~LimeRFEController()
{
if (m_rfeDevice) {
closeDevice();
}
}
int LimeRFEController::openDevice(const std::string& serialDeviceName)
{
if (m_rfeDevice) {
closeDevice();
}
rfe_dev_t *rfeDevice = RFE_Open(serialDeviceName.c_str(), nullptr);
@ -84,10 +80,13 @@ int LimeRFEController::openDevice(const std::string& serialDeviceName)
}
void LimeRFEController::closeDevice()
{
if (m_rfeDevice)
{
RFE_Close(m_rfeDevice);
m_rfeDevice = nullptr;
}
}
int LimeRFEController::configure()
{