ref: fe4d396d063fa60052da9a28b704c83c9068c7da
parent: f80e89b8eccdea0815e9f93be667c5aa95d01db8
parent: 64823563d4d05c4eb8a8c18bd63f45bfa54e6dfd
author: Maido <v3rm0n@users.noreply.github.com>
date: Mon Dec 12 11:40:08 EST 2022
Merge pull request #1 from v3rm0n/audio Get handle
--- a/serial.c
+++ b/serial.c
@@ -88,6 +88,10 @@
return 0;
}
+libusb_device_handle *get_handle() {+ return devh;
+}
+
int init_serial(int verbose) { if (devh != NULL) {@@ -235,6 +239,7 @@
return 1;
}
+
#else
#include <libserialport.h>
@@ -481,4 +486,5 @@
return 1;
}
#endif
+
--- a/serial.h
+++ b/serial.h
@@ -7,7 +7,9 @@
#ifdef USE_LIBUSB
// Not sure about this value but it seems to work
#define serial_read_size 512
+#include <libusb.h>
void set_file_descriptor(int fd);
+libusb_device_handle *get_handle();
#else
// maximum amount of bytes to read from the serial in one read()
#define serial_read_size 324
--
⑨