Bugfix/fix resource release failure

This commit is contained in:
Alex Lisitsyn
2022-10-27 15:48:19 +08:00
parent 556d3ad512
commit fc8a50297d
2 changed files with 7 additions and 4 deletions

View File

@ -192,8 +192,11 @@ BOOL xMBMasterRunResTake( LONG lTimeOut )
void vMBMasterRunResRelease( void )
{
EventBits_t uxBits = xEventGroupSetBits( xResourceMasterHdl, MB_EVENT_RESOURCE );
MB_PORT_CHECK((uxBits == MB_EVENT_RESOURCE), ; , "Resource release failure.");
ESP_LOGD(MB_PORT_TAG,"%s: Release resource (%x).", __func__, uxBits);
if (uxBits != MB_EVENT_RESOURCE) {
// The returned resource mask may be = 0, if the task waiting for it is unblocked.
// This is not an error but expected behavior.
ESP_LOGD(MB_PORT_TAG,"%s: Release resource (%x) fail.", __func__, uxBits);
}
}
/**

View File

@ -1,4 +1,4 @@
version: "1.0.4"
version: "1.0.5"
description: ESP-MODBUS is the official Modbus library for Espressif SoCs.
url: https://github.com/espressif/esp-modbus
dependencies: