Post

Replies

Boosts

Views

Activity

Subclassing Serial Driver Kit (IOUserSerial)
I have a custom serial Device, I have made a driver using USB Serial Driver Kit by sub classing IOUserUSBSerail. Driver Works fine. However I don't have any Control over Read and Write Operations since its taken care by the USBSerialDriver Kit. To overcome this problem I am trying to use Serial driver kit by subclassing the driver from IOUserSerial class. https://developer.apple.com/documentation/serialdriverkit/iouserserial As per the link above , we need to overload the function TxDataAvailable https://developer.apple.com/documentation/serialdriverkit/iouserserial/3433803-txdataavailable My overloaded function is getting called whenever data is available from the application. (I got hold of the application buffer by overloading the ConnectQueues method) For sending the data to USB I also need the size of the data. From the Connect Queue method I have the IOBufferMemoryDescriptor. The getLength method of IOMemoryDescriptor gives me the length of the full buffer which was allocated. It does not give me the actual data length. How can I get the data length in this case
2
0
1.8k
Mar ’21