RT-Thread-packages / freemodbus

A Modbus ASCII/RTU and TCP implementation
Other
227 stars 101 forks source link

xMBMasterPortEventPost( EV_MASTER_FRAME_RECEIVED ); -> eMBMasterEnable() #29

Open ChicYe opened 2 months ago

ChicYe commented 2 months ago

这个是怎么出现的问题,如果确实有问题,那应该是代码框架的问题吧,目前在Enable函数加了发送事件上电第一次运行会产生一个接收错误。应该要怎么改改呢

Fixed a potential issue that caused the event set (xMasterOsEvent) to be fetched before it was sent

eMBErrorCode eMBMasterEnable( void ) { xMBMasterPortEventPost( EV_MASTER_FRAME_RECEIVED ); return eStatus; }