mirror of
https://github.com/espressif/esp-modbus.git
synced 2025-07-30 10:27:16 +02:00
Bugfix/fix resource release failure
This commit is contained in:
@ -187,13 +187,16 @@ BOOL xMBMasterRunResTake( LONG lTimeOut )
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is release Modbus Master running resource.
|
* 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 )
|
void vMBMasterRunResRelease( void )
|
||||||
{
|
{
|
||||||
EventBits_t uxBits = xEventGroupSetBits( xResourceMasterHdl, MB_EVENT_RESOURCE );
|
EventBits_t uxBits = xEventGroupSetBits( xResourceMasterHdl, MB_EVENT_RESOURCE );
|
||||||
MB_PORT_CHECK((uxBits == MB_EVENT_RESOURCE), ; , "Resource release failure.");
|
if (uxBits != MB_EVENT_RESOURCE) {
|
||||||
ESP_LOGD(MB_PORT_TAG,"%s: Release resource (%x).", __func__, uxBits);
|
// 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: "1.0.4"
|
version: "1.0.5"
|
||||||
description: ESP-MODBUS is the official Modbus library for Espressif SoCs.
|
description: ESP-MODBUS is the official Modbus library for Espressif SoCs.
|
||||||
url: https://github.com/espressif/esp-modbus
|
url: https://github.com/espressif/esp-modbus
|
||||||
dependencies:
|
dependencies:
|
||||||
|
Reference in New Issue
Block a user