Diff: UsbHost.h
- Revision:
- 1:4461071ed964
- Parent:
- 0:63d45df56584
--- a/UsbHost.h Sun Jul 08 20:18:58 2012 +0000 +++ b/UsbHost.h Wed Sep 19 16:39:23 2012 +0000 @@ -48,6 +48,7 @@ struct HostController; struct Device; struct DeviceDescriptor; +struct TransferCallback; struct Host : HostControllerMessages { @@ -111,7 +112,7 @@ * @param length For bulk writes, the number of bytes from data to be sent. for bulk reads, the maximum number of bytes to receive into the data buffer. * @param callbackID If set then when the transfer is complete the callback will be called with this ID and the information about the transfer. */ - int BulkTransfer(int device,uint8_t endpoint,const uint8_t* data,int length,int callbackID = 0); + int BulkTransfer(int device,uint8_t endpoint,const uint8_t* data,int length,TransferCallback* callback = NULL); /** * When a usb device is connected this is called. @@ -122,12 +123,6 @@ * Called when a device disconnects from the system. */ virtual void onDisconnected(int deviceID) = 0; - - /** - * Called when a transfer has been completed that had a callback ID set. - * Any other transfers without a callback ID will not trigger this. - */ - virtual void onReceive(int deviceID,int callbackID, int endpoint, int status, uint8_t* data, int length) = 0; protected: