feat: add IOKit-based USB transport

Replace the stub probe with a real IOKit/IOUSBFamily transport:
discovery by VID/PID, device and interface connections, vendor
control requests on EP0, bulk writes to EP 0x04 OUT, and an async
read pump (EP 0x05 IN / EP 0x04 IN) on a dedicated CFRunLoop
thread with disconnect notification.

Add the test_usb suite, link IOKit/CoreFoundation into xone_usb,
and update the README investigation checklist.

Co-Authored-By: qwen3.8-27b@q2_k_xl: implemented USB transport layer
This commit is contained in:
portersky
2026-08-17 15:52:22 +02:00
parent 5a102bb511
commit 4f0f1ff75d
7 changed files with 690 additions and 23 deletions
+4 -1
View File
@@ -6,7 +6,7 @@ if(NOT CMAKE_GENERATOR MATCHES "^(Ninja|Xcode)$")
endif()
cmake_minimum_required(VERSION 3.21)
project(xone_macos VERSION 0.1.2 LANGUAGES CXX Swift)
project(xone_macos VERSION 0.1.3 LANGUAGES CXX Swift)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@@ -31,6 +31,9 @@ target_include_directories(xone_usb PUBLIC "${CMAKE_SOURCE_DIR}/include")
target_compile_features(xone_usb PRIVATE cxx_std_23)
target_compile_options(xone_usb PRIVATE ${BASE_OPTIONS})
target_compile_definitions(xone_usb PRIVATE ${BASE_DEFINITIONS})
find_library(XONE_IOKIT IOKit)
find_library(XONE_COREFOUNDATION CoreFoundation)
target_link_libraries(xone_usb PUBLIC "${XONE_IOKIT}" "${XONE_COREFOUNDATION}")
# Auth + crypto (AES-CCMP key setup, ECDH, RSA — port from auth/)
add_library(xone_auth STATIC