aboutsummaryrefslogtreecommitdiffstats
path: root/Demos
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-12-30 13:35:24 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-12-30 13:35:24 +0000
commit0ea819f7814a9eda0d5bfbb5125abb113634724f (patch)
tree27e471012214b72c15822cfe72d5ad6444656d38 /Demos
parent7beafc64e2944b3e0bd41f7621bf7dc93855f859 (diff)
downloadlufa-0ea819f7814a9eda0d5bfbb5125abb113634724f.tar.gz
lufa-0ea819f7814a9eda0d5bfbb5125abb113634724f.tar.bz2
lufa-0ea819f7814a9eda0d5bfbb5125abb113634724f.zip
Fix TemperatureDataLogger - sample tick timer wasn't being initialized in the correct CTC mode.
Diffstat (limited to 'Demos')
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c6
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c21
2 files changed, 11 insertions, 16 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c
index 8a90febcb..14c783f52 100644
--- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c
+++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c
@@ -37,7 +37,7 @@ void Bluetooth_ProcessACLPackets(void)
Bluetooth_DataPacket_Header_t DataHeader;
Pipe_SelectPipe(BLUETOOTH_DATA_IN_PIPE);
- Pipe_SetToken(PIPE_TOKEN_IN);
+ Pipe_SetPipeToken(PIPE_TOKEN_IN);
Pipe_Unfreeze();
if (!(Pipe_IsReadWriteAllowed()))
@@ -116,7 +116,7 @@ static inline void Bluetooth_ProcessSignalPacket_ConnectionRequest(Bluetooth_ACL
Pipe_ClearIN();
Pipe_Freeze();
Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE);
- Pipe_SetToken(PIPE_TOKEN_OUT);
+ Pipe_SetPipeToken(PIPE_TOKEN_OUT);
Pipe_Unfreeze();
Bluetooth_SignalCommand_ConnectionResponse_t ConnectionResponse;
@@ -167,7 +167,7 @@ static inline void Bluetooth_ProcessSignalPacket_ConfigurationRequest(Bluetooth_
Pipe_ClearIN();
Pipe_Freeze();
Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE);
- Pipe_SetToken(PIPE_TOKEN_OUT);
+ Pipe_SetPipeToken(PIPE_TOKEN_OUT);
Pipe_Unfreeze();
Bluetooth_SignalCommand_ConfigurationResponse_t ConfigurationResponse;
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c
index b4720e584..c4cd5d6da 100644
--- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c
+++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c
@@ -72,7 +72,6 @@ static bool Bluetooth_GetNextHCIEventHeader(void)
}
Pipe_Read_Stream_LE(&HCIEventHeader, sizeof(HCIEventHeader));
-
Pipe_Freeze();
return true;
@@ -81,11 +80,14 @@ static bool Bluetooth_GetNextHCIEventHeader(void)
static void Bluetooth_DiscardRemainingHCIEventParameters(void)
{
Pipe_SelectPipe(BLUETOOTH_EVENTS_PIPE);
-
Pipe_Unfreeze();
+
Pipe_Discard_Stream(HCIEventHeader.ParameterLength);
Pipe_ClearIN();
+
Pipe_Freeze();
+
+ HCIEventHeader.ParameterLength = 0;
}
void Bluetooth_ProcessHCICommands(void)
@@ -329,6 +331,10 @@ void Bluetooth_ProcessHCICommands(void)
Bluetooth_HCIProcessingState = Bluetooth_Conn_SendPINCode;
}
+ else if (HCIEventHeader.EventCode == EVENT_COMMAND_COMPLETE)
+ {
+ BT_DEBUG("(HCI) >> Command Complete", NULL);
+ }
BT_DEBUG("(HCI) -- Unread Event Param Length: %d", HCIEventHeader.ParameterLength);
@@ -393,17 +399,6 @@ void Bluetooth_ProcessHCICommands(void)
sizeof(Bluetooth_DeviceConfiguration.PINCode));
Bluetooth_SendHCICommand(&PINCodeRequestParams, sizeof(PINCodeRequestParams));
-
- do
- {
- while (!(Bluetooth_GetNextHCIEventHeader()))
- {
- if (USB_HostState == HOST_STATE_Unattached)
- return;
- }
-
- Bluetooth_DiscardRemainingHCIEventParameters();
- } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);
Bluetooth_HCIProcessingState = Bluetooth_PrepareToProcessEvents;
break;