1 #ifndef RADIODDITY_INTERFACE_HH
2 #define RADIODDITY_INTERFACE_HH
6 #include "radiointerface.hh"
9 #include "hid_macos.hh"
11 #include "hid_libusb.hh"
75 static QList<USBDeviceDescriptor>
detect();
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Implements the HID radio interface using libusb.
Definition: hid_libusb.hh:12
Provides some information about a radio model.
Definition: radioinfo.hh:16
Abstract radio interface.
Definition: radiointerface.hh:21
Implements a radio interface for radios using the HID USB schema (i.e.
Definition: radioddity_interface.hh:18
bool read_start(uint32_t bank, uint32_t addr, const ErrorStack &err=ErrorStack())
Starts the read process from the specified bank and at the given address.
Definition: radioddity_interface.cc:119
bool selectMemoryBank(MemoryBank bank, const ErrorStack &err=ErrorStack())
Internal used function to select a memory bank.
Definition: radioddity_interface.cc:250
void close()
Closes the connection to the device.
Definition: radioddity_interface.cc:52
bool read_finish(const ErrorStack &err=ErrorStack())
This function ends a series of read operations.
Definition: radioddity_interface.cc:157
bool read(uint32_t bank, uint32_t addr, unsigned char *data, int nbytes, const ErrorStack &err=ErrorStack())
Reads a block of data from the device at the given block number.
Definition: radioddity_interface.cc:131
RadioInfo identifier(const ErrorStack &err=ErrorStack())
Returns radio identifier string.
Definition: radioddity_interface.cc:59
static USBDeviceInfo interfaceInfo()
Returns some information about the interface.
Definition: radioddity_interface.cc:37
bool isOpen() const
Returns true if the connection was established.
Definition: radioddity_interface.cc:47
bool write_start(uint32_t bank, uint32_t addr, const ErrorStack &err=ErrorStack())
Starts the write process into the specified bank and at the given address.
Definition: radioddity_interface.cc:180
virtual ~RadioddityInterface()
Destructor.
Definition: radioddity_interface.cc:31
bool write_finish(const ErrorStack &err=ErrorStack())
This function ends a series of write operations.
Definition: radioddity_interface.cc:229
MemoryBank
Possible memory banks to select.
Definition: radioddity_interface.hh:23
@ MEMBANK_CODEPLUG_LOWER
Lower memory bank (EEPROM).
Definition: radioddity_interface.hh:25
@ MEMBANK_NONE
No bank selected.
Definition: radioddity_interface.hh:24
@ MEMBANK_CODEPLUG_UPPER
Upper memory bank (FLASH).
Definition: radioddity_interface.hh:26
@ MEMBANK_CALLSIGN_LOWER
Callsign DB memory lower bank (also FLASH).
Definition: radioddity_interface.hh:27
@ MEMBANK_CALLSIGN_UPPER
Callsign DB memory upper bank (also FLASH).
Definition: radioddity_interface.hh:28
bool write(uint32_t bank, uint32_t addr, unsigned char *data, int nbytes, const ErrorStack &err=ErrorStack())
Writes a block of data to the device at the given block number.
Definition: radioddity_interface.cc:192
RadioddityInterface(const USBDeviceDescriptor &descr, const ErrorStack &err=ErrorStack(), QObject *parent=nullptr)
Connects to the radio via the given descriptor.
Definition: radioddity_interface.cc:24
static QList< USBDeviceDescriptor > detect()
Tries to find all interfaces connected AnyTone radios.
Definition: radioddity_interface.cc:42
Base class for all radio interface descriptors representing a unique interface to a connected radio.
Definition: usbdevice.hh:197
Generic information about a possible radio interface.
Definition: usbdevice.hh:121