Home |
Function RTUSetPipeCallback |
Function RTUSetPipeCallbackRTUSetPipeCallback enables Callback notification for a pipe: typedef void (RTTAPI * RTUDataCallback)(RTUPipeHandle Pipe, int ErrorCode, void * Data, int DataLen); void RTUSetPipeCallback(RTUPipeHandle Pipe, RTUDataCallback Callback); ParametersPipeHandle to the pipe to place in Callback notification mode. CallbackFunction to call when a transaction on the given pipe completes. 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 Callback notification mode. Rather, the interrupt handler of the USB host controller driver will call the given callback when a transaction completes. Note that the callback runs in interrupt context and may not call any RTUSB-32 API function. Typically, the callback should do whatever real-time processing is required and/or send a signal to a thread.
|