我想我会警告其他人在Orthon的USAT驱动程序中遇到一个问题。在Hyrn(V1.09)动态USAT设备驱动程序中的“DrviUsARTAROPEN”函数很难实现,文档是误导的。如果我用DRVIIOION ITENTHY写这个函数,那是因为我只想把数据写入设备。然而,“DrviUsARTAROPEN”不检查“DVVIIOION ITENTHORY WORD”,并且配置了用于读取的设备,然后它积极地尝试接收数据,并可能产生停止执行的错误。我已经提交了一个案例,说明如果客户端只通过DRVIIOION ITENTHORY写入,设备将被调用。不能设置为接收,MHC不应该产生额外的冗余代码,这可能需要来自客户端的干预(只希望写入)。
以上来自于百度翻译
以下为原文
Just thought I'd warn others about a problem in H
ARMony's USART driver.
The 'DRV_USART_Open' func
tion in Harmony's (v1.09) dynamic USART device driver is poorly implemented and the documentation is misleading.
If I call that function with DRV_IO_INTENT_WRITE it's because I only want to WRITE data to the device. However, 'DRV_USART_Open' doesn't check for 'DRV_IO_INTENT_WRITE' and configures the device for reading anyway, then it actively tries receiving data and can generate errors which stop execution.
I've submitted a case suggesting that if the client passes in only DRV_IO_INTENT_WRITE, the device shouldn't be setup up to receive and the MHC shouldn't generate extra redundant code which potentially requires intervention from the client (which is only wanting to write).
0