From f31080d8baf397660760e91596a4f8cad73a24fd Mon Sep 17 00:00:00 2001 From: Li Junru Date: Tue, 30 Apr 2024 15:16:20 +0800 Subject: [PATCH] fix(dcd_dwc2): error assest for endpoint close --- src/portable/synopsys/dwc2/dcd_dwc2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c index 020db70bf6..5bccde7d25 100644 --- a/src/portable/synopsys/dwc2/dcd_dwc2.c +++ b/src/portable/synopsys/dwc2/dcd_dwc2.c @@ -674,10 +674,10 @@ static bool dcd_edpt_counter_available(uint8_t rhport, uint8_t dir) static bool dcd_edpt_counter_release(uint8_t rhport, uint8_t dir) { if (dir) { - TU_ASSERT(dwc2_ep_counters[rhport].active_in == 0); // Check if number of opened EPs is not zero + TU_ASSERT(dwc2_ep_counters[rhport].active_in != 0); // Check if number of opened EPs is not zero dwc2_ep_counters[rhport].active_in--; // Decrease endpoint counter } else { - TU_ASSERT(dwc2_ep_counters[rhport].active_out == 0); + TU_ASSERT(dwc2_ep_counters[rhport].active_out != 0); dwc2_ep_counters[rhport].active_out--; } return true;