From 06fa7fa342a6976a3745894b46babfa5fde841f7 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Sun, 4 Jan 2026 12:56:35 +0100 Subject: [PATCH] ftdipp: Add wrapper for ftdi_set_module_detach_mode() This wraps the ftdi_set_module_detach_mode() C function. The method allows setting the module detach mode behavior for the FTDI kernel driver. The new method follows the existing wrapper pattern. --- ftdipp/ftdi.cpp | 5 +++++ ftdipp/ftdi.hpp | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/ftdipp/ftdi.cpp b/ftdipp/ftdi.cpp index 2df1e6c..91eb384 100644 --- a/ftdipp/ftdi.cpp +++ b/ftdipp/ftdi.cpp @@ -200,6 +200,11 @@ int Context::set_interface(enum ftdi_interface interface) return ftdi_set_interface(d->ftdi, interface); } +int Context::set_module_detach_mode(enum ftdi_module_detach_mode mode) +{ + return ftdi_set_module_detach_mode(d->ftdi, mode); +} + void Context::set_usb_device(struct libusb_device_handle *dev) { ftdi_set_usbdev(d->ftdi, dev); diff --git a/ftdipp/ftdi.hpp b/ftdipp/ftdi.hpp index 3d07e77..327242f 100644 --- a/ftdipp/ftdi.hpp +++ b/ftdipp/ftdi.hpp @@ -88,6 +88,7 @@ public: int DEPRECATED(flush)(int mask = Input|Output); int tcflush(int mask = Input|Output); int set_interface(enum ftdi_interface interface); + int set_module_detach_mode(enum ftdi_module_detach_mode mode); void set_usb_device(struct libusb_device_handle *dev); /* Line manipulators */ -- 1.7.1