From 5288385495bacfc02f6d611c22ec9cfdd7e74293 Mon Sep 17 00:00:00 2001 From: Nicholas Zamora Date: Tue, 16 Dec 2025 16:05:11 +0000 Subject: [PATCH] Driver: DXX: Update libredxx for FT260 support --- 99-intrepidcs.rules | 3 +++ CMakeLists.txt | 2 +- platform/dxx.cpp | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/99-intrepidcs.rules b/99-intrepidcs.rules index de7dbe7..b919d3b 100644 --- a/99-intrepidcs.rules +++ b/99-intrepidcs.rules @@ -5,3 +5,6 @@ KERNEL=="ttyACM?", ATTRS{idVendor}=="093c", GROUP="users", MODE="0666" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="093c", KERNEL=="ttyUSB*", \ RUN+="/bin/sh -c 'echo $id:1.0>/sys/bus/usb/drivers/ftdi_sio/unbind'" + +ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="093c", DRIVER=="usbhid", \ +RUN+="/bin/sh -c 'echo $id:1.0>/sys/bus/usb/drivers/usbhid/unbind'" diff --git a/CMakeLists.txt b/CMakeLists.txt index 87b6e23..6325a4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -360,7 +360,7 @@ if(LIBICSNEO_ENABLE_DXX) include(FetchContent) FetchContent_Declare(libredxx GIT_REPOSITORY https://github.com/Zeranoe/libredxx.git - GIT_TAG e1fe2bd6ba6079b17037379d78f3f18024b389d7 + GIT_TAG 7ac4b524afd7805daebbeb79b0a833fae62953c9 ) set(LIBREDXX_DISABLE_INSTALL ON) FetchContent_MakeAvailable(libredxx) diff --git a/platform/dxx.cpp b/platform/dxx.cpp index eec94c9..55b3e8d 100644 --- a/platform/dxx.cpp +++ b/platform/dxx.cpp @@ -156,7 +156,7 @@ void DXX::read() { while(!isDisconnected() && !isClosing()) { size_t received = buffer.size(); - const auto status = libredxx_read(device, buffer.data(), &received); + const auto status = libredxx_read(device, buffer.data(), &received, LIBREDXX_ENDPOINT_A); if(isDisconnected() || isClosing()) { return; } @@ -186,7 +186,7 @@ void DXX::write() { for(size_t totalWritten = 0; totalWritten < writeOp.bytes.size();) { size_t size = writeOp.bytes.size() - totalWritten; - const auto status = libredxx_write(device, &writeOp.bytes[totalWritten], &size); + const auto status = libredxx_write(device, &writeOp.bytes[totalWritten], &size, LIBREDXX_ENDPOINT_A); if(isDisconnected() || isClosing()) { return; }