30 connectToHIDDevice(false),
31 pairWithHIDDevice(false),
50 uint8_t buf[constBufSize];
99 Notify(
PSTR(
"\r\nOut of address space"), 0x80);
116 #ifdef DEBUG_USB_HOST 117 Notify(
PSTR(
"\r\nPlease create a hub instance in your code: \"USBHub Hub1(&Usb);\""), 0x80);
125 #ifdef DEBUG_USB_HOST 134 uint8_t
BTD::Init(uint8_t parent, uint8_t port,
bool lowspeed) {
146 #ifdef DEBUG_USB_HOST 156 #ifdef DEBUG_USB_HOST 158 D_PrintHex<uint8_t > (rcode, 0x80);
165 D_PrintHex<uint8_t > (
bAddress, 0x80);
172 #ifdef DEBUG_USB_HOST 182 goto FailSetDevTblEntry;
188 goto FailSetConfDescr;
190 #ifdef DEBUG_USB_HOST 193 Notify(
PSTR(
"\r\nDualshock 3 Controller Connected"), 0x80);
195 Notify(
PSTR(
"\r\nNavigation Controller Connected"), 0x80);
197 Notify(
PSTR(
"\r\nMotion Controller Connected"), 0x80);
201 #ifdef DEBUG_USB_HOST 202 Notify(
PSTR(
"\r\nPlease plug in the dongle before trying to pair with the PS3 Controller\r\nor set the Bluetooth address in the constructor of the PS3BT class"), 0x80);
209 #ifdef DEBUG_USB_HOST 210 Notify(
PSTR(
"\r\nBluetooth Address was set to: "), 0x80);
211 for(int8_t i = 5; i > 0; i--) {
212 D_PrintHex<uint8_t > (
my_bdaddr[i], 0x80);
215 D_PrintHex<uint8_t > (
my_bdaddr[0], 0x80);
227 for(uint8_t i = 0; i < num_of_conf; i++) {
236 goto FailGetConfDescr;
242 goto FailUnknownDevice;
247 goto FailSetDevTblEntry;
252 goto FailSetConfDescr;
254 hci_num_reset_loops = 100;
260 #ifdef DEBUG_USB_HOST 261 Notify(
PSTR(
"\r\nBluetooth Dongle Initialized"), 0x80);
268 #ifdef DEBUG_USB_HOST 274 #ifdef DEBUG_USB_HOST 280 #ifdef DEBUG_USB_HOST 286 #ifdef DEBUG_USB_HOST 292 #ifdef DEBUG_USB_HOST 293 Notify(
PSTR(
"\r\nBTD Init Failed, error code: "), 0x80);
300 void BTD::Initialize() {
311 btService[i]->
Reset();
354 if(pollInterval < pep->bInterval)
361 Notify(
PSTR(
"\r\nEndpoint descriptor:"), 0x80);
363 D_PrintHex<uint8_t > (ep_ptr->
bLength, 0x80);
373 D_PrintHex<uint8_t > (ep_ptr->
bInterval, 0x80);
402 void BTD::HCI_event_task() {
406 if(!rcode || rcode ==
hrNAK) {
411 if((hcibuf[3] == 0x01) && (hcibuf[4] == 0x10)) {
414 }
else if((hcibuf[3] == 0x09) && (hcibuf[4] == 0x10)) {
415 for(uint8_t i = 0; i < 6; i++)
424 #ifdef DEBUG_USB_HOST 425 Notify(
PSTR(
"\r\nHCI Command Failed: "), 0x80);
426 D_PrintHex<uint8_t > (hcibuf[2], 0x80);
434 #ifdef DEBUG_USB_HOST 436 Notify(
PSTR(
"\r\nCouldn't find Wiimote"), 0x80);
438 Notify(
PSTR(
"\r\nCouldn't find HID device"), 0x80);
452 Notify(
PSTR(
"\r\nNumber of responses: "), 0x80);
455 for(uint8_t i = 0; i < hcibuf[2]; i++) {
456 uint8_t offset = 8 * hcibuf[2] + 3 * i;
458 for(uint8_t j = 0; j < 3; j++)
459 classOfDevice[j] = hcibuf[j + 4 + offset];
463 D_PrintHex<uint8_t > (classOfDevice[2], 0x80);
465 D_PrintHex<uint8_t > (classOfDevice[1], 0x80);
467 D_PrintHex<uint8_t > (classOfDevice[0], 0x80);
470 if(
pairWithWii && classOfDevice[2] == 0x00 && (classOfDevice[1] & 0x05) && (classOfDevice[0] & 0x0C)) {
471 checkRemoteName =
true;
473 for(uint8_t j = 0; j < 6; j++)
478 }
else if(
pairWithHIDDevice && (classOfDevice[1] & 0x05) && (classOfDevice[0] & 0xC8)) {
479 #ifdef DEBUG_USB_HOST 480 if(classOfDevice[0] & 0x80)
482 if(classOfDevice[0] & 0x40)
484 if(classOfDevice[0] & 0x08)
488 for(uint8_t j = 0; j < 6; j++)
502 Notify(
PSTR(
"\r\nConnection established"), 0x80);
504 hci_handle = hcibuf[3] | ((hcibuf[4] & 0x0F) << 8);
508 #ifdef DEBUG_USB_HOST 509 Notify(
PSTR(
"\r\nConnection Failed: "), 0x80);
510 D_PrintHex<uint8_t > (hcibuf[2], 0x80);
524 for(uint8_t i = 0; i < min(
sizeof (
remote_name),
sizeof (hcibuf) - 9); i++) {
535 for(uint8_t i = 0; i < 6; i++)
538 for(uint8_t i = 0; i < 3; i++)
539 classOfDevice[i] = hcibuf[i + 8];
541 if((classOfDevice[1] & 0x05) && (classOfDevice[0] & 0xC8)) {
542 #ifdef DEBUG_USB_HOST 543 if(classOfDevice[0] & 0x80)
544 Notify(
PSTR(
"\r\nMouse is connecting"), 0x80);
545 if(classOfDevice[0] & 0x40)
546 Notify(
PSTR(
"\r\nKeyboard is connecting"), 0x80);
547 if(classOfDevice[0] & 0x08)
548 Notify(
PSTR(
"\r\nGamepad is connecting"), 0x80);
555 D_PrintHex<uint8_t > (classOfDevice[2], 0x80);
557 D_PrintHex<uint8_t > (classOfDevice[1], 0x80);
559 D_PrintHex<uint8_t > (classOfDevice[0], 0x80);
566 #ifdef DEBUG_USB_HOST 567 Notify(
PSTR(
"\r\nPairing with Wiimote"), 0x80);
570 }
else if(
btdPin != NULL) {
571 #ifdef DEBUG_USB_HOST 572 Notify(
PSTR(
"\r\nBluetooth pin is set too: "), 0x80);
577 #ifdef DEBUG_USB_HOST 585 #ifdef DEBUG_USB_HOST 586 Notify(
PSTR(
"\r\nReceived Key Request"), 0x80);
594 #ifdef DEBUG_USB_HOST 595 Notify(
PSTR(
"\r\nPairing successful with Wiimote"), 0x80);
599 #ifdef DEBUG_USB_HOST 600 Notify(
PSTR(
"\r\nPairing successful with HID device"), 0x80);
605 #ifdef DEBUG_USB_HOST 607 D_PrintHex<uint8_t > (hcibuf[2], 0x80);
628 if(hcibuf[0] != 0x00) {
629 Notify(
PSTR(
"\r\nUnmanaged HCI Event: "), 0x80);
630 D_PrintHex<uint8_t > (hcibuf[0], 0x80);
639 D_PrintHex<uint8_t > (rcode, 0x80);
645 void BTD::HCI_task() {
649 if(hci_counter > hci_num_reset_loops) {
660 #ifdef DEBUG_USB_HOST 665 }
else if(hci_counter > hci_num_reset_loops) {
666 hci_num_reset_loops *= 10;
667 if(hci_num_reset_loops > 2000)
668 hci_num_reset_loops = 2000;
669 #ifdef DEBUG_USB_HOST 670 Notify(
PSTR(
"\r\nNo response to HCI Reset"), 0x80);
679 #ifdef DEBUG_USB_HOST 680 Notify(
PSTR(
"\r\nWrite class of device"), 0x80);
689 #ifdef DEBUG_USB_HOST 690 Notify(
PSTR(
"\r\nLocal Bluetooth Address: "), 0x80);
691 for(int8_t i = 5; i > 0; i--) {
692 D_PrintHex<uint8_t > (
my_bdaddr[i], 0x80);
695 D_PrintHex<uint8_t > (
my_bdaddr[0], 0x80);
714 #ifdef DEBUG_USB_HOST 715 Notify(
PSTR(
"\r\nThe name is set to: "), 0x80);
724 #ifdef DEBUG_USB_HOST 726 Notify(
PSTR(
"\r\nStarting inquiry\r\nPress 1 & 2 on the Wiimote\r\nOr press the SYNC button if you are using a Wii U Pro Controller or a Wii Balance Board"), 0x80);
728 Notify(
PSTR(
"\r\nPlease enable discovery of your device"), 0x80);
739 #ifdef DEBUG_USB_HOST 745 Notify(
PSTR(
"\r\nNow just create the instance like so:"), 0x80);
751 Notify(
PSTR(
"\r\nAnd then press any button on the "), 0x80);
757 if(checkRemoteName) {
767 #ifdef DEBUG_USB_HOST 769 Notify(
PSTR(
"\r\nConnecting to Wiimote"), 0x80);
771 Notify(
PSTR(
"\r\nConnecting to HID device"), 0x80);
773 checkRemoteName =
false;
782 #ifdef DEBUG_USB_HOST 784 Notify(
PSTR(
"\r\nConnected to Wiimote"), 0x80);
786 Notify(
PSTR(
"\r\nConnected to HID device"), 0x80);
791 #ifdef DEBUG_USB_HOST 792 Notify(
PSTR(
"\r\nTrying to connect one more time..."), 0x80);
801 #ifdef DEBUG_USB_HOST 802 Notify(
PSTR(
"\r\nWait For Incoming Connection Request"), 0x80);
813 #ifdef DEBUG_USB_HOST 814 Notify(
PSTR(
"\r\nIncoming Connection Request"), 0x80);
824 #ifdef DEBUG_USB_HOST 829 if(strncmp((
const char*)
remote_name,
"Nintendo", 8) == 0) {
833 pairWiiUsingSync =
false;
834 #ifdef DEBUG_USB_HOST 835 Notify(
PSTR(
"\r\nWiimote is connecting"), 0x80);
837 if(strncmp((
const char*)
remote_name,
"Nintendo RVL-CNT-01-TR", 22) == 0) {
838 #ifdef DEBUG_USB_HOST 839 Notify(
PSTR(
" with Motion Plus Inside"), 0x80);
842 }
else if(strncmp((
const char*)
remote_name,
"Nintendo RVL-CNT-01-UC", 22) == 0) {
843 #ifdef DEBUG_USB_HOST 844 Notify(
PSTR(
" - Wii U Pro Controller"), 0x80);
847 }
else if(strncmp((
const char*)
remote_name,
"Nintendo RVL-WBC-01", 19) == 0) {
848 #ifdef DEBUG_USB_HOST 851 pairWiiUsingSync =
true;
854 if(classOfDevice[2] == 0 && classOfDevice[1] == 0x25 && classOfDevice[0] == 0x08 && strncmp((
const char*)
remote_name,
"Wireless Controller", 19) == 0) {
855 #ifdef DEBUG_USB_HOST 856 Notify(
PSTR(
"\r\nPS4 controller is connecting"), 0x80);
871 #ifdef DEBUG_USB_HOST 872 Notify(
PSTR(
"\r\nConnected to Device: "), 0x80);
873 for(int8_t i = 5; i > 0; i--) {
894 if(hci_counter > 1000) {
902 #ifdef DEBUG_USB_HOST 903 Notify(
PSTR(
"\r\nHCI Disconnected from Device"), 0x80);
923 void BTD::ACL_event_task() {
931 btService[i]->
ACLData(l2capinbuf);
936 else if(rcode !=
hrNAK) {
937 Notify(
PSTR(
"\r\nACL data in error: "), 0x80);
938 D_PrintHex<uint8_t > (rcode, 0x80);
952 pUsb->
ctrlReq(
bAddress,
epInfo[
BTD_CONTROL_PIPE ].epAddr,
bmREQ_HCI_OUT, 0x00, 0x00, 0x00, 0x00, nbytes, nbytes, data, NULL);
958 hcibuf[1] = 0x03 << 2;
967 hcibuf[1] = 0x03 << 2;
979 hcibuf[1] = 0x03 << 2;
989 hcibuf[1] = 0x04 << 2;
998 hcibuf[1] = 0x04 << 2;
1007 hcibuf[1] = 0x01 << 2;
1023 hcibuf[1] = 0x01 << 2;
1041 hcibuf[1] = 0x03 << 2;
1042 hcibuf[2] = strlen(name) + 1;
1044 for(i = 0; i < strlen(name); i++)
1045 hcibuf[i + 3] = name[i];
1046 hcibuf[i + 3] = 0x00;
1054 hcibuf[1] = 0x01 << 2;
1067 hcibuf[1] = 0x01 << 2;
1080 hcibuf[1] = 0x01 << 2;
1082 hcibuf[3] = bdaddr[0];
1083 hcibuf[4] = bdaddr[1];
1084 hcibuf[5] = bdaddr[2];
1085 hcibuf[6] = bdaddr[3];
1086 hcibuf[7] = bdaddr[4];
1087 hcibuf[8] = bdaddr[5];
1101 hcibuf[1] = 0x01 << 2;
1111 if(pairWiiUsingSync) {
1112 #ifdef DEBUG_USB_HOST 1113 Notify(
PSTR(
"\r\nPairing with Wii controller via SYNC"), 0x80);
1115 for(uint8_t i = 0; i < 6; i++)
1118 for(uint8_t i = 0; i < 6; i++)
1121 for(uint8_t i = 16; i < 26; i++)
1124 hcibuf[9] = strlen(
btdPin);
1126 for(i = 0; i < strlen(
btdPin); i++)
1127 hcibuf[i + 10] =
btdPin[i];
1129 hcibuf[i + 10] = 0x00;
1137 hcibuf[1] = 0x01 << 2;
1151 hcibuf[1] = 0x01 << 2;
1165 hcibuf[1] = 0x01 << 2;
1168 hcibuf[4] = (uint8_t)((
hci_handle >> 8) & 0x0F);
1176 hcibuf[1] = 0x01 << 2;
1178 hcibuf[3] = (uint8_t)(handle & 0xFF);
1179 hcibuf[4] = (uint8_t)((handle >> 8) & 0x0F);
1187 hcibuf[1] = 0x03 << 2;
1221 void BTD::L2CAP_Command(uint16_t handle, uint8_t* data, uint8_t nbytes, uint8_t channelLow, uint8_t channelHigh) {
1222 uint8_t buf[8 + nbytes];
1223 buf[0] = (uint8_t)(handle & 0xff);
1224 buf[1] = (uint8_t)(((handle >> 8) & 0x0f) | 0x20);
1225 buf[2] = (uint8_t)((4 + nbytes) & 0xff);
1226 buf[3] = (uint8_t)((4 + nbytes) >> 8);
1227 buf[4] = (uint8_t)(nbytes & 0xff);
1228 buf[5] = (uint8_t)(nbytes >> 8);
1229 buf[6] = channelLow;
1230 buf[7] = channelHigh;
1232 for(uint16_t i = 0; i < nbytes; i++)
1233 buf[8 + i] = data[i];
1238 #ifdef DEBUG_USB_HOST 1239 Notify(
PSTR(
"\r\nError sending L2CAP message: 0x"), 0x80);
1240 D_PrintHex<uint8_t > (rcode, 0x80);
1242 D_PrintHex<uint8_t > (channelHigh, 0x80);
1244 D_PrintHex<uint8_t > (channelLow, 0x80);
1251 l2capoutbuf[1] = rxid;
1252 l2capoutbuf[2] = 0x04;
1253 l2capoutbuf[3] = 0x00;
1254 l2capoutbuf[4] = (uint8_t)(psm & 0xff);
1255 l2capoutbuf[5] = (uint8_t)(psm >> 8);
1256 l2capoutbuf[6] = scid[0];
1257 l2capoutbuf[7] = scid[1];
1264 l2capoutbuf[1] = rxid;
1265 l2capoutbuf[2] = 0x08;
1266 l2capoutbuf[3] = 0x00;
1267 l2capoutbuf[4] = dcid[0];
1268 l2capoutbuf[5] = dcid[1];
1269 l2capoutbuf[6] = scid[0];
1270 l2capoutbuf[7] = scid[1];
1271 l2capoutbuf[8] = result;
1272 l2capoutbuf[9] = 0x00;
1273 l2capoutbuf[10] = 0x00;
1274 l2capoutbuf[11] = 0x00;
1281 l2capoutbuf[1] = rxid;
1282 l2capoutbuf[2] = 0x08;
1283 l2capoutbuf[3] = 0x00;
1284 l2capoutbuf[4] = dcid[0];
1285 l2capoutbuf[5] = dcid[1];
1286 l2capoutbuf[6] = 0x00;
1287 l2capoutbuf[7] = 0x00;
1288 l2capoutbuf[8] = 0x01;
1289 l2capoutbuf[9] = 0x02;
1290 l2capoutbuf[10] = 0xFF;
1291 l2capoutbuf[11] = 0xFF;
1298 l2capoutbuf[1] = rxid;
1299 l2capoutbuf[2] = 0x0A;
1300 l2capoutbuf[3] = 0x00;
1301 l2capoutbuf[4] = scid[0];
1302 l2capoutbuf[5] = scid[1];
1303 l2capoutbuf[6] = 0x00;
1304 l2capoutbuf[7] = 0x00;
1305 l2capoutbuf[8] = 0x00;
1306 l2capoutbuf[9] = 0x00;
1307 l2capoutbuf[10] = 0x01;
1308 l2capoutbuf[11] = 0x02;
1309 l2capoutbuf[12] = 0xA0;
1310 l2capoutbuf[13] = 0x02;
1317 l2capoutbuf[1] = rxid;
1318 l2capoutbuf[2] = 0x04;
1319 l2capoutbuf[3] = 0x00;
1320 l2capoutbuf[4] = dcid[0];
1321 l2capoutbuf[5] = dcid[1];
1322 l2capoutbuf[6] = scid[0];
1323 l2capoutbuf[7] = scid[1];
1330 l2capoutbuf[1] = rxid;
1331 l2capoutbuf[2] = 0x04;
1332 l2capoutbuf[3] = 0x00;
1333 l2capoutbuf[4] = dcid[0];
1334 l2capoutbuf[5] = dcid[1];
1335 l2capoutbuf[6] = scid[0];
1336 l2capoutbuf[7] = scid[1];
1343 l2capoutbuf[1] = rxid;
1344 l2capoutbuf[2] = 0x08;
1345 l2capoutbuf[3] = 0x00;
1346 l2capoutbuf[4] = infoTypeLow;
1347 l2capoutbuf[5] = infoTypeHigh;
1348 l2capoutbuf[6] = 0x00;
1349 l2capoutbuf[7] = 0x00;
1350 l2capoutbuf[8] = 0x00;
1351 l2capoutbuf[9] = 0x00;
1352 l2capoutbuf[10] = 0x00;
1353 l2capoutbuf[11] = 0x00;
1359 void BTD::setBdaddr(uint8_t* bdaddr) {
1365 for(uint8_t i = 0; i < 6; i++)
1366 buf[i + 2] = bdaddr[5 - i];
1369 pUsb->
ctrlReq(
bAddress,
epInfo[
BTD_CONTROL_PIPE].epAddr,
bmREQ_HID_OUT,
HID_REQUEST_SET_REPORT, 0xF5, 0x03, 0x00, 8, 8, buf, NULL);
1372 void BTD::setMoveBdaddr(uint8_t* bdaddr) {
1381 for(uint8_t i = 0; i < 6; i++)
1382 buf[i + 1] = bdaddr[i];
1385 pUsb->
ctrlReq(
bAddress,
epInfo[
BTD_CONTROL_PIPE].epAddr,
bmREQ_HID_OUT,
HID_REQUEST_SET_REPORT, 0x05, 0x03, 0x00, 11, 11, buf, NULL);
static const uint8_t BTD_DATAOUT_PIPE
uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr)
void l2cap_connection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid, uint8_t result)
#define HCI_SCANNING_STATE
#define USB_ERROR_EPINFO_IS_NULL
void l2cap_connection_request(uint16_t handle, uint8_t rxid, uint8_t *scid, uint16_t psm)
#define EV_COMMAND_STATUS
#define EV_REMOTE_NAME_COMPLETE
bool sdpConnectionClaimed
void l2cap_disconnection_request(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
bool rfcommConnectionClaimed
#define EV_INQUIRY_COMPLETE
static const uint8_t BTD_EVENT_PIPE
void hci_write_scan_disable()
#define HCI_SET_NAME_STATE
void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)
#define EV_LINK_KEY_REQUEST
#define EV_DATA_BUFFER_OVERFLOW
#define HCI_DISCONNECT_STATE
#define HCI_FLAG_CONNECT_COMPLETE
#define EV_PIN_CODE_REQUEST
uint8_t setConf(uint8_t addr, uint8_t ep, uint8_t conf_value)
#define EV_AUTHENTICATION_COMPLETE
#define HCI_FLAG_CONNECT_EVENT
#define HCI_FLAG_DISCONNECT_COMPLETE
#define HCI_REMOTE_NAME_STATE
#define USB_ERROR_FailGetDevDescr
#define HCI_FLAG_CMD_COMPLETE
#define NotifyFailGetDevDescr(...)
uint8_t setEpInfoEntry(uint8_t addr, uint8_t epcount, EpInfo *eprecord_ptr)
#define EV_MAX_SLOTS_CHANGE
static const uint8_t BTD_DATAIN_PIPE
void hci_set_local_name(const char *name)
#define EV_QOS_SETUP_COMPLETE
void hci_write_scan_enable()
virtual void FreeAddress(uint8_t addr)=0
void l2cap_disconnection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
uint8_t ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi, uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p)
virtual UsbDevice * GetUsbDevicePtr(uint8_t addr)=0
#define HCI_CONNECT_DEVICE_STATE
uint8_t setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr)
#define NotifyFailGetConfDescr(...)
#define NotifyFailUnknownDevice(...)
#define USB_NAK_MAX_POWER
#define EV_CONNECT_COMPLETE
void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR *ep_ptr)
#define EV_DISCONNECT_COMPLETE
#define HCI_FLAG_READ_BDADDR
#define IOGEAR_GBU521_PID
uint8_t ConfigureDevice(uint8_t parent, uint8_t port, bool lowspeed)
#define HCI_LOCAL_VERSION_STATE
virtual void disconnect()=0
uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
void hci_disconnect(uint16_t handle)
uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data)
void hci_inquiry_cancel()
#define L2CAP_CMD_INFORMATION_RESPONSE
#define EV_INCOMING_CONNECT
#define HCI_CONNECT_IN_STATE
#define HCI_INQUIRY_STATE
virtual uint8_t AllocAddress(uint8_t parent, bool is_hub=false, uint8_t port=0)=0
#define HCI_CONNECTED_STATE
#define EV_INQUIRY_RESULT
#define USB_ERROR_CLASS_INSTANCE_ALREADY_IN_USE
#define L2CAP_CMD_CONFIG_REQUEST
#define L2CAP_CMD_DISCONNECT_REQUEST
static const uint8_t BTD_CONTROL_PIPE
#define HCI_FLAG_READ_VERSION
bool l2capConnectionClaimed
#define HCI_FLAG_INCOMING_REQUEST
#define EV_NUM_COMPLETE_PKT
#define USB_ERROR_ADDRESS_NOT_FOUND_IN_POOL
EpInfo epInfo[BTD_MAX_ENDPOINTS]
#define IOGEAR_GBU521_VID
#define BTD_MAX_ENDPOINTS
#define PS3NAVIGATION_PID
#define USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED
#define L2CAP_CMD_DISCONNECT_RESPONSE
#define EV_READ_REMOTE_VERSION_INFORMATION_COMPLETE
#define EV_COMMAND_COMPLETE
void l2cap_information_response(uint16_t handle, uint8_t rxid, uint8_t infoTypeLow, uint8_t infoTypeHigh)
#define L2CAP_CMD_CONNECTION_RESPONSE
#define L2CAP_CMD_CONFIG_RESPONSE
#define hci_set_flag(flag)
void hci_write_class_of_device()
#define HCI_CONNECTED_DEVICE_STATE
uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval=0)
void hci_pin_code_negative_request_reply()
#define EV_CHANGE_CONNECTION_LINK
virtual void ACLData(uint8_t *ACLData)=0
uint8_t bNumConfigurations
#define USB_ERROR_OUT_OF_ADDRESS_SPACE_IN_POOL
#define hci_check_flag(flag)
AddressPool & GetAddressPool()
#define HCI_CHECK_DEVICE_SERVICE
void hci_link_key_request_negative_reply()
#define EV_LOOPBACK_COMMAND
void L2CAP_Command(uint16_t handle, uint8_t *data, uint8_t nbytes, uint8_t channelLow=0x01, uint8_t channelHigh=0x00)
#define EV_LINK_KEY_NOTIFICATION
void l2cap_config_response(uint16_t handle, uint8_t rxid, uint8_t *scid)
void l2cap_config_request(uint16_t handle, uint8_t rxid, uint8_t *dcid)
void hci_pin_code_request_reply()
#define HID_REQUEST_SET_REPORT
#define L2CAP_CMD_CONNECTION_REQUEST
uint8_t RegisterDeviceClass(USBDeviceConfig *pdev)
#define EV_ENCRYPTION_CHANGE
#define NotifyFailSetConfDescr(...)
#define hci_clear_flag(flag)
void hci_authentication_request()
void hci_read_local_version_information()
#define HCI_FLAG_REMOTE_NAME_COMPLETE
void hci_accept_connection()
#define EV_PAGE_SCAN_REP_MODE
#define HCI_FLAG_DEVICE_FOUND
uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
defined(USB_METHODS_INLINE)
#define NotifyFailSetDevTblEntry(...)
#define USB_ERROR_CONFIG_REQUIRES_ADDITIONAL_RESET
void HCI_Command(uint8_t *data, uint16_t nbytes)