Feat: add support for GU605C* models

This commit is contained in:
Denis Benato
2025-12-13 13:45:55 +01:00
parent ea32ad6e0a
commit 5aba2854b0
2 changed files with 9 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ pub enum SlashType {
GA403W, GA403W,
GA605, GA605,
GU605, GU605,
GU605C,
#[default] #[default]
Unsupported, Unsupported,
} }
@@ -27,6 +28,7 @@ impl SlashType {
SlashType::GA403 => PROD_ID1, SlashType::GA403 => PROD_ID1,
SlashType::GA605 => PROD_ID2, SlashType::GA605 => PROD_ID2,
SlashType::GU605 => PROD_ID1, SlashType::GU605 => PROD_ID1,
SlashType::GU605C => PROD_ID2,
SlashType::Unsupported => 0, SlashType::Unsupported => 0,
} }
} }
@@ -37,6 +39,7 @@ impl SlashType {
SlashType::GA403 => PROD_ID1_STR, SlashType::GA403 => PROD_ID1_STR,
SlashType::GA605 => PROD_ID2_STR, SlashType::GA605 => PROD_ID2_STR,
SlashType::GU605 => PROD_ID1_STR, SlashType::GU605 => PROD_ID1_STR,
SlashType::GU605C => PROD_ID2_STR,
SlashType::Unsupported => "", SlashType::Unsupported => "",
} }
} }
@@ -49,6 +52,8 @@ impl SlashType {
SlashType::GA403 SlashType::GA403
} else if board_name.contains("GA605") { } else if board_name.contains("GA605") {
SlashType::GA605 SlashType::GA605
} else if board_name.contains("GU605C") {
SlashType::GU605C
} else if board_name.contains("GU605") { } else if board_name.contains("GU605") {
SlashType::GU605 SlashType::GU605
} else { } else {
@@ -65,6 +70,7 @@ impl FromStr for SlashType {
"GA403W" => Self::GA403W, "GA403W" => Self::GA403W,
"GA403" => Self::GA403, "GA403" => Self::GA403,
"GA605" => Self::GA605, "GA605" => Self::GA605,
"GU605C" => Self::GU605C,
"GU605" => Self::GU605, "GU605" => Self::GU605,
_ => Self::Unsupported, _ => Self::Unsupported,
}) })

View File

@@ -44,6 +44,8 @@ pub fn get_slash_type() -> SlashType {
SlashType::GA403 SlashType::GA403
} else if board_name.contains("GA605") { } else if board_name.contains("GA605") {
SlashType::GA605 SlashType::GA605
} else if board_name.contains("GU605C") {
SlashType::GU605C
} else if board_name.contains("GU605") { } else if board_name.contains("GU605") {
SlashType::GU605 SlashType::GU605
} else { } else {
@@ -57,6 +59,7 @@ pub const fn report_id(slash_type: SlashType) -> u8 {
SlashType::GA403 => REPORT_ID_193B, SlashType::GA403 => REPORT_ID_193B,
SlashType::GA605 => REPORT_ID_19B6, SlashType::GA605 => REPORT_ID_19B6,
SlashType::GU605 => REPORT_ID_193B, SlashType::GU605 => REPORT_ID_193B,
SlashType::GU605C => REPORT_ID_19B6,
SlashType::Unsupported => REPORT_ID_19B6, SlashType::Unsupported => REPORT_ID_19B6,
} }
} }