BTstack for EA LPC4088 QSB example program
Dependencies: LPC4088-USBHost mbed
Fork of KL46Z-BTstack_example by
The usage is the same as KL46Z-BTstack_example.
使い方はKL46Z-BTstack_exampleと同じです。
Diff: KL46Z-USBHostBTstack/USBHostBTstack.cpp
- Revision:
- 5:56897116e6b0
- Parent:
- 4:cf1b23f4dcd4
--- a/KL46Z-USBHostBTstack/USBHostBTstack.cpp Fri Jan 31 15:06:38 2014 +0000 +++ b/KL46Z-USBHostBTstack/USBHostBTstack.cpp Wed Feb 05 14:56:10 2014 +0000 @@ -159,15 +159,15 @@ void USBHostBTstack::poll() { - USB_TYPE rc = host->interruptRead(dev, int_in, int_report, sizeof(int_report)); - if (rc == USB_TYPE_OK) { + int result = host->interruptReadNB(int_in, int_report, sizeof(int_report)); + if (result >= 0) { int len = int_in->getLengthTransferred(); BT_DBG_BYTES("HCI_EVT:", int_report, len); if (m_pCb) { m_pCb(HCI_EVENT_PACKET, int_report, len); } } - int result = host->BulkRead(bulk_in, bulk_report, sizeof(bulk_report), 0); + result = host->bulkReadNB(bulk_in, bulk_report, sizeof(bulk_report)); if (result >= 0) { int len = bulk_in->getLengthTransferred(); BT_DBG_BYTES("HCI_ACL_RECV:", bulk_report, len);