| 368 | } |
| 369 | |
| 370 | void Finalize() { |
| 371 | if(g_Initialized) { |
| 372 | usbDsExit(); |
| 373 | |
| 374 | g_EndpointIn = nullptr; |
| 375 | g_EndpointOut = nullptr; |
| 376 | g_Interface = nullptr; |
| 377 | |
| 378 | g_Initialized = false; |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | bool IsStateOk() { |
| 383 | auto state = UsbState_Detached; |