Datasheet

Parameters
Parameters Description
ANDROID_ACCESSORY_INFORMATION
*info
the information about the Android accessory
Function
void AndroidAppStart( ANDROID_ACCESSORY_INFORMATION ( see page 34) *info)
5.1.5 AndroidAppWrite Function
Sends data to the Android device specified by the passed in handle.
File
usb_host_android.h
C
BYTE AndroidAppWrite(
void* handle,
BYTE* data,
DWORD size
);
Description
Sends data to the Android device specified by the passed in handle.
Remarks
None
Preconditions
Transfer is not already in progress. USB module is initialized and Android device has attached.
Parameters
Parameters Description
void* handle the handle passed to the device in the EVENT_ANDROID_ATTACH ( see
page 33) event
BYTE* data the data to send to the Android device
DWORD size the size of the data that needs to be sent
Return Values
Return Values Description
USB_SUCCESS Write started successfully.
USB_UNKNOWN_DEVICE Device with the specified address not found.
USB_INVALID_STATE We are not in a normal running state.
USB_ENDPOINT_ILLEGAL_TYPE Must use USBHostControlWrite to write to a control endpoint.
USB_ENDPOINT_ILLEGAL_DIRECTION Must write to an OUT endpoint.
USB_ENDPOINT_STALLED Endpoint is stalled. Must be cleared by the application.
USB_ENDPOINT_ERROR Endpoint has too many errors. Must be cleared by the application.
USB_ENDPOINT_BUSY A Write is already in progress.
USB_ENDPOINT_NOT_FOUND Invalid endpoint.
Function
BYTE AndroidAppWrite(void* handle, BYTE* data, DWORD size)
Microchip's Accessory Framework for Android(tm) 26
26
5