mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-09-12 18:44:25 +08:00
feat: 增加 OTG HID 远程唤醒和 OTG MSD 设备名称配置
- 在补丁内核上启用 HID 写入唤醒及 USB 远程唤醒描述符 - 支持全局配置 Flash 和 CD-ROM INQUIRY 字符串 - 兼容普通内核的通用 INQUIRY 属性 - 调整 OTG 功能布局并更新大容量 DVD 镜像提示
This commit is contained in:
@@ -3,6 +3,7 @@ use tracing::debug;
|
||||
|
||||
use super::configfs::{
|
||||
create_dir, create_symlink, remove_dir, remove_file, write_bytes, write_file,
|
||||
write_file_if_exists,
|
||||
};
|
||||
use super::function::GadgetFunction;
|
||||
use super::report_desc::{
|
||||
@@ -143,6 +144,10 @@ impl GadgetFunction for HidFunction {
|
||||
self.func_type.report_desc(self.keyboard_leds),
|
||||
)?;
|
||||
|
||||
// Supported by the PiKVM HID kernel patch. Older kernels simply do
|
||||
// not expose this ConfigFS attribute.
|
||||
let _ = write_file_if_exists(&func_path.join("wakeup_on_write"), "1")?;
|
||||
|
||||
debug!(
|
||||
"Created HID function: {} at {}",
|
||||
self.name(),
|
||||
|
||||
Reference in New Issue
Block a user