mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-06-14 19:51:58 +08:00
fix: 补齐 ATX 控制器缺失接口并完成全项目 clippy -D warnings 修复
This commit is contained in:
@@ -219,8 +219,10 @@ impl From<u8> for LedStatus {
|
||||
/// CH9329 work mode
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[repr(u8)]
|
||||
#[derive(Default)]
|
||||
pub enum WorkMode {
|
||||
/// Mode 0: Standard USB Keyboard + Mouse (default)
|
||||
#[default]
|
||||
KeyboardMouse = 0x00,
|
||||
/// Mode 1: Standard USB Keyboard only
|
||||
KeyboardOnly = 0x01,
|
||||
@@ -230,17 +232,14 @@ pub enum WorkMode {
|
||||
CustomHid = 0x03,
|
||||
}
|
||||
|
||||
impl Default for WorkMode {
|
||||
fn default() -> Self {
|
||||
Self::KeyboardMouse
|
||||
}
|
||||
}
|
||||
|
||||
/// CH9329 serial communication mode
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[repr(u8)]
|
||||
#[derive(Default)]
|
||||
pub enum SerialMode {
|
||||
/// Mode 0: Protocol transmission mode (default)
|
||||
#[default]
|
||||
Protocol = 0x00,
|
||||
/// Mode 1: ASCII mode
|
||||
Ascii = 0x01,
|
||||
@@ -248,11 +247,6 @@ pub enum SerialMode {
|
||||
Transparent = 0x02,
|
||||
}
|
||||
|
||||
impl Default for SerialMode {
|
||||
fn default() -> Self {
|
||||
Self::Protocol
|
||||
}
|
||||
}
|
||||
|
||||
/// CH9329 configuration parameters
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user