Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Polling BulkIn endpoint



The hardware will poll the bulk-in pipe when you issue a read from the pipe. You just need to make a device request using the default (control) pipe (or other control pipe if that is what is required). When reading from your bulk-pipe, you should request a multiple of maxPacketSize bytes, this way, you will get everything the device sends without losing any bytes.

Normally, your completion routine would just fire off another request using the same paramblock (I would just have one or two requests queued all the time). You can request more bytes than the device will send, and your read will be terminated when a short packet is received from the device.

David Ferguson
USB Software Team
Apple Computer, Inc.



At 12:13 PM +0530 3/24/02, Prashanth Shenoy wrote:
Hi all

I want to poll BulkIn endpoint. Whenever data comes I have to read it. After
initializing the device I start polling. When first character comes to the
bulkin endpoint, it goes to the completion routine. if I again start polling
it from inside the completion routine, it crashes. It goes to MacsBug.

After coming to the completion routine can I reuse the same Parameterblock ?

Is there any other issue that I should take into account...?

If I do not poll from inside the completion routine it works fine for one
character.

According to device specification, before each bulkin request I should first
issue a command to the control pipe.

Can anybody please help me in solving this problem...

TIA
Prashanth


-------------------------------------------------------------- Robosoft Technologies, Mangalore, India _______________________________________________ usb mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb Do not post admin requests to the list. They will be ignored.


--
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.

References: 
 >Polling BulkIn endpoint (From: Prashanth Shenoy <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.