diff --git a/BTD.cpp b/BTD.cpp index add4fe6e..cca27f06 100644 --- a/BTD.cpp +++ b/BTD.cpp @@ -293,7 +293,7 @@ void BTD::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr) { /* Performs a cleanup after failed Init() attempt */ uint8_t BTD::Release() { - for (uint8_t i=0; iReset(); // Reset all Bluetooth services pUsb->GetAddressPool().FreeAddress(bAddress); @@ -600,7 +600,7 @@ void BTD::ACL_event_task() { uint16_t MAX_BUFFER_SIZE = BULK_MAXPKTSIZE; uint8_t rcode = pUsb->inTransfer(bAddress, epInfo[ BTD_DATAIN_PIPE ].epAddr, &MAX_BUFFER_SIZE, l2capinbuf); // input on endpoint 2 if(!rcode) { // Check for errors - for (uint8_t i=0; iACLData(l2capinbuf); } @@ -610,7 +610,7 @@ void BTD::ACL_event_task() { PrintHex(rcode); } #endif - for (uint8_t i=0; iRun(); } diff --git a/BTD.h b/BTD.h index fb73bf6c..a04f01bd 100644 --- a/BTD.h +++ b/BTD.h @@ -110,7 +110,7 @@ #define WI_PROTOCOL_BT 0x01 // Bluetooth Programming Interface #define BTD_MAX_ENDPOINTS 4 -#define BTD_NUMDEVICES 7 // Max number of Bluetooth devices +#define BTD_NUMSERVICES 4 // Max number of Bluetooth devices class BluetoothService { // All services should include this class public: @@ -136,14 +136,14 @@ public: bool watingForConnection; // Use this to see if it is waiting for a incoming connection void disconnect() { // Used this void to disconnect all services - for (uint8_t i=0; idisconnect(); // Disconnect both the L2CAP Channel and the HCI Connection }; /* Register bluetooth dongle members/services */ uint8_t registerServiceClass(BluetoothService *pService) { - for (uint8_t i=0; i