Home |
Function RTUSetPipeMsgQ |
Function RTUSetPipeMsgQRTUSetPipeMsgQ enables Message notification for a pipe: typedef struct { RTUPipeHandle Pipe; int ErrorCode; void * Data; int Len; } RTUSBMessage; void RTUSetPipeMsgQ(RTUPipeHandle Pipe, RTUQHandle Q); ParametersPipeHandle to the pipe to place in Message notification mode. QueueMessage queue to receive a message when a transaction completes on the given pipe. Such queues can be created using RTUCreateMsgQ. This function must be called after a pipe is created with RTUOpenPipe and before it has been used in RTUStartIO. RTUIOWait and RTUIOWaitTimed cannot be used on pipes in Message notification mode. Rather, the interrupt handler of the USB host controller driver will post a pointer to a RTUSBMessage structure to the given queue from where it can be retrieved by the client using RTUGetMsgQ and RTUGetMsgQTimed. The client is responsible for allocating and deallocating such queues and for freeing received notification messages using RTUFreeBuffer. A typical application for Message notification is the use of a single thread to process transactions on several pipes. All pipes can be configured to use the same message queue from which the single thread retrieves notification messages. Member RTUSBMessage.Pipe indicates on which pipe the transaction completed.
|