aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-05-11 13:45:23 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-05-11 13:45:23 +0000
commitee5ea4ce2bc463206ed8fe01c71b31585c0cc280 (patch)
treee74d4313e54fc0cec8f4a61fc48d8aac8bf23f16 /Demos/Host
parent53ebb2f21a216281707f5d680181c3c4adc12772 (diff)
downloadlufa-ee5ea4ce2bc463206ed8fe01c71b31585c0cc280.tar.gz
lufa-ee5ea4ce2bc463206ed8fe01c71b31585c0cc280.tar.bz2
lufa-ee5ea4ce2bc463206ed8fe01c71b31585c0cc280.zip
Fix nasty bug in USBInterrupt.c which would cause a lockup if the control endpoint was not selected at the point the USB endpoint interrupt fires when INTERRUPT_CONTROL_ENDPOINT is defined.
Diffstat (limited to 'Demos/Host')
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.c b/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.c
index f7935cad0..bd649419a 100644
--- a/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.c
+++ b/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.c
@@ -183,8 +183,6 @@ static uint32_t ServiceDiscovery_GetDataElementSize(const void** DataElementHead
uint8_t SizeIndex = (*((uint8_t*)*DataElementHeader) & 0x07);
*DataElementHeader += sizeof(uint8_t);
- *ElementHeaderSize = 1;
-
uint32_t ElementValue;
switch (SizeIndex)
@@ -205,7 +203,8 @@ static uint32_t ServiceDiscovery_GetDataElementSize(const void** DataElementHead
*ElementHeaderSize = (1 + sizeof(uint32_t));
break;
default:
- ElementValue = (1UL << SizeIndex);
+ ElementValue = (1 << SizeIndex);
+ *ElementHeaderSize = 1;
break;
}