mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-17 02:54:17 +00:00
Read programmer serial number from libusb or hidusb (#1223)
* Silence compiler warnings * Fix a fall-through error in switch * Slightly reformat programmer info printout Now the target voltage is printed out along with the HW version, FW version and serial number, and they all allign nicely. When in ISP mode, the "SCK period" value is printed _after_ the target voltage readout, and _before_ the additional clocks the programmer holds, such as JTAG, PDI and UPDI clocks. Co-authored-by: Stefan Rueger <stefan.rueger@urclocks.com>
This commit is contained in:
@@ -649,6 +649,7 @@ union pinfo
|
||||
struct serial_device {
|
||||
// open should return -1 on error, other values on success
|
||||
int (*open)(const char *port, union pinfo pinfo, union filedescriptor *fd);
|
||||
const char *(*serno)();
|
||||
int (*setparams)(const union filedescriptor *fd, long baud, unsigned long cflags);
|
||||
void (*close)(union filedescriptor *fd);
|
||||
|
||||
@@ -671,6 +672,7 @@ extern struct serial_device avrdoper_serdev;
|
||||
extern struct serial_device usbhid_serdev;
|
||||
|
||||
#define serial_open (serdev->open)
|
||||
#define serial_serno (serdev->serno)
|
||||
#define serial_setparams (serdev->setparams)
|
||||
#define serial_close (serdev->close)
|
||||
#define serial_send (serdev->send)
|
||||
|
||||
Reference in New Issue
Block a user