Implements the communication interface to the GD-73.
More...
#include <gd73_interface.hh>
|
| GD73Interface (const USBDeviceDescriptor &descriptor, const ErrorStack &err=ErrorStack(), QObject *parent=nullptr) |
| Constructs a new interface to GD73A/E radios. More...
|
|
bool | isOpen () const |
| Return true if a connection to the device has been established.
|
|
RadioInfo | identifier (const ErrorStack &err=ErrorStack()) |
| Returns a device identifier.
|
|
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. More...
|
|
bool | write (uint32_t bank, uint32_t addr, uint8_t *data, int nbytes, const ErrorStack &err=ErrorStack()) |
| Writes a chunk of data at the address addr . More...
|
|
bool | write_finish (const ErrorStack &err=ErrorStack()) |
| This function ends a series of write operations. More...
|
|
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. More...
|
|
bool | read (uint32_t bank, uint32_t addr, uint8_t *data, int nbytes, const ErrorStack &err=ErrorStack()) |
| Reads a chunk of data from the block-address bno (block number). More...
|
|
bool | read_finish (const ErrorStack &err=ErrorStack()) |
| This function ends a series of read operations. More...
|
|
void | close () |
| Closes the connection to the device.
|
|
| C7000Device (const USBDeviceDescriptor &descr, const ErrorStack &err=ErrorStack(), QObject *parent=nullptr) |
| Opens a connection to the C7000 device.
|
|
virtual | ~C7000Device () |
| Destructor.
|
|
bool | isOpen () const |
| Returns true if the C7000 interface is open.
|
|
void | close () |
| Closes the C7000 interface.
|
|
virtual | ~RadioInterface () |
| Destructor.
|
|
virtual bool | reboot (const ErrorStack &err=ErrorStack()) |
| Some radios need to be rebooted after being read or programmed. More...
|
|
|
QString | _identifier |
| Name of the radio.
|
|
uint16_t | _lastSequence |
| Last received/send sequence number.
|
|
libusb_context * | _ctx |
| USB context.
|
|
libusb_device_handle * | _dev |
| USB device object.
|
|
Implements the communication interface to the GD-73.
◆ GD73Interface()
Constructs a new interface to GD73A/E radios.
If a matching device was found, isOpen
returns true
.
◆ read()
bool GD73Interface::read |
( |
uint32_t |
bank, |
|
|
uint32_t |
addr, |
|
|
uint8_t * |
data, |
|
|
int |
nbytes, |
|
|
const ErrorStack & |
err = ErrorStack() |
|
) |
| |
|
virtual |
Reads a chunk of data from the block-address bno
(block number).
- Parameters
-
bank | Specifies the memory bank to read from. Usually there is only one bank. Some radios, however, to have several memory banks to hold the codeplug. For example the Open GD77 has EEPROM and Flash memory banks with independent addresses. |
addr | Specifies the address to read from. |
data | Pointer where to store the read data. |
nbytes | Specifies the number of bytes to read. |
err | Passes an error stack to put error messages on. |
- Returns
true
on success.
Implements RadioInterface.
◆ read_finish()
This function ends a series of read
operations.
This function will be re-implemented by certain interfaces that need completion of read operations (e.g., HID).
- Parameters
-
err | Passes an error stack to put error messages on. |
Implements RadioInterface.
◆ read_start()
bool GD73Interface::read_start |
( |
uint32_t |
bank, |
|
|
uint32_t |
addr, |
|
|
const ErrorStack & |
err = ErrorStack() |
|
) |
| |
|
virtual |
Starts the read process from the specified bank and at the given address.
- Parameters
-
bank | Specifies the memory bank to read from. Usually there is only one bank. Some radios, however, to have several memory banks to hold the codeplug. For example the Open GD77 has EEPROM and Flash memory banks with independent addresses. |
addr | Specifies the address to read from. |
err | Passes an error stack to put error messages on. |
Implements RadioInterface.
◆ write()
bool GD73Interface::write |
( |
uint32_t |
bank, |
|
|
uint32_t |
addr, |
|
|
uint8_t * |
data, |
|
|
int |
nbytes, |
|
|
const ErrorStack & |
err = ErrorStack() |
|
) |
| |
|
virtual |
Writes a chunk of data
at the address addr
.
- Parameters
-
bank | Specifies the memory bank to write to. Usually there is only one bank. Some radios, however, to have several memory banks to hold the codeplug. For example the Open GD77 has EEPROM and Flash memory banks with independent addresses. |
addr | Specifies the address to write to. |
data | Pointer to the actual data to be written. |
nbytes | Specifies the number of bytes to write. |
err | Passes an error stack to put error messages on. |
- Returns
true
on success.
Implements RadioInterface.
◆ write_finish()
This function ends a series of write
operations.
This function will be implemented by certain interfaces that need completion of write operations (e.g., HID).
- Parameters
-
err | Passes an error stack to put error messages on. |
Implements RadioInterface.
◆ write_start()
bool GD73Interface::write_start |
( |
uint32_t |
bank, |
|
|
uint32_t |
addr, |
|
|
const ErrorStack & |
err = ErrorStack() |
|
) |
| |
|
virtual |
Starts the write process into the specified bank and at the given address.
- Parameters
-
bank | Specifies the memory bank to write to. Usually there is only one bank. Some radios, however, to have several memory banks to hold the codeplug. For example the Open GD77 has EEPROM and Flash memory banks with independent addresses. |
addr | Specifies the address to write to. |
err | Passes an error stack to put error messages on. |
Implements RadioInterface.
The documentation for this class was generated from the following files:
- /home/hannes/Software/qdmr/lib/gd73_interface.hh
- /home/hannes/Software/qdmr/lib/gd73_interface.cc