From 575ced73fa917e2dda4a2eb59b7d06ea4d11c16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=91=E5=B9=B4=E8=80=81=E7=8E=8B?= <710454786@qq.com> Date: Mon, 14 Jul 2025 10:12:53 +0800 Subject: [PATCH] fix port event bug --- modbus/mb_ports/common/port_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modbus/mb_ports/common/port_event.c b/modbus/mb_ports/common/port_event.c index 3c0f11ae..045ee640 100644 --- a/modbus/mb_ports/common/port_event.c +++ b/modbus/mb_ports/common/port_event.c @@ -178,6 +178,7 @@ mb_err_enum_t mb_port_event_wait_req_finish(mb_port_base_t *inst) "incorrect object handle."); mb_err_enum_t err_status = MB_ENOERR; mb_event_enum_t rcv_event; + xEventGroupClearBits(inst->event_obj->event_group_hdl, MB_EVENT_REQ_MASK); EventBits_t bits = xEventGroupWaitBits(inst->event_obj->event_group_hdl, // The event group being tested. MB_EVENT_REQ_MASK, // The bits within the event group to wait for. pdTRUE, // Masked bits should be cleared before returning.