refactor(otg): 简化运行时与设置逻辑

This commit is contained in:
mofeng-git
2026-03-28 21:09:10 +08:00
parent 4784cb75e4
commit f4283f45a4
27 changed files with 1427 additions and 1249 deletions

View File

@@ -5,6 +5,8 @@
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use crate::hid::LedState;
// ============================================================================
// Device Info Structures (for system.device_info event)
// ============================================================================
@@ -45,6 +47,10 @@ pub struct HidDeviceInfo {
pub online: bool,
/// Whether absolute mouse positioning is supported
pub supports_absolute_mouse: bool,
/// Whether keyboard LED/status feedback is enabled.
pub keyboard_leds_enabled: bool,
/// Last known keyboard LED state.
pub led_state: LedState,
/// Device path (e.g., serial port for CH9329)
pub device: Option<String>,
/// Error message if any, None if OK