Implement IS Nitro Async USB accesses

This commit is contained in:
Lorenzooone
2024-11-08 03:21:42 +01:00
parent 3b18026c74
commit dccc50036c
15 changed files with 882 additions and 117 deletions

View File

@@ -1,5 +1,7 @@
#include "usb_generic.hpp"
#include <thread>
static bool usb_thread_run = false;
static bool usb_initialized = false;
static libusb_context* usb_ctx = NULL; // libusb session context
@@ -13,13 +15,11 @@ void usb_init() {
return;
}
usb_initialized = true;
return;
}
void usb_close() {
if(usb_initialized) {
if(usb_initialized)
libusb_exit(usb_ctx);
}
usb_ctx = NULL;
usb_initialized = false;
}