From e94abb9414c75d4866047c545670f9f21b3de821 Mon Sep 17 00:00:00 2001 From: 1624952103 Date: Tue, 17 Mar 2026 15:58:08 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=964570=20chipID=E7=AE=A1?= =?utf8?q?=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/zhihui/drivers/charge/hp4570/hp4570.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/sdk/zhihui/drivers/charge/hp4570/hp4570.c b/code/sdk/zhihui/drivers/charge/hp4570/hp4570.c index 1efa5fdc9..19e6fafc5 100644 --- a/code/sdk/zhihui/drivers/charge/hp4570/hp4570.c +++ b/code/sdk/zhihui/drivers/charge/hp4570/hp4570.c @@ -264,9 +264,12 @@ bool hp4570n_identify(uint8_t chip_ver){ return FAIL; } + // bool is_valid_combination = + // ((pid_value[1] == 0x00) && (chip_ver_value == 0x02)) || + // ((pid_value[1] == 0x03) && (chip_ver_value == 0x00)); + bool is_valid_combination = - ((pid_value[1] == 0x00) && (chip_ver_value == 0x02)) || - ((pid_value[1] == 0x03) && (chip_ver_value == 0x00)); + ((pid_value[1] == 0x00)|| (pid_value[1] == 0x03)); if (!is_valid_combination) { return FAIL; -- 2.17.1