#include <AndroidAccessory.h>
Public Member Functions | |
AndroidAccessory (const char *manufacturer, const char *model, const char *description, const char *version, const char *uri, const char *serial) | |
bool | isConnected (void) |
void | powerOn (void) |
int | read (void *buff, int len, unsigned int nakLimit=USB_NAK_LIMIT) |
int | write (void *buff, int len) |
Private Member Functions | |
bool | configureAndroid (void) |
bool | findEndpoints (byte addr, EP_RECORD *inEp, EP_RECORD *outEp) |
int | getProtocol (byte addr) |
bool | isAccessoryDevice (USB_DEVICE_DESCRIPTOR *desc) |
void | sendString (byte addr, int index, const char *str) |
bool | switchDevice (byte addr) |
Private Attributes | |
bool | connected |
uint8_t | descBuff [256] |
const char * | description |
EP_RECORD | epRecord [8] |
uint8_t | in |
const char * | manufacturer |
MAX3421E | max |
const char * | model |
uint8_t | out |
const char * | serial |
const char * | uri |
USB | usb |
const char * | version |
Definition at line 24 of file AndroidAccessory.h.
AndroidAccessory::AndroidAccessory | ( | const char * | manufacturer, |
const char * | model, | ||
const char * | description, | ||
const char * | version, | ||
const char * | uri, | ||
const char * | serial | ||
) |
Definition at line 38 of file AndroidAccessory.cpp.
bool AndroidAccessory::configureAndroid | ( | void | ) | [private] |
Definition at line 192 of file AndroidAccessory.cpp.
bool AndroidAccessory::findEndpoints | ( | byte | addr, |
EP_RECORD * | inEp, | ||
EP_RECORD * | outEp | ||
) | [private] |
Definition at line 115 of file AndroidAccessory.cpp.
int AndroidAccessory::getProtocol | ( | byte | addr | ) | [private] |
Definition at line 60 of file AndroidAccessory.cpp.
bool AndroidAccessory::isAccessoryDevice | ( | USB_DEVICE_DESCRIPTOR * | desc | ) | [inline, private] |
Definition at line 43 of file AndroidAccessory.h.
bool AndroidAccessory::isConnected | ( | void | ) |
Definition at line 226 of file AndroidAccessory.cpp.
void AndroidAccessory::powerOn | ( | void | ) |
Definition at line 54 of file AndroidAccessory.cpp.
int AndroidAccessory::read | ( | void * | buff, |
int | len, | ||
unsigned int | nakLimit = USB_NAK_LIMIT |
||
) |
Definition at line 263 of file AndroidAccessory.cpp.
void AndroidAccessory::sendString | ( | byte | addr, |
int | index, | ||
const char * | str | ||
) | [private] |
Definition at line 71 of file AndroidAccessory.cpp.
bool AndroidAccessory::switchDevice | ( | byte | addr | ) | [private] |
Definition at line 82 of file AndroidAccessory.cpp.
int AndroidAccessory::write | ( | void * | buff, |
int | len | ||
) |
Definition at line 268 of file AndroidAccessory.cpp.
bool AndroidAccessory::connected [private] |
Definition at line 35 of file AndroidAccessory.h.
uint8_t AndroidAccessory::descBuff[256] [private] |
Definition at line 41 of file AndroidAccessory.h.
const char* AndroidAccessory::description [private] |
Definition at line 28 of file AndroidAccessory.h.
EP_RECORD AndroidAccessory::epRecord[8] [private] |
Definition at line 39 of file AndroidAccessory.h.
uint8_t AndroidAccessory::in [private] |
Definition at line 36 of file AndroidAccessory.h.
const char* AndroidAccessory::manufacturer [private] |
Definition at line 26 of file AndroidAccessory.h.
MAX3421E AndroidAccessory::max [private] |
Definition at line 33 of file AndroidAccessory.h.
const char* AndroidAccessory::model [private] |
Definition at line 27 of file AndroidAccessory.h.
uint8_t AndroidAccessory::out [private] |
Definition at line 37 of file AndroidAccessory.h.
const char* AndroidAccessory::serial [private] |
Definition at line 31 of file AndroidAccessory.h.
const char* AndroidAccessory::uri [private] |
Definition at line 30 of file AndroidAccessory.h.
USB AndroidAccessory::usb [private] |
Definition at line 34 of file AndroidAccessory.h.
const char* AndroidAccessory::version [private] |
Definition at line 29 of file AndroidAccessory.h.