Initiates a transfer via the imp005’s USB
Device (from impOS™ 34)
Only available on the imp005
The address of the device
The address of the endpoint
The type of the endpoint
The data to be transferred
This method initiates a USB transfer. The USB event callback specified in usb.configure() will be called when the transfer completes.
The endpoint must be opened before any transfers can be made (see usb.openendpoint()). The endpoint value is an 8-bit integer formed from the following bit fields:
|D0-3||The endpoint number|
|D7||The direction of transfer: 0 is out, 1 is in|
The value of the endpointType parameter is provided in the endpoint descriptor generated when the device connects, an event which triggers a call to the callback function registered with usb.configure(). It will one of the following values:
||Isochronous endpoint not supported|
||Interrupt In endpoint (from impOS™ 36)|
At the moment, interrupt out transfers are not supported.
For an out-bound transfer the blob passed into the data parameter should contain the data to be written. For an incoming transfer, the blob should be pre-sized to the number of bytes that will be read. The actual bytes read are written into the eventdetails table in the USB event callback (usb.configure()).