Datasheet

5 Firmware API
This section covers the API routines available in this distribution. These descriptions cover more of the interface of these
functions. For example usages and more details about how to use these functions in conjunction with each other and in your
system, please refer to the Using the Library ( see page 13) section of the document.
5.1 API Functions
Functions
Name Description
AndroidAppIsReadComplete
( see page 22)
Check to see if the last read to the Android device was completed
AndroidAppIsWriteComplete
( see page 23)
Check to see if the last write to the Android device was completed
AndroidAppRead ( see
page 24)
Attempts to read information from the specified Android device
AndroidAppStart ( see page
25)
Sets the accessory information and initializes the client driver information after
the initial power cycles.
AndroidAppWrite ( see
page 26)
Sends data to the Android device specified by the passed in handle.
AndroidTasks ( see page
27)
Tasks function that keeps the Android client driver moving
AndroidAppHIDRegister (
see page 27)
Registers a HID report with the Android device
AndroidAppHIDSendEvent (
see page 28)
Sends a HID report to the associated Android device
5.1.1 AndroidAppIsReadComplete Function
Check to see if the last read to the Android device was completed
File
usb_host_android.h
C
BOOL AndroidAppIsReadComplete(
void* handle,
BYTE* errorCode,
DWORD* size
);
Description
Check to see if the last read to the Android device was completed. If complete, returns the amount of data that was sent and
the corresponding error code for the transmission.
Remarks
Possible values for errorCode are:
USB_SUCCESS - Transfer successful
Microchip's Accessory Framework for Android(tm) 22
22
5