eMBClose() function
Release resources used by the protocol stack. This function disables the Modbus protocol stack and release all hardware resources. It must only be called when the protocol stack is disabled.
Return value
If the resources where released it return eMBErrorCode::MB_ENOERR. If the protocol stack is not in the disabled state it returns eMBErrorCode::MB_EILLSTATE.
Notes
Note all ports implement this function. A port which wants to get an callback must define the macro MB_PORT_HAS_CLOSE to 1.