/*
LUFA Library
- Copyright (C) Dean Camera, 2011.
+ Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
}
/* Read in the received ACL packet headers when it has been discovered that a packet has been received */
- Pipe_Read_Stream_LE(&ACLPacketHeader, sizeof(ACLPacketHeader));
- Pipe_Read_Stream_LE(&DataHeader, sizeof(DataHeader));
+ Pipe_Read_Stream_LE(&ACLPacketHeader, sizeof(ACLPacketHeader), NULL);
+ Pipe_Read_Stream_LE(&DataHeader, sizeof(DataHeader), NULL);
BT_ACL_DEBUG(2, "");
BT_ACL_DEBUG(2, "Packet Received");
{
/* Read in the Signal Command header of the incoming packet */
BT_Signal_Header_t SignalCommandHeader;
- Pipe_Read_Stream_LE(&SignalCommandHeader, sizeof(SignalCommandHeader));
+ Pipe_Read_Stream_LE(&SignalCommandHeader, sizeof(SignalCommandHeader), NULL);
/* Dispatch to the appropriate handler function based on the Signal message code */
switch (SignalCommandHeader.Code)
BT_ACL_DEBUG(1, "<< Command Reject");
uint16_t RejectReason;
- Pipe_Read_Stream_LE(&RejectReason, sizeof(RejectReason));
- Pipe_Discard_Stream(ACLPacketHeader.DataLength - sizeof(RejectReason));
+ Pipe_Read_Stream_LE(&RejectReason, sizeof(RejectReason), NULL);
+ Pipe_Discard_Stream(ACLPacketHeader.DataLength - sizeof(RejectReason), NULL);
Pipe_ClearIN();
Pipe_Freeze();
default:
BT_ACL_DEBUG(1, "<< Unknown Signaling Command 0x%02X", SignalCommandHeader.Code);
- Pipe_Discard_Stream(ACLPacketHeader.DataLength);
+ Pipe_Discard_Stream(ACLPacketHeader.DataLength, NULL);
Pipe_ClearIN();
Pipe_Freeze();
break;
{
/* Non-signaling packet received, read in the packet contents and pass to the user application */
uint8_t PacketData[DataHeader.PayloadLength];
- Pipe_Read_Stream_LE(PacketData, DataHeader.PayloadLength);
+ Pipe_Read_Stream_LE(PacketData, DataHeader.PayloadLength, NULL);
Pipe_ClearIN();
Pipe_Freeze();
/** Retrieves the channel information structure with the given local or remote channel number from the channel list.
*
* \param[in] SearchValue Value to search for in the channel structure list
- * \param[in] SearchKey Key to search within the channel structure, a CHANNEL_SEARCH_* mask
+ * \param[in] SearchKey Key to search within the channel structure, a \c CHANNEL_SEARCH_* mask
*
* \return Pointer to the matching channel information structure in the channel table if found, NULL otherwise
*/
Pipe_Unfreeze();
/* Write the packet contents to the pipe so that it can be sent to the remote device */
- Pipe_Write_Stream_LE(&ACLPacketHeader, sizeof(ACLPacketHeader));
- Pipe_Write_Stream_LE(&DataHeader, sizeof(DataHeader));
- Pipe_Write_Stream_LE(Data, DataLen);
+ Pipe_Write_Stream_LE(&ACLPacketHeader, sizeof(ACLPacketHeader), NULL);
+ Pipe_Write_Stream_LE(&DataHeader, sizeof(DataHeader), NULL);
+ Pipe_Write_Stream_LE(Data, DataLen, NULL);
Pipe_ClearOUT();
Pipe_Freeze();
{
BT_Signal_ConnectionReq_t ConnectionRequest;
- Pipe_Read_Stream_LE(&ConnectionRequest, sizeof(ConnectionRequest));
+ Pipe_Read_Stream_LE(&ConnectionRequest, sizeof(ConnectionRequest), NULL);
Pipe_ClearIN();
Pipe_Freeze();
{
BT_Signal_ConnectionResp_t ConnectionResponse;
- Pipe_Read_Stream_LE(&ConnectionResponse, sizeof(ConnectionResponse));
+ Pipe_Read_Stream_LE(&ConnectionResponse, sizeof(ConnectionResponse), NULL);
Pipe_ClearIN();
Pipe_Freeze();
uint8_t OptionsLen = (SignalCommandHeader->Length - sizeof(ConfigurationRequest));
uint8_t Options[OptionsLen];
- Pipe_Read_Stream_LE(&ConfigurationRequest, sizeof(ConfigurationRequest));
- Pipe_Read_Stream_LE(&Options, sizeof(Options));
+ Pipe_Read_Stream_LE(&ConfigurationRequest, sizeof(ConfigurationRequest), NULL);
+ Pipe_Read_Stream_LE(&Options, sizeof(Options), NULL);
Pipe_ClearIN();
Pipe_Freeze();
{
BT_Signal_ConfigurationResp_t ConfigurationResponse;
- Pipe_Read_Stream_LE(&ConfigurationResponse, sizeof(ConfigurationResponse));
+ Pipe_Read_Stream_LE(&ConfigurationResponse, sizeof(ConfigurationResponse), NULL);
Pipe_ClearIN();
Pipe_Freeze();
{
BT_Signal_DisconnectionReq_t DisconnectionRequest;
- Pipe_Read_Stream_LE(&DisconnectionRequest, sizeof(DisconnectionRequest));
+ Pipe_Read_Stream_LE(&DisconnectionRequest, sizeof(DisconnectionRequest), NULL);
BT_ACL_DEBUG(1, "<< L2CAP Disconnection Request");
BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DisconnectionRequest.DestinationChannel);
{
BT_Signal_DisconnectionResp_t DisconnectionResponse;
- Pipe_Read_Stream_LE(&DisconnectionResponse, sizeof(DisconnectionResponse));
+ Pipe_Read_Stream_LE(&DisconnectionResponse, sizeof(DisconnectionResponse), NULL);
BT_ACL_DEBUG(1, "<< L2CAP Disconnection Response");
BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DisconnectionResponse.DestinationChannel);
{
BT_Signal_InformationReq_t InformationRequest;
- Pipe_Read_Stream_LE(&InformationRequest, sizeof(InformationRequest));
+ Pipe_Read_Stream_LE(&InformationRequest, sizeof(InformationRequest), NULL);
BT_ACL_DEBUG(1, "<< L2CAP Information Request");
BT_ACL_DEBUG(2, "-- Info Type: 0x%04X", InformationRequest.InfoType);