From 85c952eace2006664f6e70417346c4d89d690d0c Mon Sep 17 00:00:00 2001 From: Andelf Date: Sat, 23 Nov 2024 00:36:08 +0800 Subject: [PATCH] fix(ch585): ch585 reports itself as ch59x --- src/chips.rs | 2 +- src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chips.rs b/src/chips.rs index ef4a1f5..5a317bc 100644 --- a/src/chips.rs +++ b/src/chips.rs @@ -11,8 +11,8 @@ pub fn chip_id_to_chip_name(chip_id: u32) -> Option<&'static str> { 0x820_00000 => Some("CH582"), 0x830_00000 => Some("CH583"), 0x840_00000 => Some("CH584"), - 0x850_00000 => Some("CH585"), 0x920_00000 => Some("CH592"), + 0x930_00000 => Some("CH585"), 0x003_00000 => match chip_id & 0xFFFFFF0F { 0x003_00500 => Some("CH32V003F4P6"), 0x003_10500 => Some("CH32V003F4U6"), diff --git a/src/lib.rs b/src/lib.rs index 64d628f..31b5ed2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,6 +39,7 @@ pub enum RiscvChip { /// The only reference I can find is . CH8571 = 0x0A, // 10, /// CH59x RISC-V4C BLE 5.4 series, fallback as CH58X + /// FIXME: CH585 also reported as this CH59X = 0x0B, // 11 /// CH643 RISC-V4C series, RGB Display Driver MCU CH643 = 0x0C, // 12