Merge branch 'bugfix/fix_resource_release_failure' into 'master'

Bugfix/fix resource release failure

See merge request idf/esp-modbus!21
This commit is contained in:
Alex Lisitsyn
2022-10-27 15:48:20 +08:00
2 changed files with 7 additions and 4 deletions

View File

@ -187,13 +187,16 @@ BOOL xMBMasterRunResTake( LONG lTimeOut )
/**
* This function is release Modbus Master running resource.
* Note:The resource is define by Operating System.If you not use OS this function can be empty.
* Note:The resource is define by Operating System. If you not use OS this function can be empty.
*/
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: