3      Copyright (C) Dean Camera, 2009. 
   5   dean [at] fourwalledcubicle [dot] com 
   6       www.fourwalledcubicle.com 
  10   Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com) 
  12   Permission to use, copy, modify, and distribute this software 
  13   and its documentation for any purpose and without fee is hereby 
  14   granted, provided that the above copyright notice appear in all 
  15   copies and that both that the copyright notice and this 
  16   permission notice and warranty disclaimer appear in supporting 
  17   documentation, and that the name of the author not be used in 
  18   advertising or publicity pertaining to distribution of the 
  19   software without specific, written prior permission. 
  21   The author disclaim all warranties with regard to this 
  22   software, including all implied warranties of merchantability 
  23   and fitness.  In no event shall the author be liable for any 
  24   special, indirect or consequential damages or any damages 
  25   whatsoever resulting from loss of use, data or profits, whether 
  26   in an action of contract, negligence or other tortious action, 
  27   arising out of or in connection with the use or performance of 
  31 #ifndef _BLUETOOTH_ACLPACKETS_ 
  32 #define _BLUETOOTH_ACLPACKETS_ 
  39                 #include <LUFA/Drivers/USB/USB.h> 
  41                 #include "BluetoothStack.h" 
  44                 #define BLUETOOTH_CHANNEL_SIGNALING              0x0001 
  45                 #define BLUETOOTH_CHANNEL_CONNECTIONLESS         0x0002 
  47                 #define BLUETOOTH_SIGNAL_CONNECTION_REQUEST      0x02 
  48                 #define BLUETOOTH_SIGNAL_CONNECTION_RESPONSE     0x03 
  49                 #define BLUETOOTH_SIGNAL_CONFIGURATION_REQUEST   0x04 
  50                 #define BLUETOOTH_SIGNAL_CONFIGURATION_RESPONSE  0x05 
  51                 #define BLUETOOTH_SIGNAL_INFORMATION_REQUEST     0x0A 
  53                 #define BLUETOOTH_CONNECTION_SUCCESSFUL          0x0000 
  54                 #define BLUETOOTH_CONNECTION_REFUSED_RESOURCES   0x0004 
  56                 #define BLUETOOTH_CONFIGURATION_SUCCESSFUL       0x0000 
  57                 #define BLUETOOTH_CONFIGURATION_REJECTED         0x0002 
  58                 #define BLUETOOTH_CONFIGURATION_UNKNOWNOPTIONS   0x0003 
  64                         uint16_t ConnectionHandle
; 
  66                 } Bluetooth_ACL_Header_t
; 
  70                         uint16_t PayloadLength
; 
  71                         uint16_t DestinationChannel
; 
  72                 } Bluetooth_DataPacket_Header_t
; 
  79                 } Bluetooth_SignalCommand_Header_t
; 
  84                         uint16_t SourceChannel
; 
  85                 } Bluetooth_SignalCommand_ConnectionRequest_t
; 
  89                         uint16_t DestinationChannel
; 
  90                         uint16_t SourceChannel
; 
  93                 } Bluetooth_SignalCommand_ConnectionResponse_t
; 
  97                         uint16_t DestinationChannel
; 
 100                 } Bluetooth_SignalCommand_ConfigurationRequest_t
; 
 104                         uint16_t SourceChannel
; 
 108                 } Bluetooth_SignalCommand_ConfigurationResponse_t
; 
 110         /* Function Prototypes: */ 
 111                 void Bluetooth_ProcessACLPackets(void); 
 113                 #if defined(INCLUDE_FROM_BLUETOOTH_ACLPACKETS_C) 
 114                         static inline void Bluetooth_ProcessSignalPacket_ConnectionRequest(Bluetooth_ACL_Header_t
* ACLPacketHeader
, 
 115                                                                    Bluetooth_DataPacket_Header_t
* DataHeader
, 
 116                                                                    Bluetooth_SignalCommand_Header_t
* SignalCommandHeader
); 
 117                         static inline void Bluetooth_ProcessSignalPacket_ConfigurationRequest(Bluetooth_ACL_Header_t
* ACLPacketHeader
, 
 118                                                                    Bluetooth_DataPacket_Header_t
* DataHeader
, 
 119                                                                    Bluetooth_SignalCommand_Header_t
* SignalCommandHeader
);