mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-14 15:33:34 -04:00
HackRF: use DeviceHackRF as a singleton to handle HackRF library init and exit only once
This commit is contained in:
@@ -22,8 +22,14 @@
|
||||
class DeviceHackRF
|
||||
{
|
||||
public:
|
||||
static DeviceHackRF& instance();
|
||||
static hackrf_device *open_hackrf(int sequence);
|
||||
static hackrf_device *open_hackrf(const char * const serial);
|
||||
protected:
|
||||
DeviceHackRF();
|
||||
DeviceHackRF(const DeviceHackRF&) {}
|
||||
DeviceHackRF& operator=(const DeviceHackRF& other __attribute__((unused))) { return *this; }
|
||||
~DeviceHackRF();
|
||||
private:
|
||||
static hackrf_device *open_hackrf_from_sequence(int sequence);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user