Seperated out Lib components of the incomplete BluetoothHost demo application out into a seperate Lib subfolder.
Changed F_CLOCK entries in project makefiles to alias to F_CPU by default, as this is the most common case.
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Starting byte address of the bootloader\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Starting byte address of the bootloader\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 16000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Starting byte address of the bootloader\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
*/\r
static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)\r
{\r
- uint32_t TotalLUNs = (LUN_MEDIA_BLOCKS - 1);\r
- uint32_t MediaBlockSize = VIRTUAL_MEMORY_BLOCK_SIZE;\r
+ uint32_t LastBlockAddressInLUN = (LUN_MEDIA_BLOCKS - 1);\r
+ uint32_t MediaBlockSize = VIRTUAL_MEMORY_BLOCK_SIZE;\r
\r
- Endpoint_Write_Stream_BE(&TotalLUNs, sizeof(TotalLUNs), NO_STREAM_CALLBACK);\r
+ Endpoint_Write_Stream_BE(&LastBlockAddressInLUN, sizeof(LastBlockAddressInLUN), NO_STREAM_CALLBACK);\r
Endpoint_Write_Stream_BE(&MediaBlockSize, sizeof(MediaBlockSize), NO_STREAM_CALLBACK);\r
Endpoint_ClearIN();\r
\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
return false;\r
\r
/* Verify the command block - abort if invalid */\r
- if ((CommandBlock.Signature != CBW_SIGNATURE) ||\r
- (CommandBlock.LUN >= TOTAL_LUNS) ||\r
- (CommandBlock.SCSICommandLength > MAX_SCSI_COMMAND_LENGTH))\r
+ if ((CommandBlock.Signature != CBW_SIGNATURE) ||\r
+ (CommandBlock.LUN >= TOTAL_LUNS) ||\r
+ (CommandBlock.SCSICommandLength > MAX_SCSI_COMMAND_LENGTH))\r
{\r
/* Stall both data pipes until reset by host */\r
Endpoint_StallTransaction();\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
+++ /dev/null
-/*\r
- LUFA Library\r
- Copyright (C) Dean Camera, 2009.\r
- \r
- dean [at] fourwalledcubicle [dot] com\r
- www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
- Permission to use, copy, modify, and distribute this software\r
- and its documentation for any purpose and without fee is hereby\r
- granted, provided that the above copyright notice appear in all\r
- copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting\r
- documentation, and that the name of the author not be used in\r
- advertising or publicity pertaining to distribution of the\r
- software without specific, written prior permission.\r
-\r
- The author disclaim all warranties with regard to this\r
- software, including all implied warranties of merchantability\r
- and fitness. In no event shall the author be liable for any\r
- special, indirect or consequential damages or any damages\r
- whatsoever resulting from loss of use, data or profits, whether\r
- in an action of contract, negligence or other tortious action,\r
- arising out of or in connection with the use or performance of\r
- this software.\r
-*/\r
-\r
-#define INCLUDE_FROM_BLUETOOTH_ACLPACKETS_C\r
-#include "BluetoothACLPackets.h"\r
-\r
-void Bluetooth_ProcessACLPackets(void)\r
-{\r
- Bluetooth_ACL_Header_t ACLPacketHeader;\r
- Bluetooth_DataPacket_Header_t DataHeader;\r
-\r
- Pipe_SelectPipe(BLUETOOTH_DATA_IN_PIPE);\r
- Pipe_SetToken(PIPE_TOKEN_IN);\r
- Pipe_Unfreeze();\r
- \r
- if (!(Pipe_IsReadWriteAllowed()))\r
- {\r
- Pipe_Freeze();\r
- return;\r
- }\r
- \r
- Pipe_Read_Stream_LE(&ACLPacketHeader, sizeof(ACLPacketHeader));\r
- Pipe_Read_Stream_LE(&DataHeader, sizeof(DataHeader));\r
-\r
- BT_DEBUG("(ACL) Packet Received", NULL);\r
- BT_DEBUG("(ACL) -- Connection Handle: 0x%04X", ACLPacketHeader.ConnectionHandle);\r
- BT_DEBUG("(ACL) -- Data Length: 0x%04X", ACLPacketHeader.DataLength);\r
- BT_DEBUG("(ACL) -- Destination Channel: 0x%04X", DataHeader.DestinationChannel);\r
- BT_DEBUG("(ACL) -- Payload Length: 0x%04X", DataHeader.PayloadLength);\r
-\r
- if (DataHeader.DestinationChannel == BLUETOOTH_CHANNEL_SIGNALING)\r
- {\r
- Bluetooth_SignalCommand_Header_t SignalCommandHeader;\r
- Pipe_Read_Stream_LE(&SignalCommandHeader, sizeof(SignalCommandHeader));\r
-\r
- switch (SignalCommandHeader.Code)\r
- {\r
- case BLUETOOTH_SIGNAL_CONNECTION_REQUEST:\r
- Bluetooth_ProcessSignalPacket_ConnectionRequest(&ACLPacketHeader, &DataHeader, &SignalCommandHeader);\r
- break;\r
- case BLUETOOTH_SIGNAL_CONFIGURATION_REQUEST:\r
- Bluetooth_ProcessSignalPacket_ConfigurationRequest(&ACLPacketHeader, &DataHeader, &SignalCommandHeader);\r
- break;\r
- case BLUETOOTH_SIGNAL_INFORMATION_REQUEST:\r
- BT_DEBUG("(ACL) -- Information Request, Discarded");\r
-\r
- Pipe_Discard_Stream(ACLPacketHeader.DataLength);\r
- Pipe_ClearIN(); \r
- Pipe_Freeze();\r
- break;\r
- default:\r
- BT_DEBUG("(ACL) >> Unknown Signalling Command 0x%02X", SignalCommandHeader.Code);\r
- \r
- Pipe_Discard_Stream(ACLPacketHeader.DataLength);\r
- Pipe_ClearIN(); \r
- Pipe_Freeze();\r
- break;\r
- }\r
- }\r
- else\r
- {\r
- uint8_t DataPayload[DataHeader.PayloadLength];\r
- Pipe_Read_Stream_LE(&DataPayload, sizeof(DataPayload));\r
- DataHeader.PayloadLength = 0;\r
- \r
- BT_DEBUG("(ACL) -- Data Payload: ", NULL);\r
- for (uint16_t B = 0; B < sizeof(DataPayload); B++)\r
- printf("0x%02X ", DataPayload[B]);\r
- BT_DEBUG("", NULL);\r
-\r
- Pipe_Discard_Stream(ACLPacketHeader.DataLength);\r
- Pipe_ClearIN(); \r
- Pipe_Freeze();\r
- }\r
-}\r
-\r
-static inline void Bluetooth_ProcessSignalPacket_ConnectionRequest(Bluetooth_ACL_Header_t* ACLPacketHeader,\r
- Bluetooth_DataPacket_Header_t* DataHeader,\r
- Bluetooth_SignalCommand_Header_t* SignalCommandHeader)\r
-{\r
- Bluetooth_SignalCommand_ConnectionRequest_t ConnectionRequest;\r
- \r
- Pipe_Read_Stream_LE(&ConnectionRequest, sizeof(ConnectionRequest));\r
-\r
- BT_DEBUG("(ACL) >> L2CAP Connection Request", NULL);\r
- BT_DEBUG("(ACL) -- PSM: 0x%04X", ConnectionRequest.PSM);\r
- BT_DEBUG("(ACL) -- Source Channel: 0x%04X", ConnectionRequest.SourceChannel);\r
- \r
- Pipe_ClearIN();\r
- Pipe_Freeze();\r
- Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE);\r
- Pipe_SetToken(PIPE_TOKEN_OUT);\r
- Pipe_Unfreeze();\r
- \r
- Bluetooth_SignalCommand_ConnectionResponse_t ConnectionResponse;\r
-\r
- ACLPacketHeader->DataLength = sizeof(*DataHeader) + sizeof(*SignalCommandHeader) + sizeof(ConnectionResponse);\r
- DataHeader->PayloadLength = sizeof(*SignalCommandHeader) + sizeof(ConnectionResponse);\r
- DataHeader->DestinationChannel = BLUETOOTH_CHANNEL_SIGNALING;\r
- SignalCommandHeader->Code = BLUETOOTH_SIGNAL_CONNECTION_RESPONSE;\r
- SignalCommandHeader->Length = sizeof(ConnectionResponse);\r
- \r
- Bluetooth_Channel_t* ChannelData = Bluetooth_InitChannelData(ConnectionRequest.SourceChannel, ConnectionRequest.PSM);\r
- \r
- ConnectionResponse.Result = (ChannelData == NULL) ? BLUETOOTH_CONNECTION_REFUSED_RESOURCES :\r
- BLUETOOTH_CONNECTION_SUCCESSFUL;\r
- ConnectionResponse.DestinationChannel = ChannelData->LocalNumber;\r
- ConnectionResponse.SourceChannel = ChannelData->RemoteNumber;\r
- ConnectionResponse.Status = 0x00;\r
-\r
- Pipe_Write_Stream_LE(ACLPacketHeader, sizeof(*ACLPacketHeader));\r
- Pipe_Write_Stream_LE(DataHeader, sizeof(*DataHeader));\r
- Pipe_Write_Stream_LE(SignalCommandHeader, sizeof(*SignalCommandHeader));\r
- Pipe_Write_Stream_LE(&ConnectionResponse, sizeof(ConnectionResponse));\r
- \r
- Pipe_ClearOUT(); \r
- Pipe_Freeze();\r
- \r
- BT_DEBUG("(ACL) Packet Sent", NULL);\r
- BT_DEBUG("(ACL) -- Connection Handle: 0x%04X", ACLPacketHeader->ConnectionHandle);\r
- BT_DEBUG("(ACL) -- Data Length: 0x%04X", ACLPacketHeader->DataLength);\r
- BT_DEBUG("(ACL) -- Destination Channel: 0x%04X", DataHeader->DestinationChannel);\r
- BT_DEBUG("(ACL) -- Payload Length: 0x%04X", DataHeader->PayloadLength); \r
- BT_DEBUG("(ACL) >> L2CAP Connection Response", NULL);\r
- BT_DEBUG("(ACL) -- Source Channel: 0x%04X", ConnectionResponse.SourceChannel);\r
- BT_DEBUG("(ACL) -- Destination Channel: 0x%04X", ConnectionResponse.DestinationChannel);\r
-}\r
-\r
-static inline void Bluetooth_ProcessSignalPacket_ConfigurationRequest(Bluetooth_ACL_Header_t* ACLPacketHeader,\r
- Bluetooth_DataPacket_Header_t* DataHeader,\r
- Bluetooth_SignalCommand_Header_t* SignalCommandHeader)\r
-{\r
- Bluetooth_SignalCommand_ConfigurationRequest_t ConfigurationRequest;\r
- \r
- Pipe_Read_Stream_LE(&ConfigurationRequest, sizeof(ConfigurationRequest));\r
-\r
- BT_DEBUG("(ACL) >> L2CAP Configuration Request", NULL);\r
- BT_DEBUG("(ACL) -- Destination Channel: 0x%04X", ConfigurationRequest.DestinationChannel);\r
- \r
- Pipe_ClearIN();\r
- Pipe_Freeze();\r
- Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE);\r
- Pipe_SetToken(PIPE_TOKEN_OUT);\r
- Pipe_Unfreeze();\r
- \r
- Bluetooth_SignalCommand_ConfigurationResponse_t ConfigurationResponse;\r
-\r
- ACLPacketHeader->DataLength = sizeof(*DataHeader) + sizeof(*SignalCommandHeader) + sizeof(ConfigurationResponse);\r
- DataHeader->PayloadLength = sizeof(*SignalCommandHeader) + sizeof(ConfigurationResponse);\r
- DataHeader->DestinationChannel = BLUETOOTH_CHANNEL_SIGNALING;\r
- SignalCommandHeader->Code = BLUETOOTH_SIGNAL_CONFIGURATION_RESPONSE;\r
- SignalCommandHeader->Length = sizeof(ConfigurationResponse);\r
- \r
- Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConfigurationRequest.DestinationChannel, CHANNEL_LOOKUP_BY_DESTINATION);\r
-\r
- if (ChannelData != NULL)\r
- ChannelData->State = Channel_Open;\r
- \r
- // TODO: Add channel config data to the tail of ConfigurationResponse\r
-\r
- ConfigurationResponse.SourceChannel = ChannelData->RemoteNumber;\r
- ConfigurationResponse.Flags = 0x00;\r
- ConfigurationResponse.Result = (ChannelData != NULL) ? BLUETOOTH_CONFIGURATION_SUCCESSFUL : BLUETOOTH_CONFIGURATION_REJECTED;\r
-\r
- Pipe_Write_Stream_LE(ACLPacketHeader, sizeof(*ACLPacketHeader));\r
- Pipe_Write_Stream_LE(DataHeader, sizeof(*DataHeader));\r
- Pipe_Write_Stream_LE(SignalCommandHeader, sizeof(*SignalCommandHeader));\r
- Pipe_Write_Stream_LE(&ConfigurationResponse, sizeof(ConfigurationResponse));\r
- \r
- Pipe_ClearOUT(); \r
- Pipe_Freeze();\r
- \r
- BT_DEBUG("(ACL) Packet Sent", NULL);\r
- BT_DEBUG("(ACL) -- Connection Handle: 0x%04X", ACLPacketHeader->ConnectionHandle);\r
- BT_DEBUG("(ACL) -- Data Length: 0x%04X", ACLPacketHeader->DataLength);\r
- BT_DEBUG("(ACL) -- Destination Channel: 0x%04X", DataHeader->DestinationChannel);\r
- BT_DEBUG("(ACL) -- Payload Length: 0x%04X", DataHeader->PayloadLength); \r
- BT_DEBUG("(ACL) >> L2CAP Configuration Response", NULL);\r
-}\r
+++ /dev/null
-/*\r
- LUFA Library\r
- Copyright (C) Dean Camera, 2009.\r
- \r
- dean [at] fourwalledcubicle [dot] com\r
- www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
- Permission to use, copy, modify, and distribute this software\r
- and its documentation for any purpose and without fee is hereby\r
- granted, provided that the above copyright notice appear in all\r
- copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting\r
- documentation, and that the name of the author not be used in\r
- advertising or publicity pertaining to distribution of the\r
- software without specific, written prior permission.\r
-\r
- The author disclaim all warranties with regard to this\r
- software, including all implied warranties of merchantability\r
- and fitness. In no event shall the author be liable for any\r
- special, indirect or consequential damages or any damages\r
- whatsoever resulting from loss of use, data or profits, whether\r
- in an action of contract, negligence or other tortious action,\r
- arising out of or in connection with the use or performance of\r
- this software.\r
-*/\r
-\r
-#ifndef _BLUETOOTH_ACLPACKETS_\r
-#define _BLUETOOTH_ACLPACKETS_\r
-\r
- /* Includes: */\r
- #include <avr/io.h>\r
- #include <string.h>\r
- #include <stdbool.h>\r
-\r
- #include <LUFA/Drivers/USB/USB.h>\r
- \r
- #include "BluetoothStack.h"\r
- \r
- /* Macros: */\r
- #define BLUETOOTH_CHANNEL_SIGNALING 0x0001\r
- #define BLUETOOTH_CHANNEL_CONNECTIONLESS 0x0002\r
- \r
- #define BLUETOOTH_SIGNAL_CONNECTION_REQUEST 0x02\r
- #define BLUETOOTH_SIGNAL_CONNECTION_RESPONSE 0x03\r
- #define BLUETOOTH_SIGNAL_CONFIGURATION_REQUEST 0x04\r
- #define BLUETOOTH_SIGNAL_CONFIGURATION_RESPONSE 0x05\r
- #define BLUETOOTH_SIGNAL_INFORMATION_REQUEST 0x0A\r
- \r
- #define BLUETOOTH_CONNECTION_SUCCESSFUL 0x0000\r
- #define BLUETOOTH_CONNECTION_REFUSED_RESOURCES 0x0004\r
- \r
- #define BLUETOOTH_CONFIGURATION_SUCCESSFUL 0x0000\r
- #define BLUETOOTH_CONFIGURATION_REJECTED 0x0002\r
- #define BLUETOOTH_CONFIGURATION_UNKNOWNOPTIONS 0x0003\r
-\r
- \r
- /* Type Defines: */\r
- typedef struct\r
- {\r
- uint16_t ConnectionHandle;\r
- uint16_t DataLength;\r
- } Bluetooth_ACL_Header_t;\r
-\r
- typedef struct\r
- {\r
- uint16_t PayloadLength;\r
- uint16_t DestinationChannel;\r
- } Bluetooth_DataPacket_Header_t;\r
- \r
- typedef struct\r
- {\r
- uint8_t Code;\r
- uint8_t Identifier;\r
- uint16_t Length;\r
- } Bluetooth_SignalCommand_Header_t;\r
- \r
- typedef struct\r
- {\r
- uint16_t PSM;\r
- uint16_t SourceChannel;\r
- } Bluetooth_SignalCommand_ConnectionRequest_t;\r
-\r
- typedef struct\r
- {\r
- uint16_t DestinationChannel;\r
- uint16_t SourceChannel;\r
- uint16_t Result;\r
- uint16_t Status;\r
- } Bluetooth_SignalCommand_ConnectionResponse_t;\r
- \r
- typedef struct\r
- {\r
- uint16_t DestinationChannel;\r
- uint16_t Flags;\r
- uint8_t Options[];\r
- } Bluetooth_SignalCommand_ConfigurationRequest_t;\r
-\r
- typedef struct\r
- {\r
- uint16_t SourceChannel;\r
- uint16_t Flags;\r
- uint16_t Result;\r
- uint8_t Config;\r
- } Bluetooth_SignalCommand_ConfigurationResponse_t;\r
- \r
- /* Function Prototypes: */\r
- void Bluetooth_ProcessACLPackets(void);\r
-\r
- #if defined(INCLUDE_FROM_BLUETOOTH_ACLPACKETS_C)\r
- static inline void Bluetooth_ProcessSignalPacket_ConnectionRequest(Bluetooth_ACL_Header_t* ACLPacketHeader,\r
- Bluetooth_DataPacket_Header_t* DataHeader,\r
- Bluetooth_SignalCommand_Header_t* SignalCommandHeader);\r
- static inline void Bluetooth_ProcessSignalPacket_ConfigurationRequest(Bluetooth_ACL_Header_t* ACLPacketHeader,\r
- Bluetooth_DataPacket_Header_t* DataHeader,\r
- Bluetooth_SignalCommand_Header_t* SignalCommandHeader);\r
- #endif\r
- \r
-#endif\r
+++ /dev/null
-/*\r
- LUFA Library\r
- Copyright (C) Dean Camera, 2009.\r
- \r
- dean [at] fourwalledcubicle [dot] com\r
- www.fourwalledcubicle.com\r
-*/\r
-/*\r
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
- Permission to use, copy, modify, and distribute this software\r
- and its documentation for any purpose and without fee is hereby\r
- granted, provided that the above copyright notice appear in all\r
- copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting\r
- documentation, and that the name of the author not be used in\r
- advertising or publicity pertaining to distribution of the\r
- software without specific, written prior permission.\r
-\r
- The author disclaim all warranties with regard to this\r
- software, including all implied warranties of merchantability\r
- and fitness. In no event shall the author be liable for any\r
- special, indirect or consequential damages or any damages\r
- whatsoever resulting from loss of use, data or profits, whether\r
- in an action of contract, negligence or other tortious action,\r
- arising out of or in connection with the use or performance of\r
- this software.\r
-*/\r
-\r
-#ifndef _BLUETOOTH_CLASS_CODES_H_\r
-#define _BLUETOOTH_CLASS_CODES_H_\r
-\r
- /* Macros: */\r
- #define DEVICE_CLASS_SERVICE_POSITIONING (1UL << 16)\r
- #define DEVICE_CLASS_SERVICE_NETWORKING (1UL << 17)\r
- #define DEVICE_CLASS_SERVICE_RENDERING (1UL << 18)\r
- #define DEVICE_CLASS_SERVICE_CAPTURING (1UL << 19)\r
- #define DEVICE_CLASS_SERVICE_OBJECTTRANSFER (1UL << 20)\r
- #define DEVICE_CLASS_SERVICE_AUDIO (1UL << 21)\r
- #define DEVICE_CLASS_SERVICE_TELEPHONY (1UL << 22)\r
- #define DEVICE_CLASS_SERVICE_INFORMATION (1UL << 23)\r
- \r
- #define DEVICE_CLASS_MAJOR_MISC (0x00 << 8)\r
- #define DEVICE_CLASS_MAJOR_COMPUTER (0x01 << 8)\r
- #define DEVICE_CLASS_MAJOR_PHONE (0x02 << 8)\r
- #define DEVICE_CLASS_MAJOR_LAN (0x03 << 8)\r
- #define DEVICE_CLASS_MAJOR_AUDIOVIDEO (0x04 << 8)\r
- #define DEVICE_CLASS_MAJOR_PERIPHERAL (0x05 << 8)\r
- #define DEVICE_CLASS_MAJOR_IMAGING (0x06 << 8)\r
- #define DEVICE_CLASS_MAJOR_UNCLASSIFIED (0x1F << 8)\r
-\r
- #define DEVICE_CLASS_MINOR_COMPUTER_UNCATEGORIZED (0x00 << 2)\r
- #define DEVICE_CLASS_MINOR_COMPUTER_DESKTOP (0x01 << 2)\r
- #define DEVICE_CLASS_MINOR_COMPUTER_SERVER (0x02 << 2)\r
- #define DEVICE_CLASS_MINOR_COMPUTER_LAPTOP (0x03 << 2)\r
- #define DEVICE_CLASS_MINOR_COMPUTER_HANDHELD (0x04 << 2)\r
- #define DEVICE_CLASS_MINOR_COMPUTER_PALM (0x05 << 2)\r
- #define DEVICE_CLASS_MINOR_COMPUTER_WEARABLE (0x06 << 2)\r
- \r
- #define DEVICE_CLASS_MINOR_PHONE_UNCATEGORIZED (0x00 << 2)\r
- #define DEVICE_CLASS_MINOR_PHONE_CELLULAR (0x01 << 2)\r
- #define DEVICE_CLASS_MINOR_PHONE_CORDLESS (0x02 << 2)\r
- #define DEVICE_CLASS_MINOR_PHONE_SMARTPHONE (0x03 << 2)\r
- #define DEVICE_CLASS_MINOR_PHONE_WIREDMODEM (0x04 << 2)\r
- #define DEVICE_CLASS_MINOR_PHONE_ISDN (0x05 << 2)\r
-\r
- #define DEVICE_CLASS_MINOR_LAN_FULLY_AVAILABLE (0x00 << 5)\r
- #define DEVICE_CLASS_MINOR_LAN_1_TO_17_PC_UTILIZED (0x01 << 5)\r
- #define DEVICE_CLASS_MINOR_LAN_17_TO_33_PC_UTILIZED (0x02 << 5)\r
- #define DEVICE_CLASS_MINOR_LAN_33_TO_50_PC_UTILIZED (0x03 << 5)\r
- #define DEVICE_CLASS_MINOR_LAN_50_TO_67_PC_UTILIZED (0x04 << 5)\r
- #define DEVICE_CLASS_MINOR_LAN_67_TO_83_PC_UTILIZED (0x05 << 5)\r
- #define DEVICE_CLASS_MINOR_LAN_83_TO_99_PC_UTILIZED (0x06 << 5)\r
- #define DEVICE_CLASS_MINOR_NO_SERVICE_AVAILABLE (0x07 << 5)\r
- \r
- #define DEVICE_CLASS_MINOR_AV_UNCATEGORIZED (0x00 << 2)\r
- #define DEVICE_CLASS_MINOR_AV_HEADSET (0x01 << 2)\r
- #define DEVICE_CLASS_MINOR_AV_HANDSFREE (0x02 << 2)\r
- #define DEVICE_CLASS_MINOR_AV_MICROPHONE (0x04 << 2)\r
- #define DEVICE_CLASS_MINOR_AV_LOUDSPEAKER (0x05 << 2)\r
- #define DEVICE_CLASS_MINOR_AV_HEADPHONES (0x06 << 2)\r
- #define DEVICE_CLASS_MINOR_AV_PORTABLE_AUDIO (0x07 << 2)\r
- #define DEVICE_CLASS_MINOR_AV_CARAUDIO (0x08 << 2)\r
- #define DEVICE_CLASS_MINOR_AV_SETTOP_BOX (0x09 << 2)\r
- #define DEVICE_CLASS_MINOR_AV_HIFI (0x0A << 2)\r
- #define DEVICE_CLASS_MINOR_AV_VCR (0x0B << 2)\r
- #define DEVICE_CLASS_MINOR_AV_VIDEO_CAMERA (0x0C << 2)\r
- #define DEVICE_CLASS_MINOR_AV_CAMCORDER (0x0D << 2)\r
- #define DEVICE_CLASS_MINOR_AV_VIDEO_MONITOR (0x0E << 2)\r
- #define DEVICE_CLASS_MINOR_AV_DISPLAY_AND_LOUDSPEAKER (0x0F << 2)\r
- #define DEVICE_CLASS_MINOR_AV_VIDEO_CONFERENCING (0x10 << 2)\r
- #define DEVICE_CLASS_MINOR_AV_GAMING_TOY (0x12 << 2)\r
- \r
- #define DEVICE_CLASS_MINOR_PERIPHERAL_KEYBOARD (0x01 << 6)\r
- #define DEVICE_CLASS_MINOR_PERIPHERAL_POINTING (0x02 << 6)\r
- #define DEVICE_CLASS_MINOR_PERIPHERAL_COMBO (0x03 << 6)\r
- #define DEVICE_CLASS_MINOR_PERIPHERAL_UNCATEGORIZED (0x00 << 2)\r
- #define DEVICE_CLASS_MINOR_PERIPHERAL_JOYSTICK (0x01 << 2)\r
- #define DEVICE_CLASS_MINOR_PERIPHERAL_GAMEPAD (0x02 << 2)\r
- #define DEVICE_CLASS_MINOR_PERIPHERAL_REMOTE_CONTROL (0x03 << 2)\r
- #define DEVICE_CLASS_MINOR_PERIPHERAL_SENSING_DEVICE (0x04 << 2)\r
- #define DEVICE_CLASS_MINOR_PERIPHERAL_DIGITIZER (0x05 << 2)\r
- #define DEVICE_CLASS_MINOR_PERIPHERAL_CARD_READER (0x06 << 2)\r
-\r
- #define DEVICE_CLASS_MINOR_IMAGING_DISPLAY (1 << 4)\r
- #define DEVICE_CLASS_MINOR_IMAGING_CAMERA (1 << 5)\r
- #define DEVICE_CLASS_MINOR_IMAGING_SCANNER (1 << 6)\r
- #define DEVICE_CLASS_MINOR_IMAGING_PRINTER (1 << 7)\r
-\r
-#endif\r
+++ /dev/null
-/*\r
- LUFA Library\r
- Copyright (C) Dean Camera, 2009.\r
- \r
- dean [at] fourwalledcubicle [dot] com\r
- www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
- Permission to use, copy, modify, and distribute this software\r
- and its documentation for any purpose and without fee is hereby\r
- granted, provided that the above copyright notice appear in all\r
- copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting\r
- documentation, and that the name of the author not be used in\r
- advertising or publicity pertaining to distribution of the\r
- software without specific, written prior permission.\r
-\r
- The author disclaim all warranties with regard to this\r
- software, including all implied warranties of merchantability\r
- and fitness. In no event shall the author be liable for any\r
- special, indirect or consequential damages or any damages\r
- whatsoever resulting from loss of use, data or profits, whether\r
- in an action of contract, negligence or other tortious action,\r
- arising out of or in connection with the use or performance of\r
- this software.\r
-*/\r
-\r
-#include "BluetoothHCICommands.h"\r
-\r
-static Bluetooth_HCICommand_Header_t HCICommandHeader;\r
-static Bluetooth_HCIEvent_Header_t HCIEventHeader;\r
-\r
- uint8_t Bluetooth_HCIProcessingState;\r
-static uint8_t Bluetooth_TempDeviceAddress[6];\r
-\r
-static uint8_t Bluetooth_SendHCICommand(void* Parameters, uint8_t ParamLength)\r
-{\r
- uint8_t CommandBuffer[sizeof(HCICommandHeader) + HCICommandHeader.ParameterLength];\r
-\r
- USB_ControlRequest = (USB_Request_Header_t)\r
- {\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_DEVICE),\r
- bRequest: 0,\r
- wValue: 0,\r
- wIndex: 0,\r
- wLength: sizeof(CommandBuffer)\r
- };\r
- \r
- memset(CommandBuffer, 0x00, sizeof(CommandBuffer));\r
- memcpy(CommandBuffer, &HCICommandHeader, sizeof(HCICommandHeader));\r
- \r
- if (ParamLength)\r
- memcpy(&CommandBuffer[sizeof(HCICommandHeader)], Parameters, ParamLength);\r
-\r
- Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
-\r
- return USB_Host_SendControlRequest(CommandBuffer);\r
-}\r
-\r
-static bool Bluetooth_GetNextHCIEventHeader(void)\r
-{\r
- Pipe_SelectPipe(BLUETOOTH_EVENTS_PIPE);\r
- Pipe_Unfreeze();\r
- \r
- if (!(Pipe_IsReadWriteAllowed()))\r
- {\r
- Pipe_Freeze();\r
- return false;\r
- }\r
- \r
- Pipe_Read_Stream_LE(&HCIEventHeader, sizeof(HCIEventHeader));\r
- \r
- Pipe_Freeze();\r
-\r
- return true;\r
-}\r
-\r
-static void Bluetooth_DiscardRemainingHCIEventParameters(void)\r
-{\r
- Pipe_SelectPipe(BLUETOOTH_EVENTS_PIPE);\r
- \r
- Pipe_Unfreeze();\r
- Pipe_Discard_Stream(HCIEventHeader.ParameterLength);\r
- Pipe_ClearIN();\r
- Pipe_Freeze();\r
-}\r
-\r
-void Bluetooth_ProcessHCICommands(void)\r
-{\r
- uint8_t ErrorCode;\r
-\r
- switch (Bluetooth_HCIProcessingState)\r
- {\r
- case Bluetooth_Init:\r
- Pipe_SelectPipe(BLUETOOTH_EVENTS_PIPE);\r
- \r
- memset(&Bluetooth_Connection, 0x00, sizeof(Bluetooth_Connection));\r
- \r
- Bluetooth_HCIProcessingState = Bluetooth_Init_Reset; \r
- break;\r
- case Bluetooth_Init_Reset:\r
- HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
- {\r
- OpCode: {OGF: OGF_CTRLR_BASEBAND, OCF: OCF_CTRLR_BASEBAND_RESET},\r
- ParameterLength: 0,\r
- };\r
- \r
- BT_DEBUG("(HCI) Enter State: Bluetooth_Init_Reset", NULL);\r
-\r
- ErrorCode = Bluetooth_SendHCICommand(NULL, 0);\r
-\r
- do\r
- {\r
- while (!(Bluetooth_GetNextHCIEventHeader()));\r
- Bluetooth_DiscardRemainingHCIEventParameters();\r
- } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
-\r
- Bluetooth_HCIProcessingState = Bluetooth_Init_ReadBufferSize;\r
- break;\r
- case Bluetooth_Init_ReadBufferSize:\r
- HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
- {\r
- OpCode: {OGF: OGF_CTRLR_INFORMATIONAL, OCF: OGF_CTRLR_INFORMATIONAL_READBUFFERSIZE},\r
- ParameterLength: 0,\r
- };\r
- \r
- BT_DEBUG("(HCI) Enter State: Bluetooth_Init_ReadBufferSize", NULL);\r
-\r
- ErrorCode = Bluetooth_SendHCICommand(NULL, 0);\r
-\r
- do\r
- {\r
- while (!(Bluetooth_GetNextHCIEventHeader()));\r
- Bluetooth_DiscardRemainingHCIEventParameters();\r
- } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
-\r
- Bluetooth_HCIProcessingState = Bluetooth_Init_SetEventMask; \r
- break;\r
- case Bluetooth_Init_SetEventMask:\r
- HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
- {\r
- OpCode: {OGF: OGF_CTRLR_BASEBAND, OCF: OCF_CTRLR_BASEBAND_SET_EVENT_MASK},\r
- ParameterLength: 8,\r
- };\r
- \r
- BT_DEBUG("(HCI) Enter State: Bluetooth_Init_SetEventMask", NULL);\r
- \r
- uint8_t EventMask[8] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};\r
- ErrorCode = Bluetooth_SendHCICommand(&EventMask, 8);\r
-\r
- BT_DEBUG("(HCI) -- Event mask: 0x%02X%02X%02X%02X%02X%02X%02X%02X", EventMask[7], EventMask[6], EventMask[5], EventMask[4],\r
- EventMask[3], EventMask[2], EventMask[1], EventMask[0]);\r
- do\r
- {\r
- while (!(Bluetooth_GetNextHCIEventHeader()));\r
- Bluetooth_DiscardRemainingHCIEventParameters();\r
- } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
- \r
-\r
- Bluetooth_HCIProcessingState = Bluetooth_Init_SetLocalName; \r
- break;\r
- case Bluetooth_Init_SetLocalName:\r
- HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
- {\r
- OpCode: {OGF: OGF_CTRLR_BASEBAND, OCF: OCF_CTRLR_BASEBAND_WRITE_LOCAL_NAME},\r
- ParameterLength: 248,\r
- };\r
-\r
- BT_DEBUG("(HCI) Enter State: Bluetooth_Init_SetLocalName", NULL);\r
- BT_DEBUG("(HCI) -- Name: %s", Bluetooth_DeviceConfiguration.Name);\r
-\r
- ErrorCode = Bluetooth_SendHCICommand(Bluetooth_DeviceConfiguration.Name, strlen(Bluetooth_DeviceConfiguration.Name));\r
- \r
- do\r
- {\r
- while (!(Bluetooth_GetNextHCIEventHeader()));\r
- Bluetooth_DiscardRemainingHCIEventParameters();\r
- } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
- \r
- Bluetooth_HCIProcessingState = Bluetooth_Init_SetDeviceClass;\r
- break;\r
- case Bluetooth_Init_SetDeviceClass:\r
- HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
- {\r
- OpCode: {OGF: OGF_CTRLR_BASEBAND, OCF: OCF_CTRLR_BASEBAND_WRITE_CLASS_OF_DEVICE},\r
- ParameterLength: 3,\r
- };\r
-\r
- BT_DEBUG("(HCI) Enter State: Bluetooth_Init_SetDeviceClass", NULL);\r
-\r
- ErrorCode = Bluetooth_SendHCICommand(&Bluetooth_DeviceConfiguration.Class, 3);\r
-\r
- do\r
- {\r
- while (!(Bluetooth_GetNextHCIEventHeader()));\r
- Bluetooth_DiscardRemainingHCIEventParameters();\r
- } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
-\r
- Bluetooth_HCIProcessingState = Bluetooth_Init_WriteScanEnable; \r
- break;\r
- case Bluetooth_Init_WriteScanEnable:\r
- HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
- {\r
- OpCode: {OGF: OGF_CTRLR_BASEBAND, OCF: OCF_CTRLR_BASEBAND_WRITE_SCAN_ENABLE},\r
- ParameterLength: 1,\r
- };\r
- \r
- BT_DEBUG("(HCI) Enter State: Bluetooth_Init_WriteScanEnable", NULL);\r
-\r
- uint8_t Interval = InquiryAndPageScans;\r
- ErrorCode = Bluetooth_SendHCICommand(&Interval, 1);\r
-\r
- do\r
- {\r
- while (!(Bluetooth_GetNextHCIEventHeader()));\r
- Bluetooth_DiscardRemainingHCIEventParameters();\r
- } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
-\r
- Bluetooth_HCIProcessingState = Bluetooth_PrepareToProcessEvents;\r
- break;\r
- case Bluetooth_PrepareToProcessEvents:\r
- BT_DEBUG("(HCI) Enter State: Bluetooth_ProcessEvents", NULL);\r
-\r
- Bluetooth_HCIProcessingState = Bluetooth_ProcessEvents;\r
- break;\r
- case Bluetooth_ProcessEvents:\r
- if (Bluetooth_GetNextHCIEventHeader())\r
- {\r
- BT_DEBUG("(HCI) Event Code: 0x%02X", HCIEventHeader.EventCode);\r
- \r
- if (HCIEventHeader.EventCode == EVENT_COMMAND_STATUS)\r
- {\r
- Bluetooth_HCIEvent_CommandStatus_Header_t CommandStatusHeader;\r
-\r
- Pipe_Read_Stream_LE(&CommandStatusHeader, sizeof(CommandStatusHeader));\r
- HCIEventHeader.ParameterLength -= sizeof(CommandStatusHeader);\r
- \r
- BT_DEBUG("(HCI) >> Command status: 0x%02X", CommandStatusHeader.CommandStatus);\r
- \r
- if (CommandStatusHeader.CommandStatus)\r
- Bluetooth_HCIProcessingState = Bluetooth_Init;\r
- }\r
- else if (HCIEventHeader.EventCode == EVENT_CONNECTION_REQUEST)\r
- {\r
- Bluetooth_HCIEvent_ConnectionRequest_Header_t ConnectionRequestParams;\r
- \r
- Pipe_Read_Stream_LE(&ConnectionRequestParams, sizeof(ConnectionRequestParams));\r
- HCIEventHeader.ParameterLength -= sizeof(ConnectionRequestParams);\r
-\r
- BT_DEBUG("(HCI) >> Connection Request from device %02X:%02X:%02X:%02X:%02X:%02X",\r
- ConnectionRequestParams.RemoteAddress[5], ConnectionRequestParams.RemoteAddress[4], \r
- ConnectionRequestParams.RemoteAddress[3], ConnectionRequestParams.RemoteAddress[2], \r
- ConnectionRequestParams.RemoteAddress[1], ConnectionRequestParams.RemoteAddress[0]);\r
- BT_DEBUG("(HCI) -- Device Class: 0x%02X%04X", ConnectionRequestParams.ClassOfDevice_Service,\r
- ConnectionRequestParams.ClassOfDevice_MajorMinor);\r
- BT_DEBUG("(HCI) -- Link Type: 0x%02x", ConnectionRequestParams.LinkType);\r
- \r
- memcpy(Bluetooth_TempDeviceAddress, ConnectionRequestParams.RemoteAddress,\r
- sizeof(Bluetooth_TempDeviceAddress));\r
-\r
- Bluetooth_HCIProcessingState = (Bluetooth_Connection.IsConnected) ? Bluetooth_Conn_RejectConnection :\r
- Bluetooth_Conn_AcceptConnection;\r
- }\r
- else if (HCIEventHeader.EventCode == EVENT_DISCONNECTION_COMPLETE)\r
- {\r
- BT_DEBUG("(HCI) >> Disconnection from device complete.", NULL);\r
- Bluetooth_HCIProcessingState = Bluetooth_Init;\r
- }\r
- else if (HCIEventHeader.EventCode == EVENT_CONNECTION_COMPLETE)\r
- {\r
- Bluetooth_HCIEvent_ConnectionComplete_Header_t ConnectionCompleteParams;\r
- \r
- Pipe_Read_Stream_LE(&ConnectionCompleteParams, sizeof(ConnectionCompleteParams));\r
- HCIEventHeader.ParameterLength -= sizeof(ConnectionCompleteParams);\r
-\r
- BT_DEBUG("(HCI) >> Connection to device complete.", NULL);\r
- BT_DEBUG("(HCI) -- Status: %d", ConnectionCompleteParams.Status);\r
- BT_DEBUG("(HCI) -- Handle: %d", ConnectionCompleteParams.ConnectionHandle);\r
- \r
- if (ConnectionCompleteParams.Status == 0x00)\r
- {\r
- memcpy(Bluetooth_Connection.DeviceAddress, ConnectionCompleteParams.RemoteAddress,\r
- sizeof(Bluetooth_Connection.DeviceAddress));\r
- Bluetooth_Connection.ConnectionHandle = ConnectionCompleteParams.ConnectionHandle;\r
- Bluetooth_Connection.IsConnected = true;\r
- }\r
- }\r
- else if (HCIEventHeader.EventCode == EVENT_PIN_CODE_REQUEST)\r
- {\r
- Pipe_Read_Stream_LE(&Bluetooth_TempDeviceAddress, sizeof(Bluetooth_TempDeviceAddress));\r
- HCIEventHeader.ParameterLength -= sizeof(Bluetooth_TempDeviceAddress);\r
-\r
- BT_DEBUG("(HCI) >> PIN code Request from device %02X:%02X:%02X:%02X:%02X:%02X", \r
- Bluetooth_TempDeviceAddress[5], Bluetooth_TempDeviceAddress[4], Bluetooth_TempDeviceAddress[3],\r
- Bluetooth_TempDeviceAddress[2], Bluetooth_TempDeviceAddress[1], Bluetooth_TempDeviceAddress[0]);\r
- \r
- Bluetooth_HCIProcessingState = Bluetooth_Conn_SendPINCode;\r
- }\r
- \r
- BT_DEBUG("(HCI) -- Unread Event Param Length: %d", HCIEventHeader.ParameterLength);\r
-\r
- Bluetooth_DiscardRemainingHCIEventParameters();\r
- }\r
-\r
- break;\r
- case Bluetooth_Conn_AcceptConnection:\r
- HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
- {\r
- OpCode: {OGF: OGF_LINK_CONTROL, OCF: OCF_LINK_CONTROL_ACCEPT_CONNECTION_REQUEST},\r
- ParameterLength: sizeof(Bluetooth_HCICommand_AcceptConnectionRequest_Params_t),\r
- };\r
- \r
- BT_DEBUG("(HCI) Enter State: Bluetooth_Conn_AcceptConnection", NULL);\r
-\r
- Bluetooth_HCICommand_AcceptConnectionRequest_Params_t AcceptConnectionParams;\r
- \r
- memcpy(AcceptConnectionParams.RemoteAddress, Bluetooth_TempDeviceAddress,\r
- sizeof(Bluetooth_TempDeviceAddress));\r
- AcceptConnectionParams.SlaveRole = true;\r
-\r
- Bluetooth_SendHCICommand(&AcceptConnectionParams, sizeof(AcceptConnectionParams));\r
- \r
- Bluetooth_HCIProcessingState = Bluetooth_PrepareToProcessEvents;\r
- break;\r
- case Bluetooth_Conn_RejectConnection:\r
- HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
- {\r
- OpCode: {OGF: OGF_LINK_CONTROL, OCF: OCF_LINK_CONTROL_ACCEPT_CONNECTION_REQUEST},\r
- ParameterLength: sizeof(Bluetooth_HCICommand_RejectConnectionRequest_Params_t),\r
- };\r
- \r
- BT_DEBUG("(HCI) Enter State: Bluetooth_Conn_RejectConnection", NULL);\r
-\r
- Bluetooth_HCICommand_RejectConnectionRequest_Params_t RejectConnectionParams;\r
-\r
- memcpy(RejectConnectionParams.RemoteAddress, Bluetooth_TempDeviceAddress,\r
- sizeof(Bluetooth_TempDeviceAddress));\r
- RejectConnectionParams.Reason = ERROR_LIMITED_RESOURCES;\r
-\r
- Bluetooth_SendHCICommand(&AcceptConnectionParams, sizeof(AcceptConnectionParams));\r
- \r
- Bluetooth_HCIProcessingState = Bluetooth_PrepareToProcessEvents;\r
- break;\r
- case Bluetooth_Conn_SendPINCode:\r
- HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
- {\r
- OpCode: {OGF: OGF_LINK_CONTROL, OCF: OCF_LINK_CONTROL_PIN_CODE_REQUEST_REPLY},\r
- ParameterLength: sizeof(Bluetooth_HCICommand_PinCodeResponse_Params_t),\r
- };\r
- \r
- BT_DEBUG("(HCI) Enter State: Bluetooth_Conn_SendPINCode", NULL);\r
- BT_DEBUG("(HCI) -- PIN: %s", Bluetooth_DeviceConfiguration.PINCode);\r
-\r
- Bluetooth_HCICommand_PinCodeResponse_Params_t PINCodeRequestParams;\r
- \r
- memcpy(PINCodeRequestParams.RemoteAddress, Bluetooth_TempDeviceAddress,\r
- sizeof(Bluetooth_TempDeviceAddress));\r
- PINCodeRequestParams.PINCodeLength = strlen(Bluetooth_DeviceConfiguration.PINCode);\r
- memcpy(PINCodeRequestParams.PINCode, Bluetooth_DeviceConfiguration.PINCode,\r
- sizeof(Bluetooth_DeviceConfiguration.PINCode));\r
- \r
- Bluetooth_SendHCICommand(&PINCodeRequestParams, sizeof(PINCodeRequestParams));\r
- \r
- do\r
- {\r
- while (!(Bluetooth_GetNextHCIEventHeader()));\r
- Bluetooth_DiscardRemainingHCIEventParameters();\r
- } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
-\r
- Bluetooth_HCIProcessingState = Bluetooth_PrepareToProcessEvents;\r
- break;\r
- }\r
-}\r
+++ /dev/null
-/*\r
- LUFA Library\r
- Copyright (C) Dean Camera, 2009.\r
- \r
- dean [at] fourwalledcubicle [dot] com\r
- www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
- Permission to use, copy, modify, and distribute this software\r
- and its documentation for any purpose and without fee is hereby\r
- granted, provided that the above copyright notice appear in all\r
- copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting\r
- documentation, and that the name of the author not be used in\r
- advertising or publicity pertaining to distribution of the\r
- software without specific, written prior permission.\r
-\r
- The author disclaim all warranties with regard to this\r
- software, including all implied warranties of merchantability\r
- and fitness. In no event shall the author be liable for any\r
- special, indirect or consequential damages or any damages\r
- whatsoever resulting from loss of use, data or profits, whether\r
- in an action of contract, negligence or other tortious action,\r
- arising out of or in connection with the use or performance of\r
- this software.\r
-*/\r
-\r
-#ifndef _BLUETOOTH_HCICOMMANDS_H_\r
-#define _BLUETOOTH_HCICOMMANDS_H_\r
-\r
- /* Includes: */\r
- #include <avr/io.h>\r
- #include <string.h>\r
- #include <stdbool.h>\r
-\r
- #include <LUFA/Drivers/USB/USB.h>\r
-\r
- #include "BluetoothStack.h"\r
- #include "BluetoothClassCodes.h"\r
-\r
- /* Macros: */\r
- #define OGF_LINK_CONTROL 0x01\r
- #define OGF_CTRLR_BASEBAND 0x03\r
- #define OGF_CTRLR_INFORMATIONAL 0x04\r
-\r
- #define OCF_LINK_CONTROL_INQUIRY 0x0001\r
- #define OCF_LINK_CONTROL_INQUIRY_CANCEL 0x0002\r
- #define OCF_LINK_CONTROL_PERIODIC_INQUIRY 0x0003\r
- #define OCF_LINK_CONTROL_EXIT_PERIODIC_INQUIRY 0x0004\r
- #define OCF_LINK_CONTROL_CREATE_CONNECTION 0x0005\r
- #define OCF_LINK_CONTROL_DISCONNECT 0x0006\r
- #define OCF_LINK_CONTROL_CREATE_CONNECTION_CANCEL 0x0008\r
- #define OCF_LINK_CONTROL_ACCEPT_CONNECTION_REQUEST 0x0009\r
- #define OCF_LINK_CONTROL_REJECT_CONNECTION_REQUEST 0x000A\r
- #define OCF_LINK_CONTROL_LINK_KEY_REQUEST_REPLY 0x000B\r
- #define OCF_LINK_CONTROL_LINK_KEY_REQUEST_NEG_REPLY 0x000C\r
- #define OCF_LINK_CONTROL_PIN_CODE_REQUEST_REPLY 0x000D\r
- #define OCF_LINK_CONTROL_PIN_CODE_REQUEST_NEG_REPLY 0x000E\r
- #define OCF_LINK_CONTROL_CHANGE_CONNECTION_PACKET_TYPE 0x000F\r
- #define OCF_LINK_CONTROL_REMOTE_NAME_REQUEST 0x0019\r
- #define OCF_CTRLR_BASEBAND_SET_EVENT_MASK 0x0001\r
- #define OCF_CTRLR_BASEBAND_RESET 0x0003\r
- #define OCF_CTRLR_BASEBAND_WRITE_PIN_TYPE 0x000A\r
- #define OCF_CTRLR_BASEBAND_WRITE_LOCAL_NAME 0x0013\r
- #define OCF_CTRLR_BASEBAND_READ_LOCAL_NAME 0x0014\r
- #define OCF_CTRLR_BASEBAND_WRITE_SCAN_ENABLE 0x001A\r
- #define OCF_CTRLR_BASEBAND_WRITE_CLASS_OF_DEVICE 0x0024\r
- #define OCF_CTRLR_BASEBAND_WRITE_SIMPLE_PAIRING_MODE 0x0056\r
- #define OCF_CTRLR_BASEBAND_WRITE_AUTHENTICATION_ENABLE 0x0020\r
- #define OGF_CTRLR_INFORMATIONAL_READBUFFERSIZE 0x0005\r
- \r
- #define EVENT_COMMAND_STATUS 0x0F\r
- #define EVENT_COMMAND_COMPLETE 0x0E\r
- #define EVENT_CONNECTION_COMPLETE 0x03\r
- #define EVENT_CONNECTION_REQUEST 0x04\r
- #define EVENT_DISCONNECTION_COMPLETE 0x05\r
- #define EVENT_REMOTE_NAME_REQUEST_COMPLETE 0x07\r
- #define EVENT_PIN_CODE_REQUEST 0x16\r
- \r
- #define ERROR_LIMITED_RESOURCES 0x0D\r
- \r
- /* Type Defines: */\r
- typedef struct\r
- {\r
- struct\r
- {\r
- int OCF : 10;\r
- int OGF : 6;\r
- } OpCode;\r
-\r
- uint8_t ParameterLength;\r
- uint8_t Parameters[];\r
- } Bluetooth_HCICommand_Header_t;\r
-\r
- typedef struct\r
- {\r
- uint8_t EventCode;\r
- uint8_t ParameterLength;\r
- } Bluetooth_HCIEvent_Header_t;\r
-\r
- typedef struct\r
- {\r
- uint8_t CommandStatus;\r
- uint8_t CommandPackets;\r
-\r
- struct\r
- {\r
- int OCF : 10;\r
- int OGF : 6;\r
- } OpCode;\r
- } Bluetooth_HCIEvent_CommandStatus_Header_t;\r
- \r
- typedef struct\r
- {\r
- uint8_t RemoteAddress[6];\r
- uint8_t ClassOfDevice_Service;\r
- uint16_t ClassOfDevice_MajorMinor;\r
- uint8_t LinkType;\r
- } Bluetooth_HCIEvent_ConnectionRequest_Header_t;\r
-\r
- typedef struct\r
- {\r
- uint8_t Status;\r
- uint16_t ConnectionHandle;\r
- uint8_t RemoteAddress[6];\r
- uint8_t LinkType;\r
- uint8_t EncryptionEnabled;\r
- } Bluetooth_HCIEvent_ConnectionComplete_Header_t;\r
- \r
- typedef struct\r
- {\r
- uint8_t RemoteAddress[6];\r
- uint8_t SlaveRole;\r
- } Bluetooth_HCICommand_AcceptConnectionRequest_Params_t;\r
- \r
- typedef struct\r
- {\r
- uint8_t RemoteAddress[6];\r
- uint8_t Reason;\r
- } Bluetooth_HCICommand_RejectConnectionRequest_Params_t;\r
-\r
- typedef struct\r
- {\r
- uint8_t RemoteAddress[6];\r
- uint8_t PINCodeLength;\r
- char PINCode[16];\r
- } Bluetooth_HCICommand_PinCodeResponse_Params_t;\r
- \r
- /* Enums: */\r
- enum Bluetooth_ScanEnable_Modes_t\r
- {\r
- NoScansEnabled = 0,\r
- InquiryScanOnly = 1,\r
- PageScanOnly = 2,\r
- InquiryAndPageScans = 3,\r
- };\r
-\r
- enum BluetoothStack_States_t\r
- {\r
- Bluetooth_Init = 0,\r
- Bluetooth_Init_Reset = 1,\r
- Bluetooth_Init_ReadBufferSize = 2,\r
- Bluetooth_Init_SetEventMask = 3,\r
- Bluetooth_Init_SetLocalName = 4,\r
- Bluetooth_Init_SetDeviceClass = 5,\r
- Bluetooth_Init_WriteScanEnable = 6,\r
- Bluetooth_PrepareToProcessEvents = 7,\r
- Bluetooth_ProcessEvents = 8,\r
- Bluetooth_Conn_AcceptConnection = 9,\r
- Bluetooth_Conn_RejectConnection = 10,\r
- Bluetooth_Conn_SendPINCode = 11,\r
- };\r
- \r
- /* External Variables: */\r
- extern uint8_t Bluetooth_HCIProcessingState;\r
-\r
- /* Function Prototypes: */\r
- void Bluetooth_ProcessHCICommands(void);\r
-\r
- #if defined(INCLUDE_FROM_BLUETOOTHHCICOMMANDS_C)\r
- static uint8_t Bluetooth_SendHCICommand(void* Parameters, uint8_t ParamLength);\r
- static bool Bluetooth_GetNextHCIEventHeader(void);\r
- static void Bluetooth_DiscardRemainingHCIEventParameters(void);\r
- static void Bluetooth_ProcessHCICommands(void);\r
- #endif\r
- \r
-#endif\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
\r
- /* Startup message */\r
puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY\r
"Bluetooth Host Demo running.\r\n" ESC_INVERSE_OFF));\r
\r
{\r
puts_P(PSTR(ESC_BG_RED "Dev Enum Error\r\n"));\r
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);\r
+ printf_P(PSTR(" -- Sub Error Code %d\r\n"), SubErrorCode);\r
printf_P(PSTR(" -- In State %d\r\n"), USB_HostState);\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
#include <avr/power.h>\r
#include <stdio.h>\r
\r
- #include "BluetoothStack.h"\r
+ #include "Lib/BluetoothStack.h"\r
\r
#include "DeviceDescriptor.h"\r
#include "ConfigDescriptor.h"\r
+++ /dev/null
-/*\r
- LUFA Library\r
- Copyright (C) Dean Camera, 2009.\r
- \r
- dean [at] fourwalledcubicle [dot] com\r
- www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
- Permission to use, copy, modify, and distribute this software\r
- and its documentation for any purpose and without fee is hereby\r
- granted, provided that the above copyright notice appear in all\r
- copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting\r
- documentation, and that the name of the author not be used in\r
- advertising or publicity pertaining to distribution of the\r
- software without specific, written prior permission.\r
-\r
- The author disclaim all warranties with regard to this\r
- software, including all implied warranties of merchantability\r
- and fitness. In no event shall the author be liable for any\r
- special, indirect or consequential damages or any damages\r
- whatsoever resulting from loss of use, data or profits, whether\r
- in an action of contract, negligence or other tortious action,\r
- arising out of or in connection with the use or performance of\r
- this software.\r
-*/\r
-\r
-#include "BluetoothStack.h"\r
-\r
-Bluetooth_Connection_t Bluetooth_Connection = {IsConnected: false};\r
-\r
-Bluetooth_Device_t Bluetooth_DeviceConfiguration ATTR_WEAK =\r
- {\r
- Class: DEVICE_CLASS_MAJOR_MISC,\r
- PINCode: "0000",\r
- Name: "LUFA BT Device"\r
- };\r
-\r
-void Bluetooth_Stack_Task(void)\r
-{\r
- if (!(USB_IsConnected) || (USB_HostState != HOST_STATE_Ready))\r
- Bluetooth_HCIProcessingState = Bluetooth_Init;\r
- \r
- Bluetooth_ProcessHCICommands();\r
- Bluetooth_ProcessACLPackets();\r
-}\r
-\r
-Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource)\r
-{\r
- Bluetooth_Channel_t* CurrentChannelStructure;\r
-\r
- for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)\r
- {\r
- CurrentChannelStructure = &Bluetooth_Connection.Channels[i];\r
- \r
- uint16_t CurrentChannelNumber = ((SearchBySource) ? CurrentChannelStructure->RemoteNumber : CurrentChannelStructure->LocalNumber);\r
- \r
- if (CurrentChannelNumber == ChannelNumber)\r
- return CurrentChannelStructure;\r
- }\r
-\r
- return NULL;\r
-}\r
-\r
-Bluetooth_Channel_t* Bluetooth_InitChannelData(uint16_t RemoteChannelNumber, uint16_t PSM)\r
-{\r
- Bluetooth_Channel_t* CurrentChannelStructure;\r
-\r
- for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)\r
- {\r
- CurrentChannelStructure = &Bluetooth_Connection.Channels[i];\r
- \r
- if (CurrentChannelStructure->State == Channel_Closed)\r
- {\r
- CurrentChannelStructure->RemoteNumber = RemoteChannelNumber;\r
- CurrentChannelStructure->LocalNumber = (BLUETOOTH_CHANNELNUMBER_BASEOFFSET + i);\r
- CurrentChannelStructure->PSM = PSM;\r
- CurrentChannelStructure->State = Channel_Config;\r
- \r
- return CurrentChannelStructure;\r
- } \r
- }\r
-\r
- return NULL;\r
-}\r
+++ /dev/null
-/*\r
- LUFA Library\r
- Copyright (C) Dean Camera, 2009.\r
- \r
- dean [at] fourwalledcubicle [dot] com\r
- www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
- Permission to use, copy, modify, and distribute this software\r
- and its documentation for any purpose and without fee is hereby\r
- granted, provided that the above copyright notice appear in all\r
- copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting\r
- documentation, and that the name of the author not be used in\r
- advertising or publicity pertaining to distribution of the\r
- software without specific, written prior permission.\r
-\r
- The author disclaim all warranties with regard to this\r
- software, including all implied warranties of merchantability\r
- and fitness. In no event shall the author be liable for any\r
- special, indirect or consequential damages or any damages\r
- whatsoever resulting from loss of use, data or profits, whether\r
- in an action of contract, negligence or other tortious action,\r
- arising out of or in connection with the use or performance of\r
- this software.\r
-*/\r
-\r
-#ifndef _BLUETOOTH_STACK_\r
-#define _BLUETOOTH_STACK_\r
-\r
- /* Includes: */\r
- #include <LUFA/Drivers/USB/USB.h>
- \r
- #include "BluetoothHost.h"\r
- #include "BluetoothHCICommands.h"\r
- #include "BluetoothACLPackets.h"\r
- \r
- /* Macros: */\r
- #define BLUETOOTH_MAX_OPEN_CHANNELS 2\r
- #define BLUETOOTH_CHANNELNUMBER_BASEOFFSET 0x0040\r
- \r
- #define CHANNEL_LOOKUP_BY_SOURCE true\r
- #define CHANNEL_LOOKUP_BY_DESTINATION false\r
- \r
- #define BT_DEBUG(s, ...) printf_P(PSTR(s "\r\n"), __VA_ARGS__)\r
- \r
- /* Enums: */\r
- enum Bluetooth_Channel_State_t\r
- {\r
- Channel_Closed = 0,\r
- Channel_WaitConnect = 1,\r
- Channel_WaitConnectRsp = 2,\r
- Channel_Config = 3,\r
- Channel_Open = 4,\r
- Channel_WaitDisconnect = 5,\r
- };\r
-\r
- /* Type Defines: */\r
- typedef struct\r
- {\r
- uint8_t State;\r
- uint16_t LocalNumber;\r
- uint16_t RemoteNumber;\r
- uint16_t PSM;\r
- uint16_t MTU;\r
- } Bluetooth_Channel_t;\r
-\r
- typedef struct\r
- {\r
- bool IsConnected;\r
- uint16_t ConnectionHandle;\r
- uint8_t DeviceAddress[6];\r
- Bluetooth_Channel_t Channels[BLUETOOTH_MAX_OPEN_CHANNELS];\r
- } Bluetooth_Connection_t;\r
- \r
- typedef struct\r
- {\r
- uint32_t Class;\r
- char PINCode[16];\r
- char Name[];\r
- } Bluetooth_Device_t;\r
- \r
- /* Function Prototypes: */\r
- Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource);\r
- Bluetooth_Channel_t* Bluetooth_InitChannelData(uint16_t RemoteChannelNumber, uint16_t PSM);\r
- \r
- void Bluetooth_Stack_Task(void);\r
-\r
- /* External Variables: */\r
- extern Bluetooth_Device_t Bluetooth_DeviceConfiguration;\r
- extern Bluetooth_Connection_t Bluetooth_Connection;\r
-\r
-#endif\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+#define INCLUDE_FROM_BLUETOOTH_ACLPACKETS_C\r
+#include "BluetoothACLPackets.h"\r
+\r
+void Bluetooth_ProcessACLPackets(void)\r
+{\r
+ Bluetooth_ACL_Header_t ACLPacketHeader;\r
+ Bluetooth_DataPacket_Header_t DataHeader;\r
+\r
+ Pipe_SelectPipe(BLUETOOTH_DATA_IN_PIPE);\r
+ Pipe_SetToken(PIPE_TOKEN_IN);\r
+ Pipe_Unfreeze();\r
+ \r
+ if (!(Pipe_IsReadWriteAllowed()))\r
+ {\r
+ Pipe_Freeze();\r
+ return;\r
+ }\r
+ \r
+ Pipe_Read_Stream_LE(&ACLPacketHeader, sizeof(ACLPacketHeader));\r
+ Pipe_Read_Stream_LE(&DataHeader, sizeof(DataHeader));\r
+\r
+ BT_DEBUG("(ACL) Packet Received", NULL);\r
+ BT_DEBUG("(ACL) -- Connection Handle: 0x%04X", ACLPacketHeader.ConnectionHandle);\r
+ BT_DEBUG("(ACL) -- Data Length: 0x%04X", ACLPacketHeader.DataLength);\r
+ BT_DEBUG("(ACL) -- Destination Channel: 0x%04X", DataHeader.DestinationChannel);\r
+ BT_DEBUG("(ACL) -- Payload Length: 0x%04X", DataHeader.PayloadLength);\r
+\r
+ if (DataHeader.DestinationChannel == BLUETOOTH_CHANNEL_SIGNALING)\r
+ {\r
+ Bluetooth_SignalCommand_Header_t SignalCommandHeader;\r
+ Pipe_Read_Stream_LE(&SignalCommandHeader, sizeof(SignalCommandHeader));\r
+\r
+ switch (SignalCommandHeader.Code)\r
+ {\r
+ case BLUETOOTH_SIGNAL_CONNECTION_REQUEST:\r
+ Bluetooth_ProcessSignalPacket_ConnectionRequest(&ACLPacketHeader, &DataHeader, &SignalCommandHeader);\r
+ break;\r
+ case BLUETOOTH_SIGNAL_CONFIGURATION_REQUEST:\r
+ Bluetooth_ProcessSignalPacket_ConfigurationRequest(&ACLPacketHeader, &DataHeader, &SignalCommandHeader);\r
+ break;\r
+ case BLUETOOTH_SIGNAL_INFORMATION_REQUEST:\r
+ BT_DEBUG("(ACL) -- Information Request, Discarded");\r
+\r
+ Pipe_Discard_Stream(ACLPacketHeader.DataLength);\r
+ Pipe_ClearIN(); \r
+ Pipe_Freeze();\r
+ break;\r
+ default:\r
+ BT_DEBUG("(ACL) >> Unknown Signalling Command 0x%02X", SignalCommandHeader.Code);\r
+ \r
+ Pipe_Discard_Stream(ACLPacketHeader.DataLength);\r
+ Pipe_ClearIN(); \r
+ Pipe_Freeze();\r
+ break;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ uint8_t DataPayload[DataHeader.PayloadLength];\r
+ Pipe_Read_Stream_LE(&DataPayload, sizeof(DataPayload));\r
+ DataHeader.PayloadLength = 0;\r
+ \r
+ BT_DEBUG("(ACL) -- Data Payload: ", NULL);\r
+ for (uint16_t B = 0; B < sizeof(DataPayload); B++)\r
+ printf("0x%02X ", DataPayload[B]);\r
+ BT_DEBUG("", NULL);\r
+\r
+ Pipe_Discard_Stream(ACLPacketHeader.DataLength);\r
+ Pipe_ClearIN(); \r
+ Pipe_Freeze();\r
+ }\r
+}\r
+\r
+static inline void Bluetooth_ProcessSignalPacket_ConnectionRequest(Bluetooth_ACL_Header_t* ACLPacketHeader,\r
+ Bluetooth_DataPacket_Header_t* DataHeader,\r
+ Bluetooth_SignalCommand_Header_t* SignalCommandHeader)\r
+{\r
+ Bluetooth_SignalCommand_ConnectionRequest_t ConnectionRequest;\r
+ \r
+ Pipe_Read_Stream_LE(&ConnectionRequest, sizeof(ConnectionRequest));\r
+\r
+ BT_DEBUG("(ACL) >> L2CAP Connection Request", NULL);\r
+ BT_DEBUG("(ACL) -- PSM: 0x%04X", ConnectionRequest.PSM);\r
+ BT_DEBUG("(ACL) -- Source Channel: 0x%04X", ConnectionRequest.SourceChannel);\r
+ \r
+ Pipe_ClearIN();\r
+ Pipe_Freeze();\r
+ Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE);\r
+ Pipe_SetToken(PIPE_TOKEN_OUT);\r
+ Pipe_Unfreeze();\r
+ \r
+ Bluetooth_SignalCommand_ConnectionResponse_t ConnectionResponse;\r
+\r
+ ACLPacketHeader->DataLength = sizeof(*DataHeader) + sizeof(*SignalCommandHeader) + sizeof(ConnectionResponse);\r
+ DataHeader->PayloadLength = sizeof(*SignalCommandHeader) + sizeof(ConnectionResponse);\r
+ DataHeader->DestinationChannel = BLUETOOTH_CHANNEL_SIGNALING;\r
+ SignalCommandHeader->Code = BLUETOOTH_SIGNAL_CONNECTION_RESPONSE;\r
+ SignalCommandHeader->Length = sizeof(ConnectionResponse);\r
+ \r
+ Bluetooth_Channel_t* ChannelData = Bluetooth_InitChannelData(ConnectionRequest.SourceChannel, ConnectionRequest.PSM);\r
+ \r
+ ConnectionResponse.Result = (ChannelData == NULL) ? BLUETOOTH_CONNECTION_REFUSED_RESOURCES :\r
+ BLUETOOTH_CONNECTION_SUCCESSFUL;\r
+ ConnectionResponse.DestinationChannel = ChannelData->LocalNumber;\r
+ ConnectionResponse.SourceChannel = ChannelData->RemoteNumber;\r
+ ConnectionResponse.Status = 0x00;\r
+\r
+ Pipe_Write_Stream_LE(ACLPacketHeader, sizeof(*ACLPacketHeader));\r
+ Pipe_Write_Stream_LE(DataHeader, sizeof(*DataHeader));\r
+ Pipe_Write_Stream_LE(SignalCommandHeader, sizeof(*SignalCommandHeader));\r
+ Pipe_Write_Stream_LE(&ConnectionResponse, sizeof(ConnectionResponse));\r
+ \r
+ Pipe_ClearOUT(); \r
+ Pipe_Freeze();\r
+ \r
+ BT_DEBUG("(ACL) Packet Sent", NULL);\r
+ BT_DEBUG("(ACL) -- Connection Handle: 0x%04X", ACLPacketHeader->ConnectionHandle);\r
+ BT_DEBUG("(ACL) -- Data Length: 0x%04X", ACLPacketHeader->DataLength);\r
+ BT_DEBUG("(ACL) -- Destination Channel: 0x%04X", DataHeader->DestinationChannel);\r
+ BT_DEBUG("(ACL) -- Payload Length: 0x%04X", DataHeader->PayloadLength); \r
+ BT_DEBUG("(ACL) >> L2CAP Connection Response", NULL);\r
+ BT_DEBUG("(ACL) -- Source Channel: 0x%04X", ConnectionResponse.SourceChannel);\r
+ BT_DEBUG("(ACL) -- Destination Channel: 0x%04X", ConnectionResponse.DestinationChannel);\r
+}\r
+\r
+static inline void Bluetooth_ProcessSignalPacket_ConfigurationRequest(Bluetooth_ACL_Header_t* ACLPacketHeader,\r
+ Bluetooth_DataPacket_Header_t* DataHeader,\r
+ Bluetooth_SignalCommand_Header_t* SignalCommandHeader)\r
+{\r
+ Bluetooth_SignalCommand_ConfigurationRequest_t ConfigurationRequest;\r
+ \r
+ Pipe_Read_Stream_LE(&ConfigurationRequest, sizeof(ConfigurationRequest));\r
+\r
+ BT_DEBUG("(ACL) >> L2CAP Configuration Request", NULL);\r
+ BT_DEBUG("(ACL) -- Destination Channel: 0x%04X", ConfigurationRequest.DestinationChannel);\r
+ \r
+ Pipe_ClearIN();\r
+ Pipe_Freeze();\r
+ Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE);\r
+ Pipe_SetToken(PIPE_TOKEN_OUT);\r
+ Pipe_Unfreeze();\r
+ \r
+ Bluetooth_SignalCommand_ConfigurationResponse_t ConfigurationResponse;\r
+\r
+ ACLPacketHeader->DataLength = sizeof(*DataHeader) + sizeof(*SignalCommandHeader) + sizeof(ConfigurationResponse);\r
+ DataHeader->PayloadLength = sizeof(*SignalCommandHeader) + sizeof(ConfigurationResponse);\r
+ DataHeader->DestinationChannel = BLUETOOTH_CHANNEL_SIGNALING;\r
+ SignalCommandHeader->Code = BLUETOOTH_SIGNAL_CONFIGURATION_RESPONSE;\r
+ SignalCommandHeader->Length = sizeof(ConfigurationResponse);\r
+ \r
+ Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConfigurationRequest.DestinationChannel, CHANNEL_LOOKUP_BY_DESTINATION);\r
+\r
+ if (ChannelData != NULL)\r
+ ChannelData->State = Channel_Open;\r
+ \r
+ // TODO: Add channel config data to the tail of ConfigurationResponse\r
+\r
+ ConfigurationResponse.SourceChannel = ChannelData->RemoteNumber;\r
+ ConfigurationResponse.Flags = 0x00;\r
+ ConfigurationResponse.Result = (ChannelData != NULL) ? BLUETOOTH_CONFIGURATION_SUCCESSFUL : BLUETOOTH_CONFIGURATION_REJECTED;\r
+\r
+ Pipe_Write_Stream_LE(ACLPacketHeader, sizeof(*ACLPacketHeader));\r
+ Pipe_Write_Stream_LE(DataHeader, sizeof(*DataHeader));\r
+ Pipe_Write_Stream_LE(SignalCommandHeader, sizeof(*SignalCommandHeader));\r
+ Pipe_Write_Stream_LE(&ConfigurationResponse, sizeof(ConfigurationResponse));\r
+ \r
+ Pipe_ClearOUT(); \r
+ Pipe_Freeze();\r
+ \r
+ BT_DEBUG("(ACL) Packet Sent", NULL);\r
+ BT_DEBUG("(ACL) -- Connection Handle: 0x%04X", ACLPacketHeader->ConnectionHandle);\r
+ BT_DEBUG("(ACL) -- Data Length: 0x%04X", ACLPacketHeader->DataLength);\r
+ BT_DEBUG("(ACL) -- Destination Channel: 0x%04X", DataHeader->DestinationChannel);\r
+ BT_DEBUG("(ACL) -- Payload Length: 0x%04X", DataHeader->PayloadLength); \r
+ BT_DEBUG("(ACL) >> L2CAP Configuration Response", NULL);\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+#ifndef _BLUETOOTH_ACLPACKETS_\r
+#define _BLUETOOTH_ACLPACKETS_\r
+\r
+ /* Includes: */\r
+ #include <avr/io.h>\r
+ #include <string.h>\r
+ #include <stdbool.h>\r
+\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+ \r
+ #include "BluetoothStack.h"\r
+ \r
+ /* Macros: */\r
+ #define BLUETOOTH_CHANNEL_SIGNALING 0x0001\r
+ #define BLUETOOTH_CHANNEL_CONNECTIONLESS 0x0002\r
+ \r
+ #define BLUETOOTH_SIGNAL_CONNECTION_REQUEST 0x02\r
+ #define BLUETOOTH_SIGNAL_CONNECTION_RESPONSE 0x03\r
+ #define BLUETOOTH_SIGNAL_CONFIGURATION_REQUEST 0x04\r
+ #define BLUETOOTH_SIGNAL_CONFIGURATION_RESPONSE 0x05\r
+ #define BLUETOOTH_SIGNAL_INFORMATION_REQUEST 0x0A\r
+ \r
+ #define BLUETOOTH_CONNECTION_SUCCESSFUL 0x0000\r
+ #define BLUETOOTH_CONNECTION_REFUSED_RESOURCES 0x0004\r
+ \r
+ #define BLUETOOTH_CONFIGURATION_SUCCESSFUL 0x0000\r
+ #define BLUETOOTH_CONFIGURATION_REJECTED 0x0002\r
+ #define BLUETOOTH_CONFIGURATION_UNKNOWNOPTIONS 0x0003\r
+\r
+ \r
+ /* Type Defines: */\r
+ typedef struct\r
+ {\r
+ uint16_t ConnectionHandle;\r
+ uint16_t DataLength;\r
+ } Bluetooth_ACL_Header_t;\r
+\r
+ typedef struct\r
+ {\r
+ uint16_t PayloadLength;\r
+ uint16_t DestinationChannel;\r
+ } Bluetooth_DataPacket_Header_t;\r
+ \r
+ typedef struct\r
+ {\r
+ uint8_t Code;\r
+ uint8_t Identifier;\r
+ uint16_t Length;\r
+ } Bluetooth_SignalCommand_Header_t;\r
+ \r
+ typedef struct\r
+ {\r
+ uint16_t PSM;\r
+ uint16_t SourceChannel;\r
+ } Bluetooth_SignalCommand_ConnectionRequest_t;\r
+\r
+ typedef struct\r
+ {\r
+ uint16_t DestinationChannel;\r
+ uint16_t SourceChannel;\r
+ uint16_t Result;\r
+ uint16_t Status;\r
+ } Bluetooth_SignalCommand_ConnectionResponse_t;\r
+ \r
+ typedef struct\r
+ {\r
+ uint16_t DestinationChannel;\r
+ uint16_t Flags;\r
+ uint8_t Options[];\r
+ } Bluetooth_SignalCommand_ConfigurationRequest_t;\r
+\r
+ typedef struct\r
+ {\r
+ uint16_t SourceChannel;\r
+ uint16_t Flags;\r
+ uint16_t Result;\r
+ uint8_t Config;\r
+ } Bluetooth_SignalCommand_ConfigurationResponse_t;\r
+ \r
+ /* Function Prototypes: */\r
+ void Bluetooth_ProcessACLPackets(void);\r
+\r
+ #if defined(INCLUDE_FROM_BLUETOOTH_ACLPACKETS_C)\r
+ static inline void Bluetooth_ProcessSignalPacket_ConnectionRequest(Bluetooth_ACL_Header_t* ACLPacketHeader,\r
+ Bluetooth_DataPacket_Header_t* DataHeader,\r
+ Bluetooth_SignalCommand_Header_t* SignalCommandHeader);\r
+ static inline void Bluetooth_ProcessSignalPacket_ConfigurationRequest(Bluetooth_ACL_Header_t* ACLPacketHeader,\r
+ Bluetooth_DataPacket_Header_t* DataHeader,\r
+ Bluetooth_SignalCommand_Header_t* SignalCommandHeader);\r
+ #endif\r
+ \r
+#endif\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+#ifndef _BLUETOOTH_CLASS_CODES_H_\r
+#define _BLUETOOTH_CLASS_CODES_H_\r
+\r
+ /* Macros: */\r
+ #define DEVICE_CLASS_SERVICE_POSITIONING (1UL << 16)\r
+ #define DEVICE_CLASS_SERVICE_NETWORKING (1UL << 17)\r
+ #define DEVICE_CLASS_SERVICE_RENDERING (1UL << 18)\r
+ #define DEVICE_CLASS_SERVICE_CAPTURING (1UL << 19)\r
+ #define DEVICE_CLASS_SERVICE_OBJECTTRANSFER (1UL << 20)\r
+ #define DEVICE_CLASS_SERVICE_AUDIO (1UL << 21)\r
+ #define DEVICE_CLASS_SERVICE_TELEPHONY (1UL << 22)\r
+ #define DEVICE_CLASS_SERVICE_INFORMATION (1UL << 23)\r
+ \r
+ #define DEVICE_CLASS_MAJOR_MISC (0x00 << 8)\r
+ #define DEVICE_CLASS_MAJOR_COMPUTER (0x01 << 8)\r
+ #define DEVICE_CLASS_MAJOR_PHONE (0x02 << 8)\r
+ #define DEVICE_CLASS_MAJOR_LAN (0x03 << 8)\r
+ #define DEVICE_CLASS_MAJOR_AUDIOVIDEO (0x04 << 8)\r
+ #define DEVICE_CLASS_MAJOR_PERIPHERAL (0x05 << 8)\r
+ #define DEVICE_CLASS_MAJOR_IMAGING (0x06 << 8)\r
+ #define DEVICE_CLASS_MAJOR_UNCLASSIFIED (0x1F << 8)\r
+\r
+ #define DEVICE_CLASS_MINOR_COMPUTER_UNCATEGORIZED (0x00 << 2)\r
+ #define DEVICE_CLASS_MINOR_COMPUTER_DESKTOP (0x01 << 2)\r
+ #define DEVICE_CLASS_MINOR_COMPUTER_SERVER (0x02 << 2)\r
+ #define DEVICE_CLASS_MINOR_COMPUTER_LAPTOP (0x03 << 2)\r
+ #define DEVICE_CLASS_MINOR_COMPUTER_HANDHELD (0x04 << 2)\r
+ #define DEVICE_CLASS_MINOR_COMPUTER_PALM (0x05 << 2)\r
+ #define DEVICE_CLASS_MINOR_COMPUTER_WEARABLE (0x06 << 2)\r
+ \r
+ #define DEVICE_CLASS_MINOR_PHONE_UNCATEGORIZED (0x00 << 2)\r
+ #define DEVICE_CLASS_MINOR_PHONE_CELLULAR (0x01 << 2)\r
+ #define DEVICE_CLASS_MINOR_PHONE_CORDLESS (0x02 << 2)\r
+ #define DEVICE_CLASS_MINOR_PHONE_SMARTPHONE (0x03 << 2)\r
+ #define DEVICE_CLASS_MINOR_PHONE_WIREDMODEM (0x04 << 2)\r
+ #define DEVICE_CLASS_MINOR_PHONE_ISDN (0x05 << 2)\r
+\r
+ #define DEVICE_CLASS_MINOR_LAN_FULLY_AVAILABLE (0x00 << 5)\r
+ #define DEVICE_CLASS_MINOR_LAN_1_TO_17_PC_UTILIZED (0x01 << 5)\r
+ #define DEVICE_CLASS_MINOR_LAN_17_TO_33_PC_UTILIZED (0x02 << 5)\r
+ #define DEVICE_CLASS_MINOR_LAN_33_TO_50_PC_UTILIZED (0x03 << 5)\r
+ #define DEVICE_CLASS_MINOR_LAN_50_TO_67_PC_UTILIZED (0x04 << 5)\r
+ #define DEVICE_CLASS_MINOR_LAN_67_TO_83_PC_UTILIZED (0x05 << 5)\r
+ #define DEVICE_CLASS_MINOR_LAN_83_TO_99_PC_UTILIZED (0x06 << 5)\r
+ #define DEVICE_CLASS_MINOR_NO_SERVICE_AVAILABLE (0x07 << 5)\r
+ \r
+ #define DEVICE_CLASS_MINOR_AV_UNCATEGORIZED (0x00 << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_HEADSET (0x01 << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_HANDSFREE (0x02 << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_MICROPHONE (0x04 << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_LOUDSPEAKER (0x05 << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_HEADPHONES (0x06 << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_PORTABLE_AUDIO (0x07 << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_CARAUDIO (0x08 << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_SETTOP_BOX (0x09 << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_HIFI (0x0A << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_VCR (0x0B << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_VIDEO_CAMERA (0x0C << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_CAMCORDER (0x0D << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_VIDEO_MONITOR (0x0E << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_DISPLAY_AND_LOUDSPEAKER (0x0F << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_VIDEO_CONFERENCING (0x10 << 2)\r
+ #define DEVICE_CLASS_MINOR_AV_GAMING_TOY (0x12 << 2)\r
+ \r
+ #define DEVICE_CLASS_MINOR_PERIPHERAL_KEYBOARD (0x01 << 6)\r
+ #define DEVICE_CLASS_MINOR_PERIPHERAL_POINTING (0x02 << 6)\r
+ #define DEVICE_CLASS_MINOR_PERIPHERAL_COMBO (0x03 << 6)\r
+ #define DEVICE_CLASS_MINOR_PERIPHERAL_UNCATEGORIZED (0x00 << 2)\r
+ #define DEVICE_CLASS_MINOR_PERIPHERAL_JOYSTICK (0x01 << 2)\r
+ #define DEVICE_CLASS_MINOR_PERIPHERAL_GAMEPAD (0x02 << 2)\r
+ #define DEVICE_CLASS_MINOR_PERIPHERAL_REMOTE_CONTROL (0x03 << 2)\r
+ #define DEVICE_CLASS_MINOR_PERIPHERAL_SENSING_DEVICE (0x04 << 2)\r
+ #define DEVICE_CLASS_MINOR_PERIPHERAL_DIGITIZER (0x05 << 2)\r
+ #define DEVICE_CLASS_MINOR_PERIPHERAL_CARD_READER (0x06 << 2)\r
+\r
+ #define DEVICE_CLASS_MINOR_IMAGING_DISPLAY (1 << 4)\r
+ #define DEVICE_CLASS_MINOR_IMAGING_CAMERA (1 << 5)\r
+ #define DEVICE_CLASS_MINOR_IMAGING_SCANNER (1 << 6)\r
+ #define DEVICE_CLASS_MINOR_IMAGING_PRINTER (1 << 7)\r
+\r
+#endif\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+#include "BluetoothHCICommands.h"\r
+\r
+static Bluetooth_HCICommand_Header_t HCICommandHeader;\r
+static Bluetooth_HCIEvent_Header_t HCIEventHeader;\r
+\r
+ uint8_t Bluetooth_HCIProcessingState;\r
+static uint8_t Bluetooth_TempDeviceAddress[6];\r
+\r
+static uint8_t Bluetooth_SendHCICommand(void* Parameters, uint8_t ParamLength)\r
+{\r
+ uint8_t CommandBuffer[sizeof(HCICommandHeader) + HCICommandHeader.ParameterLength];\r
+\r
+ USB_ControlRequest = (USB_Request_Header_t)\r
+ {\r
+ bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_DEVICE),\r
+ bRequest: 0,\r
+ wValue: 0,\r
+ wIndex: 0,\r
+ wLength: sizeof(CommandBuffer)\r
+ };\r
+ \r
+ memset(CommandBuffer, 0x00, sizeof(CommandBuffer));\r
+ memcpy(CommandBuffer, &HCICommandHeader, sizeof(HCICommandHeader));\r
+ \r
+ if (ParamLength)\r
+ memcpy(&CommandBuffer[sizeof(HCICommandHeader)], Parameters, ParamLength);\r
+\r
+ Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
+\r
+ return USB_Host_SendControlRequest(CommandBuffer);\r
+}\r
+\r
+static bool Bluetooth_GetNextHCIEventHeader(void)\r
+{\r
+ Pipe_SelectPipe(BLUETOOTH_EVENTS_PIPE);\r
+ Pipe_Unfreeze();\r
+ \r
+ if (!(Pipe_IsReadWriteAllowed()))\r
+ {\r
+ Pipe_Freeze();\r
+ return false;\r
+ }\r
+ \r
+ Pipe_Read_Stream_LE(&HCIEventHeader, sizeof(HCIEventHeader));\r
+ \r
+ Pipe_Freeze();\r
+\r
+ return true;\r
+}\r
+\r
+static void Bluetooth_DiscardRemainingHCIEventParameters(void)\r
+{\r
+ Pipe_SelectPipe(BLUETOOTH_EVENTS_PIPE);\r
+ \r
+ Pipe_Unfreeze();\r
+ Pipe_Discard_Stream(HCIEventHeader.ParameterLength);\r
+ Pipe_ClearIN();\r
+ Pipe_Freeze();\r
+}\r
+\r
+void Bluetooth_ProcessHCICommands(void)\r
+{\r
+ uint8_t ErrorCode;\r
+\r
+ switch (Bluetooth_HCIProcessingState)\r
+ {\r
+ case Bluetooth_Init:\r
+ Pipe_SelectPipe(BLUETOOTH_EVENTS_PIPE);\r
+ \r
+ memset(&Bluetooth_Connection, 0x00, sizeof(Bluetooth_Connection));\r
+ \r
+ Bluetooth_HCIProcessingState = Bluetooth_Init_Reset; \r
+ break;\r
+ case Bluetooth_Init_Reset:\r
+ HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
+ {\r
+ OpCode: {OGF: OGF_CTRLR_BASEBAND, OCF: OCF_CTRLR_BASEBAND_RESET},\r
+ ParameterLength: 0,\r
+ };\r
+ \r
+ BT_DEBUG("(HCI) Enter State: Bluetooth_Init_Reset", NULL);\r
+\r
+ ErrorCode = Bluetooth_SendHCICommand(NULL, 0);\r
+\r
+ do\r
+ {\r
+ while (!(Bluetooth_GetNextHCIEventHeader()));\r
+ Bluetooth_DiscardRemainingHCIEventParameters();\r
+ } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
+\r
+ Bluetooth_HCIProcessingState = Bluetooth_Init_ReadBufferSize;\r
+ break;\r
+ case Bluetooth_Init_ReadBufferSize:\r
+ HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
+ {\r
+ OpCode: {OGF: OGF_CTRLR_INFORMATIONAL, OCF: OGF_CTRLR_INFORMATIONAL_READBUFFERSIZE},\r
+ ParameterLength: 0,\r
+ };\r
+ \r
+ BT_DEBUG("(HCI) Enter State: Bluetooth_Init_ReadBufferSize", NULL);\r
+\r
+ ErrorCode = Bluetooth_SendHCICommand(NULL, 0);\r
+\r
+ do\r
+ {\r
+ while (!(Bluetooth_GetNextHCIEventHeader()));\r
+ Bluetooth_DiscardRemainingHCIEventParameters();\r
+ } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
+\r
+ Bluetooth_HCIProcessingState = Bluetooth_Init_SetEventMask; \r
+ break;\r
+ case Bluetooth_Init_SetEventMask:\r
+ HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
+ {\r
+ OpCode: {OGF: OGF_CTRLR_BASEBAND, OCF: OCF_CTRLR_BASEBAND_SET_EVENT_MASK},\r
+ ParameterLength: 8,\r
+ };\r
+ \r
+ BT_DEBUG("(HCI) Enter State: Bluetooth_Init_SetEventMask", NULL);\r
+ \r
+ uint8_t EventMask[8] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};\r
+ ErrorCode = Bluetooth_SendHCICommand(&EventMask, 8);\r
+\r
+ BT_DEBUG("(HCI) -- Event mask: 0x%02X%02X%02X%02X%02X%02X%02X%02X", EventMask[7], EventMask[6], EventMask[5], EventMask[4],\r
+ EventMask[3], EventMask[2], EventMask[1], EventMask[0]);\r
+ do\r
+ {\r
+ while (!(Bluetooth_GetNextHCIEventHeader()));\r
+ Bluetooth_DiscardRemainingHCIEventParameters();\r
+ } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
+ \r
+\r
+ Bluetooth_HCIProcessingState = Bluetooth_Init_SetLocalName; \r
+ break;\r
+ case Bluetooth_Init_SetLocalName:\r
+ HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
+ {\r
+ OpCode: {OGF: OGF_CTRLR_BASEBAND, OCF: OCF_CTRLR_BASEBAND_WRITE_LOCAL_NAME},\r
+ ParameterLength: 248,\r
+ };\r
+\r
+ BT_DEBUG("(HCI) Enter State: Bluetooth_Init_SetLocalName", NULL);\r
+ BT_DEBUG("(HCI) -- Name: %s", Bluetooth_DeviceConfiguration.Name);\r
+\r
+ ErrorCode = Bluetooth_SendHCICommand(Bluetooth_DeviceConfiguration.Name, strlen(Bluetooth_DeviceConfiguration.Name));\r
+ \r
+ do\r
+ {\r
+ while (!(Bluetooth_GetNextHCIEventHeader()));\r
+ Bluetooth_DiscardRemainingHCIEventParameters();\r
+ } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
+ \r
+ Bluetooth_HCIProcessingState = Bluetooth_Init_SetDeviceClass;\r
+ break;\r
+ case Bluetooth_Init_SetDeviceClass:\r
+ HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
+ {\r
+ OpCode: {OGF: OGF_CTRLR_BASEBAND, OCF: OCF_CTRLR_BASEBAND_WRITE_CLASS_OF_DEVICE},\r
+ ParameterLength: 3,\r
+ };\r
+\r
+ BT_DEBUG("(HCI) Enter State: Bluetooth_Init_SetDeviceClass", NULL);\r
+\r
+ ErrorCode = Bluetooth_SendHCICommand(&Bluetooth_DeviceConfiguration.Class, 3);\r
+\r
+ do\r
+ {\r
+ while (!(Bluetooth_GetNextHCIEventHeader()));\r
+ Bluetooth_DiscardRemainingHCIEventParameters();\r
+ } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
+\r
+ Bluetooth_HCIProcessingState = Bluetooth_Init_WriteScanEnable; \r
+ break;\r
+ case Bluetooth_Init_WriteScanEnable:\r
+ HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
+ {\r
+ OpCode: {OGF: OGF_CTRLR_BASEBAND, OCF: OCF_CTRLR_BASEBAND_WRITE_SCAN_ENABLE},\r
+ ParameterLength: 1,\r
+ };\r
+ \r
+ BT_DEBUG("(HCI) Enter State: Bluetooth_Init_WriteScanEnable", NULL);\r
+\r
+ uint8_t Interval = InquiryAndPageScans;\r
+ ErrorCode = Bluetooth_SendHCICommand(&Interval, 1);\r
+\r
+ do\r
+ {\r
+ while (!(Bluetooth_GetNextHCIEventHeader()));\r
+ Bluetooth_DiscardRemainingHCIEventParameters();\r
+ } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
+\r
+ Bluetooth_HCIProcessingState = Bluetooth_PrepareToProcessEvents;\r
+ break;\r
+ case Bluetooth_PrepareToProcessEvents:\r
+ BT_DEBUG("(HCI) Enter State: Bluetooth_ProcessEvents", NULL);\r
+\r
+ Bluetooth_HCIProcessingState = Bluetooth_ProcessEvents;\r
+ break;\r
+ case Bluetooth_ProcessEvents:\r
+ if (Bluetooth_GetNextHCIEventHeader())\r
+ {\r
+ BT_DEBUG("(HCI) Event Code: 0x%02X", HCIEventHeader.EventCode);\r
+ \r
+ if (HCIEventHeader.EventCode == EVENT_COMMAND_STATUS)\r
+ {\r
+ Bluetooth_HCIEvent_CommandStatus_Header_t CommandStatusHeader;\r
+\r
+ Pipe_Read_Stream_LE(&CommandStatusHeader, sizeof(CommandStatusHeader));\r
+ HCIEventHeader.ParameterLength -= sizeof(CommandStatusHeader);\r
+ \r
+ BT_DEBUG("(HCI) >> Command status: 0x%02X", CommandStatusHeader.CommandStatus);\r
+ \r
+ if (CommandStatusHeader.CommandStatus)\r
+ Bluetooth_HCIProcessingState = Bluetooth_Init;\r
+ }\r
+ else if (HCIEventHeader.EventCode == EVENT_CONNECTION_REQUEST)\r
+ {\r
+ Bluetooth_HCIEvent_ConnectionRequest_Header_t ConnectionRequestParams;\r
+ \r
+ Pipe_Read_Stream_LE(&ConnectionRequestParams, sizeof(ConnectionRequestParams));\r
+ HCIEventHeader.ParameterLength -= sizeof(ConnectionRequestParams);\r
+\r
+ BT_DEBUG("(HCI) >> Connection Request from device %02X:%02X:%02X:%02X:%02X:%02X",\r
+ ConnectionRequestParams.RemoteAddress[5], ConnectionRequestParams.RemoteAddress[4], \r
+ ConnectionRequestParams.RemoteAddress[3], ConnectionRequestParams.RemoteAddress[2], \r
+ ConnectionRequestParams.RemoteAddress[1], ConnectionRequestParams.RemoteAddress[0]);\r
+ BT_DEBUG("(HCI) -- Device Class: 0x%02X%04X", ConnectionRequestParams.ClassOfDevice_Service,\r
+ ConnectionRequestParams.ClassOfDevice_MajorMinor);\r
+ BT_DEBUG("(HCI) -- Link Type: 0x%02x", ConnectionRequestParams.LinkType);\r
+ \r
+ memcpy(Bluetooth_TempDeviceAddress, ConnectionRequestParams.RemoteAddress,\r
+ sizeof(Bluetooth_TempDeviceAddress));\r
+\r
+ Bluetooth_HCIProcessingState = (Bluetooth_Connection.IsConnected) ? Bluetooth_Conn_RejectConnection :\r
+ Bluetooth_Conn_AcceptConnection;\r
+ }\r
+ else if (HCIEventHeader.EventCode == EVENT_DISCONNECTION_COMPLETE)\r
+ {\r
+ BT_DEBUG("(HCI) >> Disconnection from device complete.", NULL);\r
+ Bluetooth_HCIProcessingState = Bluetooth_Init;\r
+ }\r
+ else if (HCIEventHeader.EventCode == EVENT_CONNECTION_COMPLETE)\r
+ {\r
+ Bluetooth_HCIEvent_ConnectionComplete_Header_t ConnectionCompleteParams;\r
+ \r
+ Pipe_Read_Stream_LE(&ConnectionCompleteParams, sizeof(ConnectionCompleteParams));\r
+ HCIEventHeader.ParameterLength -= sizeof(ConnectionCompleteParams);\r
+\r
+ BT_DEBUG("(HCI) >> Connection to device complete.", NULL);\r
+ BT_DEBUG("(HCI) -- Status: %d", ConnectionCompleteParams.Status);\r
+ BT_DEBUG("(HCI) -- Handle: %d", ConnectionCompleteParams.ConnectionHandle);\r
+ \r
+ if (ConnectionCompleteParams.Status == 0x00)\r
+ {\r
+ memcpy(Bluetooth_Connection.DeviceAddress, ConnectionCompleteParams.RemoteAddress,\r
+ sizeof(Bluetooth_Connection.DeviceAddress));\r
+ Bluetooth_Connection.ConnectionHandle = ConnectionCompleteParams.ConnectionHandle;\r
+ Bluetooth_Connection.IsConnected = true;\r
+ }\r
+ }\r
+ else if (HCIEventHeader.EventCode == EVENT_PIN_CODE_REQUEST)\r
+ {\r
+ Pipe_Read_Stream_LE(&Bluetooth_TempDeviceAddress, sizeof(Bluetooth_TempDeviceAddress));\r
+ HCIEventHeader.ParameterLength -= sizeof(Bluetooth_TempDeviceAddress);\r
+\r
+ BT_DEBUG("(HCI) >> PIN code Request from device %02X:%02X:%02X:%02X:%02X:%02X", \r
+ Bluetooth_TempDeviceAddress[5], Bluetooth_TempDeviceAddress[4], Bluetooth_TempDeviceAddress[3],\r
+ Bluetooth_TempDeviceAddress[2], Bluetooth_TempDeviceAddress[1], Bluetooth_TempDeviceAddress[0]);\r
+ \r
+ Bluetooth_HCIProcessingState = Bluetooth_Conn_SendPINCode;\r
+ }\r
+ \r
+ BT_DEBUG("(HCI) -- Unread Event Param Length: %d", HCIEventHeader.ParameterLength);\r
+\r
+ Bluetooth_DiscardRemainingHCIEventParameters();\r
+ }\r
+\r
+ break;\r
+ case Bluetooth_Conn_AcceptConnection:\r
+ HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
+ {\r
+ OpCode: {OGF: OGF_LINK_CONTROL, OCF: OCF_LINK_CONTROL_ACCEPT_CONNECTION_REQUEST},\r
+ ParameterLength: sizeof(Bluetooth_HCICommand_AcceptConnectionRequest_Params_t),\r
+ };\r
+ \r
+ BT_DEBUG("(HCI) Enter State: Bluetooth_Conn_AcceptConnection", NULL);\r
+\r
+ Bluetooth_HCICommand_AcceptConnectionRequest_Params_t AcceptConnectionParams;\r
+ \r
+ memcpy(AcceptConnectionParams.RemoteAddress, Bluetooth_TempDeviceAddress,\r
+ sizeof(Bluetooth_TempDeviceAddress));\r
+ AcceptConnectionParams.SlaveRole = true;\r
+\r
+ Bluetooth_SendHCICommand(&AcceptConnectionParams, sizeof(AcceptConnectionParams));\r
+ \r
+ Bluetooth_HCIProcessingState = Bluetooth_PrepareToProcessEvents;\r
+ break;\r
+ case Bluetooth_Conn_RejectConnection:\r
+ HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
+ {\r
+ OpCode: {OGF: OGF_LINK_CONTROL, OCF: OCF_LINK_CONTROL_ACCEPT_CONNECTION_REQUEST},\r
+ ParameterLength: sizeof(Bluetooth_HCICommand_RejectConnectionRequest_Params_t),\r
+ };\r
+ \r
+ BT_DEBUG("(HCI) Enter State: Bluetooth_Conn_RejectConnection", NULL);\r
+\r
+ Bluetooth_HCICommand_RejectConnectionRequest_Params_t RejectConnectionParams;\r
+\r
+ memcpy(RejectConnectionParams.RemoteAddress, Bluetooth_TempDeviceAddress,\r
+ sizeof(Bluetooth_TempDeviceAddress));\r
+ RejectConnectionParams.Reason = ERROR_LIMITED_RESOURCES;\r
+\r
+ Bluetooth_SendHCICommand(&AcceptConnectionParams, sizeof(AcceptConnectionParams));\r
+ \r
+ Bluetooth_HCIProcessingState = Bluetooth_PrepareToProcessEvents;\r
+ break;\r
+ case Bluetooth_Conn_SendPINCode:\r
+ HCICommandHeader = (Bluetooth_HCICommand_Header_t)\r
+ {\r
+ OpCode: {OGF: OGF_LINK_CONTROL, OCF: OCF_LINK_CONTROL_PIN_CODE_REQUEST_REPLY},\r
+ ParameterLength: sizeof(Bluetooth_HCICommand_PinCodeResponse_Params_t),\r
+ };\r
+ \r
+ BT_DEBUG("(HCI) Enter State: Bluetooth_Conn_SendPINCode", NULL);\r
+ BT_DEBUG("(HCI) -- PIN: %s", Bluetooth_DeviceConfiguration.PINCode);\r
+\r
+ Bluetooth_HCICommand_PinCodeResponse_Params_t PINCodeRequestParams;\r
+ \r
+ memcpy(PINCodeRequestParams.RemoteAddress, Bluetooth_TempDeviceAddress,\r
+ sizeof(Bluetooth_TempDeviceAddress));\r
+ PINCodeRequestParams.PINCodeLength = strlen(Bluetooth_DeviceConfiguration.PINCode);\r
+ memcpy(PINCodeRequestParams.PINCode, Bluetooth_DeviceConfiguration.PINCode,\r
+ sizeof(Bluetooth_DeviceConfiguration.PINCode));\r
+ \r
+ Bluetooth_SendHCICommand(&PINCodeRequestParams, sizeof(PINCodeRequestParams));\r
+ \r
+ do\r
+ {\r
+ while (!(Bluetooth_GetNextHCIEventHeader()));\r
+ Bluetooth_DiscardRemainingHCIEventParameters();\r
+ } while (HCIEventHeader.EventCode != EVENT_COMMAND_COMPLETE);\r
+\r
+ Bluetooth_HCIProcessingState = Bluetooth_PrepareToProcessEvents;\r
+ break;\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+#ifndef _BLUETOOTH_HCICOMMANDS_H_\r
+#define _BLUETOOTH_HCICOMMANDS_H_\r
+\r
+ /* Includes: */\r
+ #include <avr/io.h>\r
+ #include <string.h>\r
+ #include <stdbool.h>\r
+\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+\r
+ #include "BluetoothStack.h"\r
+ #include "BluetoothClassCodes.h"\r
+\r
+ /* Macros: */\r
+ #define OGF_LINK_CONTROL 0x01\r
+ #define OGF_CTRLR_BASEBAND 0x03\r
+ #define OGF_CTRLR_INFORMATIONAL 0x04\r
+\r
+ #define OCF_LINK_CONTROL_INQUIRY 0x0001\r
+ #define OCF_LINK_CONTROL_INQUIRY_CANCEL 0x0002\r
+ #define OCF_LINK_CONTROL_PERIODIC_INQUIRY 0x0003\r
+ #define OCF_LINK_CONTROL_EXIT_PERIODIC_INQUIRY 0x0004\r
+ #define OCF_LINK_CONTROL_CREATE_CONNECTION 0x0005\r
+ #define OCF_LINK_CONTROL_DISCONNECT 0x0006\r
+ #define OCF_LINK_CONTROL_CREATE_CONNECTION_CANCEL 0x0008\r
+ #define OCF_LINK_CONTROL_ACCEPT_CONNECTION_REQUEST 0x0009\r
+ #define OCF_LINK_CONTROL_REJECT_CONNECTION_REQUEST 0x000A\r
+ #define OCF_LINK_CONTROL_LINK_KEY_REQUEST_REPLY 0x000B\r
+ #define OCF_LINK_CONTROL_LINK_KEY_REQUEST_NEG_REPLY 0x000C\r
+ #define OCF_LINK_CONTROL_PIN_CODE_REQUEST_REPLY 0x000D\r
+ #define OCF_LINK_CONTROL_PIN_CODE_REQUEST_NEG_REPLY 0x000E\r
+ #define OCF_LINK_CONTROL_CHANGE_CONNECTION_PACKET_TYPE 0x000F\r
+ #define OCF_LINK_CONTROL_REMOTE_NAME_REQUEST 0x0019\r
+ #define OCF_CTRLR_BASEBAND_SET_EVENT_MASK 0x0001\r
+ #define OCF_CTRLR_BASEBAND_RESET 0x0003\r
+ #define OCF_CTRLR_BASEBAND_WRITE_PIN_TYPE 0x000A\r
+ #define OCF_CTRLR_BASEBAND_WRITE_LOCAL_NAME 0x0013\r
+ #define OCF_CTRLR_BASEBAND_READ_LOCAL_NAME 0x0014\r
+ #define OCF_CTRLR_BASEBAND_WRITE_SCAN_ENABLE 0x001A\r
+ #define OCF_CTRLR_BASEBAND_WRITE_CLASS_OF_DEVICE 0x0024\r
+ #define OCF_CTRLR_BASEBAND_WRITE_SIMPLE_PAIRING_MODE 0x0056\r
+ #define OCF_CTRLR_BASEBAND_WRITE_AUTHENTICATION_ENABLE 0x0020\r
+ #define OGF_CTRLR_INFORMATIONAL_READBUFFERSIZE 0x0005\r
+ \r
+ #define EVENT_COMMAND_STATUS 0x0F\r
+ #define EVENT_COMMAND_COMPLETE 0x0E\r
+ #define EVENT_CONNECTION_COMPLETE 0x03\r
+ #define EVENT_CONNECTION_REQUEST 0x04\r
+ #define EVENT_DISCONNECTION_COMPLETE 0x05\r
+ #define EVENT_REMOTE_NAME_REQUEST_COMPLETE 0x07\r
+ #define EVENT_PIN_CODE_REQUEST 0x16\r
+ \r
+ #define ERROR_LIMITED_RESOURCES 0x0D\r
+ \r
+ /* Type Defines: */\r
+ typedef struct\r
+ {\r
+ struct\r
+ {\r
+ int OCF : 10;\r
+ int OGF : 6;\r
+ } OpCode;\r
+\r
+ uint8_t ParameterLength;\r
+ uint8_t Parameters[];\r
+ } Bluetooth_HCICommand_Header_t;\r
+\r
+ typedef struct\r
+ {\r
+ uint8_t EventCode;\r
+ uint8_t ParameterLength;\r
+ } Bluetooth_HCIEvent_Header_t;\r
+\r
+ typedef struct\r
+ {\r
+ uint8_t CommandStatus;\r
+ uint8_t CommandPackets;\r
+\r
+ struct\r
+ {\r
+ int OCF : 10;\r
+ int OGF : 6;\r
+ } OpCode;\r
+ } Bluetooth_HCIEvent_CommandStatus_Header_t;\r
+ \r
+ typedef struct\r
+ {\r
+ uint8_t RemoteAddress[6];\r
+ uint8_t ClassOfDevice_Service;\r
+ uint16_t ClassOfDevice_MajorMinor;\r
+ uint8_t LinkType;\r
+ } Bluetooth_HCIEvent_ConnectionRequest_Header_t;\r
+\r
+ typedef struct\r
+ {\r
+ uint8_t Status;\r
+ uint16_t ConnectionHandle;\r
+ uint8_t RemoteAddress[6];\r
+ uint8_t LinkType;\r
+ uint8_t EncryptionEnabled;\r
+ } Bluetooth_HCIEvent_ConnectionComplete_Header_t;\r
+ \r
+ typedef struct\r
+ {\r
+ uint8_t RemoteAddress[6];\r
+ uint8_t SlaveRole;\r
+ } Bluetooth_HCICommand_AcceptConnectionRequest_Params_t;\r
+ \r
+ typedef struct\r
+ {\r
+ uint8_t RemoteAddress[6];\r
+ uint8_t Reason;\r
+ } Bluetooth_HCICommand_RejectConnectionRequest_Params_t;\r
+\r
+ typedef struct\r
+ {\r
+ uint8_t RemoteAddress[6];\r
+ uint8_t PINCodeLength;\r
+ char PINCode[16];\r
+ } Bluetooth_HCICommand_PinCodeResponse_Params_t;\r
+ \r
+ /* Enums: */\r
+ enum Bluetooth_ScanEnable_Modes_t\r
+ {\r
+ NoScansEnabled = 0,\r
+ InquiryScanOnly = 1,\r
+ PageScanOnly = 2,\r
+ InquiryAndPageScans = 3,\r
+ };\r
+\r
+ enum BluetoothStack_States_t\r
+ {\r
+ Bluetooth_Init = 0,\r
+ Bluetooth_Init_Reset = 1,\r
+ Bluetooth_Init_ReadBufferSize = 2,\r
+ Bluetooth_Init_SetEventMask = 3,\r
+ Bluetooth_Init_SetLocalName = 4,\r
+ Bluetooth_Init_SetDeviceClass = 5,\r
+ Bluetooth_Init_WriteScanEnable = 6,\r
+ Bluetooth_PrepareToProcessEvents = 7,\r
+ Bluetooth_ProcessEvents = 8,\r
+ Bluetooth_Conn_AcceptConnection = 9,\r
+ Bluetooth_Conn_RejectConnection = 10,\r
+ Bluetooth_Conn_SendPINCode = 11,\r
+ };\r
+ \r
+ /* External Variables: */\r
+ extern uint8_t Bluetooth_HCIProcessingState;\r
+\r
+ /* Function Prototypes: */\r
+ void Bluetooth_ProcessHCICommands(void);\r
+\r
+ #if defined(INCLUDE_FROM_BLUETOOTHHCICOMMANDS_C)\r
+ static uint8_t Bluetooth_SendHCICommand(void* Parameters, uint8_t ParamLength);\r
+ static bool Bluetooth_GetNextHCIEventHeader(void);\r
+ static void Bluetooth_DiscardRemainingHCIEventParameters(void);\r
+ static void Bluetooth_ProcessHCICommands(void);\r
+ #endif\r
+ \r
+#endif\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+#include "BluetoothStack.h"\r
+\r
+Bluetooth_Connection_t Bluetooth_Connection = {IsConnected: false};\r
+\r
+Bluetooth_Device_t Bluetooth_DeviceConfiguration ATTR_WEAK =\r
+ {\r
+ Class: DEVICE_CLASS_MAJOR_MISC,\r
+ PINCode: "0000",\r
+ Name: "LUFA BT Device"\r
+ };\r
+\r
+void Bluetooth_Stack_Task(void)\r
+{\r
+ if (!(USB_IsConnected) || (USB_HostState != HOST_STATE_Ready))\r
+ Bluetooth_HCIProcessingState = Bluetooth_Init;\r
+ \r
+ Bluetooth_ProcessHCICommands();\r
+ Bluetooth_ProcessACLPackets();\r
+}\r
+\r
+Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource)\r
+{\r
+ Bluetooth_Channel_t* CurrentChannelStructure;\r
+\r
+ for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)\r
+ {\r
+ CurrentChannelStructure = &Bluetooth_Connection.Channels[i];\r
+ \r
+ uint16_t CurrentChannelNumber = ((SearchBySource) ? CurrentChannelStructure->RemoteNumber : CurrentChannelStructure->LocalNumber);\r
+ \r
+ if (CurrentChannelNumber == ChannelNumber)\r
+ return CurrentChannelStructure;\r
+ }\r
+\r
+ return NULL;\r
+}\r
+\r
+Bluetooth_Channel_t* Bluetooth_InitChannelData(uint16_t RemoteChannelNumber, uint16_t PSM)\r
+{\r
+ Bluetooth_Channel_t* CurrentChannelStructure;\r
+\r
+ for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)\r
+ {\r
+ CurrentChannelStructure = &Bluetooth_Connection.Channels[i];\r
+ \r
+ if (CurrentChannelStructure->State == Channel_Closed)\r
+ {\r
+ CurrentChannelStructure->RemoteNumber = RemoteChannelNumber;\r
+ CurrentChannelStructure->LocalNumber = (BLUETOOTH_CHANNELNUMBER_BASEOFFSET + i);\r
+ CurrentChannelStructure->PSM = PSM;\r
+ CurrentChannelStructure->State = Channel_Config;\r
+ \r
+ return CurrentChannelStructure;\r
+ } \r
+ }\r
+\r
+ return NULL;\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+#ifndef _BLUETOOTH_STACK_\r
+#define _BLUETOOTH_STACK_\r
+\r
+ /* Includes: */\r
+ #include <LUFA/Drivers/USB/USB.h>
+ \r
+ #include "BluetoothHost.h"\r
+ #include "BluetoothHCICommands.h"\r
+ #include "BluetoothACLPackets.h"\r
+ \r
+ /* Macros: */\r
+ #define BLUETOOTH_MAX_OPEN_CHANNELS 2\r
+ #define BLUETOOTH_CHANNELNUMBER_BASEOFFSET 0x0040\r
+ \r
+ #define CHANNEL_LOOKUP_BY_SOURCE true\r
+ #define CHANNEL_LOOKUP_BY_DESTINATION false\r
+ \r
+ #define BT_DEBUG(s, ...) printf_P(PSTR(s "\r\n"), __VA_ARGS__)\r
+ \r
+ /* Enums: */\r
+ enum Bluetooth_Channel_State_t\r
+ {\r
+ Channel_Closed = 0,\r
+ Channel_WaitConnect = 1,\r
+ Channel_WaitConnectRsp = 2,\r
+ Channel_Config = 3,\r
+ Channel_Open = 4,\r
+ Channel_WaitDisconnect = 5,\r
+ };\r
+\r
+ /* Type Defines: */\r
+ typedef struct\r
+ {\r
+ uint8_t State;\r
+ uint16_t LocalNumber;\r
+ uint16_t RemoteNumber;\r
+ uint16_t PSM;\r
+ uint16_t MTU;\r
+ } Bluetooth_Channel_t;\r
+\r
+ typedef struct\r
+ {\r
+ bool IsConnected;\r
+ uint16_t ConnectionHandle;\r
+ uint8_t DeviceAddress[6];\r
+ Bluetooth_Channel_t Channels[BLUETOOTH_MAX_OPEN_CHANNELS];\r
+ } Bluetooth_Connection_t;\r
+ \r
+ typedef struct\r
+ {\r
+ uint32_t Class;\r
+ char PINCode[16];\r
+ char Name[];\r
+ } Bluetooth_Device_t;\r
+ \r
+ /* Function Prototypes: */\r
+ Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource);\r
+ Bluetooth_Channel_t* Bluetooth_InitChannelData(uint16_t RemoteChannelNumber, uint16_t PSM);\r
+ \r
+ void Bluetooth_Stack_Task(void);\r
+\r
+ /* External Variables: */\r
+ extern Bluetooth_Device_t Bluetooth_DeviceConfiguration;\r
+ extern Bluetooth_Connection_t Bluetooth_Connection;\r
+\r
+#endif\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
SRC = $(TARGET).c \\r
DeviceDescriptor.c \\r
ConfigDescriptor.c \\r
- BluetoothStack.c \\r
- BluetoothHCICommands.c \\r
- BluetoothACLPackets.c \\r
+ Lib/BluetoothStack.c \\r
+ Lib/BluetoothHCICommands.c \\r
+ Lib/BluetoothACLPackets.c \\r
$(LUFA_PATH)/LUFA/Drivers/Peripheral/SerialStream.c \\r
$(LUFA_PATH)/LUFA/Drivers/Peripheral/Serial.c \\r
$(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+#include "ConfigDescriptor.h"\r
+\r
+uint8_t ProcessConfigurationDescriptor(void)\r
+{\r
+ uint8_t* ConfigDescriptorData;\r
+ uint16_t ConfigDescriptorSize;\r
+ uint8_t ErrorCode;\r
+ uint8_t FoundEndpoints = 0;\r
+ uint8_t FoundEndpointMask;\r
+ \r
+ /* Get Configuration Descriptor size from the device */\r
+ if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)\r
+ return ControlError;\r
+ \r
+ /* Ensure that the Configuration Descriptor isn't too large */\r
+ if (ConfigDescriptorSize > MAX_CONFIG_DESCRIPTOR_SIZE)\r
+ return DescriptorTooLarge;\r
+ \r
+ /* Allocate enough memory for the entire config descriptor */\r
+ ConfigDescriptorData = alloca(ConfigDescriptorSize);\r
+\r
+ /* Retrieve the entire configuration descriptor into the allocated buffer */\r
+ USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData);\r
+ \r
+ /* Validate returned data - ensure first entry is a configuration header descriptor */\r
+ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)\r
+ return InvalidConfigDataReturned;\r
+ \r
+ /* Get the printer interface from the configuration descriptor */\r
+ if ((ErrorCode = USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
+ NextPrinterInterface)))\r
+ {\r
+ /* Descriptor not found, error out */\r
+ return NoInterfaceFound;\r
+ }\r
+\r
+ /* Get the printer's communication protocol */\r
+ PrinterProtocol = DESCRIPTOR_CAST(ConfigDescriptorData, USB_Descriptor_Interface_t).Protocol;\r
+ \r
+ /* Determine what endpoints to look for from the protocol */\r
+ switch (PrinterProtocol)\r
+ {\r
+ case PROTOCOL_UNIDIRECTIONAL:\r
+ FoundEndpointMask = (1 << PRINTER_DATA_OUT_PIPE);\r
+ break;\r
+ case PROTOCOL_BIDIRECTIONAL:\r
+ case PROTOCOL_IEEE1284:\r
+ FoundEndpointMask = ((1 << PRINTER_DATA_OUT_PIPE) | (1 << PRINTER_DATA_IN_PIPE));\r
+ break;\r
+ default:\r
+ return NoInterfaceFound;\r
+ }\r
+\r
+ /* Get the IN and OUT data endpoints for the mass storage interface */\r
+ while (FoundEndpoints != FoundEndpointMask)\r
+ {\r
+ /* Fetch the next bulk endpoint from the current printer interface */\r
+ if ((ErrorCode = USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
+ NextInterfaceBulkDataEndpoint)))\r
+ {\r
+ /* Descriptor not found, error out */\r
+ return NoEndpointFound;\r
+ }\r
+ \r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Endpoint_t);\r
+\r
+ /* Check if the endpoint is a bulk IN or bulk OUT endpoint, set appropriate globals */\r
+ if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)\r
+ {\r
+ /* Configure the data IN pipe */\r
+ Pipe_ConfigurePipe(PRINTER_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,\r
+ EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
+ PIPE_BANK_SINGLE);\r
+\r
+ Pipe_SetInfiniteINRequests();\r
+\r
+ /* Set the flag indicating that the data IN pipe has been found */\r
+ FoundEndpoints |= (1 << PRINTER_DATA_IN_PIPE);\r
+ }\r
+ else\r
+ {\r
+ /* Configure the data OUT pipe */\r
+ Pipe_ConfigurePipe(PRINTER_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,\r
+ EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
+ PIPE_BANK_SINGLE);\r
+\r
+ /* Set the flag indicating that the data OUT pipe has been found */\r
+ FoundEndpoints |= (1 << PRINTER_DATA_OUT_PIPE);\r
+ } \r
+ }\r
+\r
+ /* Valid data found, return success */\r
+ return SuccessfulConfigRead;\r
+}\r
+\r
+uint8_t NextPrinterInterface(void* CurrentDescriptor)\r
+{\r
+ /* PURPOSE: Find next mass storage class interface descriptor */\r
+\r
+ if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)\r
+ {\r
+ /* Check the descriptor class and protocol, break out if correct class/protocol interface found */\r
+ if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == PRINTER_CLASS) &&\r
+ (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == PRINTER_SUBCLASS))\r
+ {\r
+ return DESCRIPTOR_SEARCH_Found;\r
+ }\r
+ }\r
+ \r
+ return DESCRIPTOR_SEARCH_NotFound;\r
+}\r
+\r
+uint8_t NextInterfaceBulkDataEndpoint(void* CurrentDescriptor)\r
+{\r
+ /* PURPOSE: Find next interface bulk endpoint descriptor before next interface descriptor */\r
+\r
+ if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)\r
+ {\r
+ uint8_t EndpointType = (DESCRIPTOR_CAST(CurrentDescriptor,\r
+ USB_Descriptor_Endpoint_t).Attributes & EP_TYPE_MASK);\r
+\r
+ /* Check the endpoint type, break out if correct BULK type endpoint found */\r
+ if (EndpointType == EP_TYPE_BULK)\r
+ return DESCRIPTOR_SEARCH_Found;\r
+ }\r
+ else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)\r
+ {\r
+ return DESCRIPTOR_SEARCH_Fail;\r
+ }\r
+\r
+ return DESCRIPTOR_SEARCH_NotFound;\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+#ifndef _CONFIGDESCRIPTOR_H_\r
+#define _CONFIGDESCRIPTOR_H_\r
+\r
+ /* Includes: */\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+ \r
+ #include "PrinterHost.h"\r
+ \r
+ /* Macros: */\r
+ #define PRINTER_CLASS 0x07\r
+ #define PRINTER_SUBCLASS 0x01\r
+ \r
+ #define PRINTER_DATA_OUT_PIPE 1\r
+ #define PRINTER_DATA_IN_PIPE 2\r
+ \r
+ #define MAX_CONFIG_DESCRIPTOR_SIZE 512\r
+\r
+ /* Enums: */\r
+ enum PrinterHost_GetConfigDescriptorDataCodes_t\r
+ {\r
+ SuccessfulConfigRead = 0,\r
+ ControlError = 1,\r
+ DescriptorTooLarge = 2,\r
+ InvalidConfigDataReturned = 3,\r
+ NoInterfaceFound = 4,\r
+ NoEndpointFound = 5,\r
+ };\r
+\r
+ /* Function Prototypes: */\r
+ uint8_t ProcessConfigurationDescriptor(void); \r
+\r
+ uint8_t NextPrinterInterface(void* CurrentDescriptor);\r
+ uint8_t NextInterfaceBulkDataEndpoint(void* CurrentDescriptor);\r
+\r
+#endif\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+/*\r
+ USB Printer host demo application.\r
+ \r
+ ** NOT CURRENTLY FUNCTIONAL - DO NOT USE **\r
+*/\r
+\r
+#include "PrinterHost.h"\r
+\r
+/* Globals */\r
+uint8_t PrinterProtocol;\r
+\r
+\r
+int main(void)\r
+{\r
+ SetupHardware();\r
+\r
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
+ puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY\r
+ "Printer Host Demo running.\r\n" ESC_INVERSE_OFF));\r
+ \r
+ for (;;)\r
+ {\r
+ USB_Printer_Host();\r
+ USB_USBTask();\r
+ }\r
+}\r
+\r
+void SetupHardware(void)\r
+{\r
+ /* Disable watchdog if enabled by bootloader/fuses */\r
+ MCUSR &= ~(1 << WDRF);\r
+ wdt_disable();\r
+\r
+ /* Disable clock division */\r
+ clock_prescale_set(clock_div_1);\r
+\r
+ /* Hardware Initialization */\r
+ SerialStream_Init(9600, false);\r
+ LEDs_Init();\r
+ USB_Init();\r
+}\r
+\r
+void EVENT_USB_DeviceAttached(void)\r
+{\r
+ puts_P(PSTR("Device Attached.\r\n"));\r
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+}\r
+\r
+void EVENT_USB_DeviceUnattached(void)\r
+{\r
+ puts_P(PSTR("\r\nDevice Unattached.\r\n"));\r
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+}\r
+\r
+void EVENT_USB_HostError(uint8_t ErrorCode)\r
+{\r
+ USB_ShutDown();\r
+\r
+ puts_P(PSTR(ESC_BG_RED "Host Mode Error\r\n"));\r
+ printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);\r
+\r
+ LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+ for(;;);\r
+}\r
+\r
+void EVENT_USB_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode)\r
+{\r
+ puts_P(PSTR(ESC_BG_RED "Dev Enum Error\r\n"));\r
+ printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);\r
+ printf_P(PSTR(" -- In State %d\r\n"), USB_HostState);\r
+\r
+ LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+}\r
+\r
+void EVENT_USB_DeviceEnumerationComplete(void)\r
+{\r
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+}\r
+\r
+void USB_Printer_Host(void)\r
+{\r
+ uint8_t ErrorCode;\r
+\r
+ switch (USB_HostState)\r
+ {\r
+ case HOST_STATE_Addressed:\r
+ /* Standard request to set the device configuration to configuration 1 */\r
+ USB_ControlRequest = (USB_Request_Header_t)\r
+ {\r
+ bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ bRequest: REQ_SetConfiguration,\r
+ wValue: 1,\r
+ wIndex: 0,\r
+ wLength: 0,\r
+ };\r
+ \r
+ /* Send the request, display error and wait for device detatch if request fails */\r
+ if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)\r
+ {\r
+ puts_P(PSTR("Control Error (Set Configuration).\r\n"));\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);\r
+\r
+ /* Indicate error via status LEDs */\r
+ LEDs_SetAllLEDs(LEDS_LED1);\r
+\r
+ /* Wait until USB device disconnected */\r
+ while (USB_IsConnected);\r
+ break;\r
+ }\r
+ \r
+ USB_HostState = HOST_STATE_Configured;\r
+ break;\r
+ case HOST_STATE_Configured:\r
+ puts_P(PSTR("Getting Config Data.\r\n"));\r
+ \r
+ /* Get and process the configuration descriptor data */\r
+ if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)\r
+ {\r
+ if (ErrorCode == ControlError)\r
+ puts_P(PSTR("Control Error (Get Configuration).\r\n"));\r
+ else\r
+ puts_P(PSTR("Invalid Device.\r\n"));\r
+\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);\r
+ \r
+ /* Indicate error via status LEDs */\r
+ LEDs_SetAllLEDs(LEDS_LED1);\r
+\r
+ /* Wait until USB device disconnected */\r
+ while (USB_IsConnected);\r
+ break;\r
+ }\r
+\r
+ puts_P(PSTR("Printer Enumerated.\r\n"));\r
+ \r
+ USB_HostState = HOST_STATE_Ready;\r
+ break;\r
+ case HOST_STATE_Ready:\r
+ /* Indicate device busy via the status LEDs */\r
+ LEDs_SetAllLEDs(LEDS_LED3 | LEDS_LED4);\r
+ \r
+ if (!(GetDeviceID()))\r
+ {\r
+ /* Indicate error via status LEDs */\r
+ LEDs_SetAllLEDs(LEDS_LED1);\r
+\r
+ /* Wait until USB device disconnected */\r
+ while (USB_IsConnected);\r
+ break;\r
+ }\r
+ \r
+ /* Indicate device no longer busy */\r
+ LEDs_SetAllLEDs(LEDS_LED4);\r
+ \r
+ /* Wait until USB device disconnected */\r
+ while (USB_IsConnected);\r
+ \r
+ break;\r
+ }\r
+}\r
+\r
+bool GetDeviceID(void)\r
+{\r
+ Device_ID_String_t DeviceIDString;\r
+\r
+ /* Request to retrieve the device ID string */\r
+ USB_ControlRequest = (USB_Request_Header_t)\r
+ {\r
+ bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
+ bRequest: GET_DEVICE_ID,\r
+ wValue: 0,\r
+ wIndex: 0,\r
+ wLength: sizeof(DeviceIDString),\r
+ };\r
+\r
+ printf("Error Code: %d", USB_Host_SendControlRequest(&DeviceIDString));\r
+\r
+ /* Send the request, display error and wait for device detatch if request fails */\r
+ if (USB_Host_SendControlRequest(&DeviceIDString) != HOST_SENDCONTROL_Successful)\r
+ return false;\r
+\r
+ /* Reverse the order of the string length as it is sent in big-endian format */\r
+ DeviceIDString.Length = SwapEndian_16(DeviceIDString.Length);\r
+ \r
+ printf("%s", DeviceIDString.String);\r
+ \r
+ return true;\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaim all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+#ifndef _MASS_STORE_HOST_H_\r
+#define _MASS_STORE_HOST_H_\r
+\r
+ /* Includes: */\r
+ #include <avr/io.h>\r
+ #include <avr/wdt.h>\r
+ #include <avr/pgmspace.h>\r
+ #include <avr/power.h>\r
+ #include <stdio.h>\r
+\r
+ #include "ConfigDescriptor.h"\r
+\r
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/Misc/TerminalCodes.h>\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+ #include <LUFA/Drivers/Peripheral/SerialStream.h>\r
+ #include <LUFA/Drivers/Board/LEDs.h>\r
+\r
+ /* Macros: */\r
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
+ #define LEDMASK_USB_NOTREADY LEDS_LED1\r
+\r
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)\r
+\r
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)\r
+\r
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)\r
+\r
+ #define PROTOCOL_UNIDIRECTIONAL 0x01\r
+ #define PROTOCOL_BIDIRECTIONAL 0x02\r
+ #define PROTOCOL_IEEE1284 0x03\r
+ \r
+ #define GET_DEVICE_ID 0\r
+\r
+ /* Type Defines: */\r
+ typedef struct\r
+ {\r
+ uint16_t Length;\r
+ uint8_t String[128];\r
+ } Device_ID_String_t;\r
+\r
+ /* External Variables: */\r
+ extern uint8_t PrinterProtocol;\r
+ \r
+ /* Function Prototypes: */\r
+ void EVENT_USB_DeviceAttached(void);\r
+ void EVENT_USB_DeviceUnattached(void);\r
+ void EVENT_USB_DeviceEnumerationComplete(void);\r
+ void EVENT_USB_HostError(uint8_t ErrorCode);\r
+ void EVENT_USB_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode);\r
+\r
+ void SetupHardware(void);\r
+\r
+ void USB_Printer_Host(void);\r
+\r
+ bool GetDeviceID(void);\r
+\r
+#endif\r
--- /dev/null
+# Hey Emacs, this is a -*- makefile -*-\r
+#----------------------------------------------------------------------------\r
+# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
+# >> Modified for use with the LUFA project. <<\r
+#\r
+# Released to the Public Domain\r
+#\r
+# Additional material for this makefile was written by:\r
+# Peter Fleury\r
+# Tim Henigan\r
+# Colin O'Flynn\r
+# Reiner Patommel\r
+# Markus Pfaff\r
+# Sander Pool\r
+# Frederik Rouleau\r
+# Carlos Lamas\r
+# Dean Camera\r
+# Opendous Inc.\r
+# Denver Gingerich\r
+#\r
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make coff = Convert ELF to AVR COFF.\r
+#\r
+# make extcoff = Convert ELF to AVR Extended COFF.\r
+#\r
+# make program = Download the hex file to the device, using avrdude.\r
+# Please customize the avrdude settings below first!\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
+# (must have dfu-programmer installed).\r
+#\r
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
+# (must have Atmel FLIP installed).\r
+#\r
+# make doxygen = Generate DoxyGen documentation for the project (must have\r
+# DoxyGen installed)\r
+#\r
+# make debug = Start either simulavr or avarice as specified for debugging, \r
+# with avr-gdb or avr-insight as the front end for debugging.\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+\r
+# MCU name\r
+MCU = at90usb1287\r
+\r
+\r
+# Target board (see library "Board Types" documentation, USER or blank for projects not requiring\r
+# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
+# "Board" inside the application directory.\r
+BOARD = USBKEY\r
+\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the \r
+# processor frequency. You can then use this symbol in your source code to \r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+# Typical values are:\r
+# F_CPU = 1000000\r
+# F_CPU = 1843200\r
+# F_CPU = 2000000\r
+# F_CPU = 3686400\r
+# F_CPU = 4000000\r
+# F_CPU = 7372800\r
+# F_CPU = 8000000\r
+# F_CPU = 11059200\r
+# F_CPU = 14745600\r
+# F_CPU = 16000000\r
+# F_CPU = 18432000\r
+# F_CPU = 20000000\r
+F_CPU = 8000000\r
+\r
+\r
+# Input clock frequency.\r
+# This will define a symbol, F_CLOCK, in all source code files equal to the \r
+# input clock frequency (before any prescaling is performed). This value may\r
+# differ from F_CPU if prescaling is used on the latter, and is required as the\r
+# raw input clock is fed directly to the PLL sections of the AVR for high speed\r
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
+# at the end, this will be done automatically to create a 32-bit value in your\r
+# source code.\r
+#\r
+# If no clock division is performed on the input clock inside the AVR (via the\r
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
+F_CLOCK = $(F_CPU)\r
+\r
+\r
+# Output format. (can be srec, ihex, binary)\r
+FORMAT = ihex\r
+\r
+\r
+# Target file name (without extension).\r
+TARGET = PrinterHost\r
+\r
+\r
+# Object files directory\r
+# To put object files in current directory, use a dot (.), do NOT make\r
+# this an empty or blank macro!\r
+OBJDIR = .\r
+\r
+\r
+# Path to the LUFA library\r
+LUFA_PATH = ../../../..\r
+\r
+\r
+# LUFA library compile-time options\r
+LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES\r
+LUFA_OPTS += -D USB_HOST_ONLY\r
+LUFA_OPTS += -D NO_STREAM_CALLBACKS\r
+LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
+\r
+\r
+# List C source files here. (C dependencies are automatically generated.)\r
+SRC = $(TARGET).c \\r
+ ConfigDescriptor.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/Peripheral/SerialStream.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/Peripheral/Serial.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/DevChapter9.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/HostChapter9.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/LowLevel.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Pipe.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/Events.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBInterrupt.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \\r
+ $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \\r
+\r
+\r
+# List C++ source files here. (C dependencies are automatically generated.)\r
+CPPSRC = \r
+\r
+\r
+# List Assembler source files here.\r
+# Make them always end in a capital .S. Files ending in a lowercase .s\r
+# will not be considered source files but generated files (assembler\r
+# output from the compiler), and will be deleted upon "make clean"!\r
+# Even though the DOS/Win* filesystem matches both .s and .S the same,\r
+# it will preserve the spelling of the filenames, and gcc itself does\r
+# care about how the name is spelled on its command-line.\r
+ASRC =\r
+\r
+\r
+# Optimization level, can be [0, 1, 2, 3, s]. \r
+# 0 = turn off optimization. s = optimize for size.\r
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
+OPT = s\r
+\r
+\r
+# Debugging format.\r
+# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
+# AVR Studio 4.10 requires dwarf-2.\r
+# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
+DEBUG = dwarf-2\r
+\r
+\r
+# List any extra directories to look for include files here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRAINCDIRS = $(LUFA_PATH)/\r
+\r
+\r
+# Compiler flag to set the C Standard level.\r
+# c89 = "ANSI" C\r
+# gnu89 = c89 plus GCC extensions\r
+# c99 = ISO C99 standard (not yet fully implemented)\r
+# gnu99 = c99 plus GCC extensions\r
+CSTANDARD = -std=gnu99\r
+\r
+\r
+# Place -D or -U options here for C sources\r
+CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD) $(LUFA_OPTS)\r
+\r
+\r
+# Place -D or -U options here for ASM sources\r
+ADEFS = -DF_CPU=$(F_CPU)\r
+\r
+\r
+# Place -D or -U options here for C++ sources\r
+CPPDEFS = -DF_CPU=$(F_CPU)UL\r
+#CPPDEFS += -D__STDC_LIMIT_MACROS\r
+#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
+\r
+\r
+\r
+#---------------- Compiler Options C ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CFLAGS = -g$(DEBUG)\r
+CFLAGS += $(CDEFS)\r
+CFLAGS += -O$(OPT)\r
+CFLAGS += -funsigned-char\r
+CFLAGS += -funsigned-bitfields\r
+CFLAGS += -ffunction-sections\r
+CFLAGS += -fpack-struct\r
+CFLAGS += -fshort-enums\r
+CFLAGS += -finline-limit=20\r
+CFLAGS += -Wall\r
+CFLAGS += -Wstrict-prototypes\r
+CFLAGS += -Wundef\r
+#CFLAGS += -fno-unit-at-a-time\r
+#CFLAGS += -Wunreachable-code\r
+#CFLAGS += -Wsign-compare\r
+CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+CFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Compiler Options C++ ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CPPFLAGS = -g$(DEBUG)\r
+CPPFLAGS += $(CPPDEFS)\r
+CPPFLAGS += -O$(OPT)\r
+CPPFLAGS += -funsigned-char\r
+CPPFLAGS += -funsigned-bitfields\r
+CPPFLAGS += -fpack-struct\r
+CPPFLAGS += -fshort-enums\r
+CPPFLAGS += -fno-exceptions\r
+CPPFLAGS += -Wall\r
+CFLAGS += -Wundef\r
+#CPPFLAGS += -mshort-calls\r
+#CPPFLAGS += -fno-unit-at-a-time\r
+#CPPFLAGS += -Wstrict-prototypes\r
+#CPPFLAGS += -Wunreachable-code\r
+#CPPFLAGS += -Wsign-compare\r
+CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
+CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+#CPPFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Assembler Options ----------------\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns: create listing\r
+# -gstabs: have the assembler create line number information; note that\r
+# for use in COFF files, additional information about filenames\r
+# and function names needs to be present in the assembler source\r
+# files -- see avr-libc docs [FIXME: not yet described there]\r
+# -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
+# dump that will be displayed for a given single line of source input.\r
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
+\r
+\r
+#---------------- Library Options ----------------\r
+# Minimalistic printf version\r
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
+\r
+# Floating point printf version (requires MATH_LIB = -lm below)\r
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
+\r
+# If this is left blank, then it will use the Standard printf version.\r
+PRINTF_LIB = \r
+#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
+#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
+\r
+\r
+# Minimalistic scanf version\r
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
+\r
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
+\r
+# If this is left blank, then it will use the Standard scanf version.\r
+SCANF_LIB = \r
+#SCANF_LIB = $(SCANF_LIB_MIN)\r
+#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
+\r
+\r
+MATH_LIB = -lm\r
+\r
+\r
+# List any extra directories to look for libraries here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRALIBDIRS = \r
+\r
+\r
+\r
+#---------------- External Memory Options ----------------\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# used for variables (.data/.bss) and heap (malloc()).\r
+#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# only used for heap (malloc()).\r
+#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+EXTMEMOPTS =\r
+\r
+\r
+\r
+#---------------- Linker Options ----------------\r
+# -Wl,...: tell GCC to pass this to linker.\r
+# -Map: create map file\r
+# --cref: add cross reference to map file\r
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref\r
+LDFLAGS += -Wl,--relax \r
+LDFLAGS += -Wl,--gc-sections\r
+LDFLAGS += $(EXTMEMOPTS)\r
+LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
+#LDFLAGS += -T linker_script.x\r
+\r
+\r
+\r
+#---------------- Programming Options (avrdude) ----------------\r
+\r
+# Programming hardware: alf avr910 avrisp bascom bsd \r
+# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500\r
+#\r
+# Type: avrdude -c ?\r
+# to get a full listing.\r
+#\r
+AVRDUDE_PROGRAMMER = jtagmkII\r
+\r
+# com1 = serial port. Use lpt1 to connect to parallel port.\r
+AVRDUDE_PORT = usb\r
+\r
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
+\r
+\r
+# Uncomment the following if you want avrdude's erase cycle counter.\r
+# Note that this counter needs to be initialized first using -Yn,\r
+# see avrdude manual.\r
+#AVRDUDE_ERASE_COUNTER = -y\r
+\r
+# Uncomment the following if you do /not/ wish a verification to be\r
+# performed after programming the device.\r
+#AVRDUDE_NO_VERIFY = -V\r
+\r
+# Increase verbosity level. Please use this when submitting bug\r
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> \r
+# to submit bug reports.\r
+#AVRDUDE_VERBOSE = -v -v\r
+\r
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
+AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
+AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
+AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
+\r
+\r
+\r
+#---------------- Debugging Options ----------------\r
+\r
+# For simulavr only - target MCU frequency.\r
+DEBUG_MFREQ = $(F_CPU)\r
+\r
+# Set the DEBUG_UI to either gdb or insight.\r
+# DEBUG_UI = gdb\r
+DEBUG_UI = insight\r
+\r
+# Set the debugging back-end to either avarice, simulavr.\r
+DEBUG_BACKEND = avarice\r
+#DEBUG_BACKEND = simulavr\r
+\r
+# GDB Init Filename.\r
+GDBINIT_FILE = __avr_gdbinit\r
+\r
+# When using avarice settings for the JTAG\r
+JTAG_DEV = /dev/com1\r
+\r
+# Debugging port used to communicate between GDB / avarice / simulavr.\r
+DEBUG_PORT = 4242\r
+\r
+# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
+# just set to localhost unless doing some sort of crazy debugging when \r
+# avarice is running on a different computer.\r
+DEBUG_HOST = localhost\r
+\r
+\r
+\r
+#============================================================================\r
+\r
+\r
+# Define programs and commands.\r
+SHELL = sh\r
+CC = avr-gcc\r
+OBJCOPY = avr-objcopy\r
+OBJDUMP = avr-objdump\r
+SIZE = avr-size\r
+AR = avr-ar rcs\r
+NM = avr-nm\r
+AVRDUDE = avrdude\r
+REMOVE = rm -f\r
+REMOVEDIR = rm -rf\r
+COPY = cp\r
+WINSHELL = cmd\r
+\r
+# Define Messages\r
+# English\r
+MSG_ERRORS_NONE = Errors: none\r
+MSG_BEGIN = -------- begin --------\r
+MSG_END = -------- end --------\r
+MSG_SIZE_BEFORE = Size before: \r
+MSG_SIZE_AFTER = Size after:\r
+MSG_COFF = Converting to AVR COFF:\r
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
+MSG_FLASH = Creating load file for Flash:\r
+MSG_EEPROM = Creating load file for EEPROM:\r
+MSG_EXTENDED_LISTING = Creating Extended Listing:\r
+MSG_SYMBOL_TABLE = Creating Symbol Table:\r
+MSG_LINKING = Linking:\r
+MSG_COMPILING = Compiling C:\r
+MSG_COMPILING_CPP = Compiling C++:\r
+MSG_ASSEMBLING = Assembling:\r
+MSG_CLEANING = Cleaning project:\r
+MSG_CREATING_LIBRARY = Creating library:\r
+\r
+\r
+\r
+\r
+# Define all object files.\r
+OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
+\r
+# Define all listing files.\r
+LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
+\r
+\r
+# Compiler flags to generate dependency files.\r
+GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
+\r
+\r
+# Combine all necessary flags and optional flags.\r
+# Add target processor to flags.\r
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
+ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
+\r
+\r
+\r
+\r
+\r
+# Default target.\r
+all: begin gccversion sizebefore build checkhooks checklibmode checkboard sizeafter end\r
+\r
+# Change the build target to build a HEX file or a library.\r
+build: elf hex eep lss sym\r
+#build: lib\r
+\r
+\r
+elf: $(TARGET).elf\r
+hex: $(TARGET).hex\r
+eep: $(TARGET).eep\r
+lss: $(TARGET).lss\r
+sym: $(TARGET).sym\r
+LIBNAME=lib$(TARGET).a\r
+lib: $(LIBNAME)\r
+\r
+\r
+\r
+# Eye candy.\r
+# AVR Studio 3.x does not check make's exit code but relies on\r
+# the following magic strings to be generated by the compile job.\r
+begin:\r
+ @echo\r
+ @echo $(MSG_BEGIN)\r
+\r
+end:\r
+ @echo $(MSG_END)\r
+ @echo\r
+\r
+\r
+# Display size of file.\r
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
+\r
+sizebefore:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+sizeafter:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+checkhooks: build\r
+ @echo\r
+ @echo ------- Unhooked LUFA Events -------\r
+ @$(shell) (grep -s '^EVENT_.*LUFA/.*\\.o' $(TARGET).map | \\r
+ cut -d' ' -f1 | cut -d'_' -f2- | grep ".*") || \\r
+ echo "(None)"\r
+ @echo ------------------------------------\r
+\r
+checklibmode:\r
+ @echo\r
+ @echo ----------- Library Mode -----------\r
+ @$(shell) ($(CC) $(ALL_CFLAGS) -E -dM - < /dev/null \\r
+ | grep 'USB_\(DEVICE\|HOST\)_ONLY' | cut -d' ' -f2 | grep ".*") \\r
+ || echo "No specific mode (both device and host mode allowable)."\r
+ @echo ------------------------------------\r
+\r
+checkboard:\r
+ @echo\r
+ @echo ---------- Selected Board ----------\r
+ @echo Selected board model is $(BOARD).\r
+ @echo ------------------------------------\r
+ \r
+# Display compiler version information.\r
+gccversion : \r
+ @$(CC) --version\r
+\r
+\r
+\r
+# Program the device. \r
+program: $(TARGET).hex $(TARGET).eep\r
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
+\r
+flip: $(TARGET).hex\r
+ batchisp -hardware usb -device $(MCU) -operation erase f\r
+ batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu: $(TARGET).hex\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) flash --debug 1 $(TARGET).hex\r
+ dfu-programmer $(MCU) reset\r
+\r
+flip-ee: $(TARGET).hex $(TARGET).eep\r
+ copy $(TARGET).eep $(TARGET)eep.hex\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu-ee: $(TARGET).hex $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
+ dfu-programmer $(MCU) reset\r
+\r
+\r
+# Generate avr-gdb config/init file which does the following:\r
+# define the reset signal, load the target file, connect to target, and set \r
+# a breakpoint at main().\r
+gdb-config: \r
+ @$(REMOVE) $(GDBINIT_FILE)\r
+ @echo define reset >> $(GDBINIT_FILE)\r
+ @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
+ @echo end >> $(GDBINIT_FILE)\r
+ @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
+ @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)\r
+ifeq ($(DEBUG_BACKEND),simulavr)\r
+ @echo load >> $(GDBINIT_FILE)\r
+endif\r
+ @echo break main >> $(GDBINIT_FILE)\r
+\r
+debug: gdb-config $(TARGET).elf\r
+ifeq ($(DEBUG_BACKEND), avarice)\r
+ @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
+ @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
+ $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
+ @$(WINSHELL) /c pause\r
+\r
+else\r
+ @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
+ $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
+endif\r
+ @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
+\r
+\r
+\r
+\r
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
+COFFCONVERT = $(OBJCOPY) --debugging\r
+COFFCONVERT += --change-section-address .data-0x800000\r
+COFFCONVERT += --change-section-address .bss-0x800000\r
+COFFCONVERT += --change-section-address .noinit-0x800000\r
+COFFCONVERT += --change-section-address .eeprom-0x810000\r
+\r
+\r
+\r
+coff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
+\r
+\r
+extcoff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
+\r
+\r
+\r
+# Create final output files (.hex, .eep) from ELF output file.\r
+%.hex: %.elf\r
+ @echo\r
+ @echo $(MSG_FLASH) $@\r
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@\r
+\r
+%.eep: %.elf\r
+ @echo\r
+ @echo $(MSG_EEPROM) $@\r
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
+ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
+\r
+# Create extended listing file from ELF output file.\r
+%.lss: %.elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_LISTING) $@\r
+ $(OBJDUMP) -h -z -S $< > $@\r
+\r
+# Create a symbol table from ELF output file.\r
+%.sym: %.elf\r
+ @echo\r
+ @echo $(MSG_SYMBOL_TABLE) $@\r
+ $(NM) -n $< > $@\r
+\r
+\r
+\r
+# Create library from object files.\r
+.SECONDARY : $(TARGET).a\r
+.PRECIOUS : $(OBJ)\r
+%.a: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_CREATING_LIBRARY) $@\r
+ $(AR) $@ $(OBJ)\r
+\r
+\r
+# Link: create ELF output file from object files.\r
+.SECONDARY : $(TARGET).elf\r
+.PRECIOUS : $(OBJ)\r
+%.elf: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_LINKING) $@\r
+ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
+\r
+\r
+# Compile: create object files from C source files.\r
+$(OBJDIR)/%.o : %.c\r
+ @echo\r
+ @echo $(MSG_COMPILING) $<\r
+ $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create object files from C++ source files.\r
+$(OBJDIR)/%.o : %.cpp\r
+ @echo\r
+ @echo $(MSG_COMPILING_CPP) $<\r
+ $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create assembler files from C source files.\r
+%.s : %.c\r
+ $(CC) -S $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C++ source files.\r
+%.s : %.cpp\r
+ $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Assemble: create object files from assembler source files.\r
+$(OBJDIR)/%.o : %.S\r
+ @echo\r
+ @echo $(MSG_ASSEMBLING) $<\r
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
+\r
+\r
+# Create preprocessed source for use in sending a bug report.\r
+%.i : %.c\r
+ $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
+ \r
+\r
+# Target: clean project.\r
+clean: begin clean_list clean_binary end\r
+\r
+clean_binary:\r
+ $(REMOVE) $(TARGET).hex\r
+ \r
+clean_list:\r
+ @echo $(MSG_CLEANING)\r
+ $(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
+ $(REMOVE) $(TARGET).cof\r
+ $(REMOVE) $(TARGET).elf\r
+ $(REMOVE) $(TARGET).map\r
+ $(REMOVE) $(TARGET).sym\r
+ $(REMOVE) $(TARGET).lss\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o)\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst)\r
+ $(REMOVE) $(SRC:.c=.s)\r
+ $(REMOVE) $(SRC:.c=.d)\r
+ $(REMOVE) $(SRC:.c=.i)\r
+ $(REMOVEDIR) .dep\r
+\r
+\r
+doxygen:\r
+ @echo Generating Project Documentation...\r
+ @doxygen Doxygen.conf\r
+ @echo Documentation Generation Complete.\r
+\r
+clean_doxygen:\r
+ rm -rf Documentation\r
+\r
+# Create object files directory\r
+$(shell mkdir $(OBJDIR) 2>/dev/null)\r
+\r
+\r
+# Include the dependency files.\r
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
+\r
+\r
+# Listing of phony targets.\r
+.PHONY : all checkhooks checklibmode checkboard \\r
+begin finish end sizebefore sizeafter gccversion \\r
+build elf hex eep lss sym coff extcoff clean \\r
+clean_list clean_binary program debug gdb-config \\r
+doxygen dfu flip flip-ee dfu-ee
\ No newline at end of file
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r
-<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File></Folder><Folder name="CDC"><File path="Demos\Device\ClassDriver\CDC\CDC.c"></File><File path="Demos\Device\ClassDriver\CDC\CDC.h"></File><File path="Demos\Device\ClassDriver\CDC\CDC.txt"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\CDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\CDC\LUFA CDC.inf"></File><File path="Demos\Device\ClassDriver\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualCDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.c"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.h"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.txt"></File><File path="Demos\Device\ClassDriver\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\ClassDriver\DualCDC\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Demos\Device\ClassDriver\USBtoSerial\Lib\RingBuff.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Demos\Device\ClassDriver\USBtoSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Demos\Device\ClassDriver\USBtoSerial\makefile"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.h"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.txt"></File></Folder><File path="Demos\Device\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File></Folder><Folder name="CDC"><File path="Demos\Device\LowLevel\CDC\CDC.c"></File><File path="Demos\Device\LowLevel\CDC\CDC.h"></File><File path="Demos\Device\LowLevel\CDC\CDC.txt"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\CDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\CDC\LUFA CDC.inf"></File><File path="Demos\Device\LowLevel\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\LowLevel\DualCDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualCDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualCDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.c"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.h"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.txt"></File><File path="Demos\Device\LowLevel\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\LowLevel\DualCDC\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDISConstants.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Demos\Device\LowLevel\USBtoSerial\Lib\RingBuff.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Demos\Device\LowLevel\USBtoSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\USBtoSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Demos\Device\LowLevel\USBtoSerial\makefile"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.h"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.txt"></File></Folder><File path="Demos\Device\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="SideShow"><File path="Demos\Device\Incomplete\Sideshow\SideshowContent.h"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowContent.c"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="CDCHost"><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.c"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.h"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.txt"></File><File path="Demos\Host\ClassDriver\CDCHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\CDCHost\makefile"></File></Folder></Folder><Folder name="LowLevel"><Folder name="CDCHost"><File path="Demos\Host\LowLevel\CDCHost\CDCHost.c"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.h"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.txt"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\CDCHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\CDCHost\makefile"></File></Folder><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File></Folder><File path="Demos\Host\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothStack.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="OTG"><Folder name="TestApp"><File path="Demos\OTG\TestApp\Descriptors.c"></File><File path="Demos\OTG\TestApp\Descriptors.h"></File><File path="Demos\OTG\TestApp\Doxygen.conf"></File><File path="Demos\OTG\TestApp\makefile"></File><File path="Demos\OTG\TestApp\TestApp.c"></File><File path="Demos\OTG\TestApp\TestApp.h"></File><File path="Demos\OTG\TestApp\TestApp.txt"></File><File path="Demos\OTG\TestApp\TestEvents.c"></File><File path="Demos\OTG\TestApp\TestEvents.h"></File></Folder><File path="Demos\OTG\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\FunctionAttributes.h"></File><File path="LUFA\Common\BoardTypes.h"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="LowLevel"><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.c"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.h"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.c"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.h"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\Device.h"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.c"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.h"></File><File path="LUFA\Drivers\USB\LowLevel\Host.c"></File><File path="LUFA\Drivers\USB\LowLevel\Host.h"></File><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\OTG.h"></File></Folder><Folder name="HighLevel"><File path="LUFA\Drivers\USB\HighLevel\USBTask.h"></File><File path="LUFA\Drivers\USB\HighLevel\Events.c"></File><File path="LUFA\Drivers\USB\HighLevel\Events.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.c"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBTask.c"></File><File path="LUFA\Drivers\USB\HighLevel\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\HighLevel\StdRequestType.h"></File><File path="LUFA\Drivers\USB\HighLevel\StreamCallbacks.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBMode.h"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.h"></File></Folder><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\HID.c"></File><File path="LUFA\Drivers\USB\Class\Device\HID.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISConstants.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Host\HID.c"></File><File path="LUFA\Drivers\USB\Class\Host\HID.h"></File><File path="LUFA\Drivers\USB\Class\Host\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Host\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.h"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Common\HID.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImage.h"></File></Folder><File path="LUFA\Drivers\USB\Class\Audio.h"></File><File path="LUFA\Drivers\USB\Class\CDC.h"></File><File path="LUFA\Drivers\USB\Class\HID.h"></File><File path="LUFA\Drivers\USB\Class\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\StillImage.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File></Folder><Folder name="Board"><Folder name="USBKEY"><File path="LUFA\Drivers\Board\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\USBKEY\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\USBKEY\LEDs.h"></File><File path="LUFA\Drivers\Board\USBKEY\Buttons.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\STK526\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\STK526\LEDs.h"></File><File path="LUFA\Drivers\Board\STK526\Buttons.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\STK525\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\STK525\LEDs.h"></File><File path="LUFA\Drivers\Board\STK525\Buttons.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\ATAVRUSBRF01\LEDs.h"></File><File path="LUFA\Drivers\Board\ATAVRUSBRF01\Buttons.h"></File></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AT90USBXXX67"><File path="LUFA\Drivers\Peripheral\AT90USBXXX67\ADC.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\Serial.c"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialStream.c"></File><File path="LUFA\Drivers\Peripheral\SerialStream.h"></File></Folder></Folder><Folder name="DriverStubs"><File path="LUFA\DriverStubs\Dataflash.h"></File><File path="LUFA\DriverStubs\Joystick.h"></File><File path="LUFA\DriverStubs\LEDs.h"></File><File path="LUFA\DriverStubs\Buttons.h"></File></Folder><Folder name="ManPages"><File path="LUFA\ManPages\AboutLUFA.txt"></File><File path="LUFA\ManPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\ManPages\ChangeLog.txt"></File><File path="LUFA\ManPages\CompileTimeTokens.txt"></File><File path="LUFA\ManPages\DevelopingWithLUFA.txt"></File><File path="LUFA\ManPages\DeviceSupport.txt"></File><File path="LUFA\ManPages\DirectorySummaries.txt"></File><File path="LUFA\ManPages\Donating.txt"></File><File path="LUFA\ManPages\FutureChanges.txt"></File><File path="LUFA\ManPages\GettingStarted.txt"></File><File path="LUFA\ManPages\Groups.txt"></File><File path="LUFA\ManPages\LibraryResources.txt"></File><File path="LUFA\ManPages\LUFAPoweredProjects.txt"></File><File path="LUFA\ManPages\MainPage.txt"></File><File path="LUFA\ManPages\MigrationInformation.txt"></File><File path="LUFA\ManPages\VIDAndPIDValues.txt"></File><File path="LUFA\ManPages\WritingBoardDrivers.txt"></File><File path="LUFA\ManPages\ConfiguringApps.txt"></File><File path="LUFA\ManPages\CompilingApps.txt"></File><File path="LUFA\ManPages\ProgrammingApps.txt"></File><File path="LUFA\ManPages\LibraryApps.txt"></File><File path="LUFA\ManPages\Licence.txt"></File></Folder><Folder name="Scheduler"><File path="LUFA\Scheduler\Scheduler.c"></File><File path="LUFA\Scheduler\Scheduler.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File></Folder><Folder name="Projects"><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><File path="Projects\MissileLauncher\ConfigDescriptor.c"></File><File path="Projects\MissileLauncher\ConfigDescriptor.h"></File><File path="Projects\MissileLauncher\Doxygen.conf"></File><File path="Projects\MissileLauncher\makefile"></File><File path="Projects\MissileLauncher\MissileLauncher.c"></File><File path="Projects\MissileLauncher\MissileLauncher.h"></File><File path="Projects\MissileLauncher\MissileLauncher.txt"></File></Folder><File path="Projects\makefile"></File></Folder><Folder name="Bootloaders"><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File></Folder><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File></Folder><Folder name="TeensyHID"><File path="Bootloaders\TeensyHID\Descriptors.c"></File><File path="Bootloaders\TeensyHID\Descriptors.h"></File><File path="Bootloaders\TeensyHID\makefile"></File><File path="Bootloaders\TeensyHID\TeensyHID.c"></File><File path="Bootloaders\TeensyHID\TeensyHID.h"></File><File path="Bootloaders\TeensyHID\TeensyHID.txt"></File></Folder><File path="Bootloaders\makefile"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
+<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File></Folder><Folder name="CDC"><File path="Demos\Device\ClassDriver\CDC\CDC.c"></File><File path="Demos\Device\ClassDriver\CDC\CDC.h"></File><File path="Demos\Device\ClassDriver\CDC\CDC.txt"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\CDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\CDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\CDC\LUFA CDC.inf"></File><File path="Demos\Device\ClassDriver\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualCDC\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualCDC\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.c"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.h"></File><File path="Demos\Device\ClassDriver\DualCDC\DualCDC.txt"></File><File path="Demos\Device\ClassDriver\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\ClassDriver\DualCDC\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Demos\Device\ClassDriver\USBtoSerial\Lib\RingBuff.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Demos\Device\ClassDriver\USBtoSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\USBtoSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Demos\Device\ClassDriver\USBtoSerial\makefile"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.c"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.h"></File><File path="Demos\Device\ClassDriver\USBtoSerial\USBtoSerial.txt"></File></Folder><File path="Demos\Device\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File></Folder><Folder name="CDC"><File path="Demos\Device\LowLevel\CDC\CDC.c"></File><File path="Demos\Device\LowLevel\CDC\CDC.h"></File><File path="Demos\Device\LowLevel\CDC\CDC.txt"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\CDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\CDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\CDC\LUFA CDC.inf"></File><File path="Demos\Device\LowLevel\CDC\makefile"></File></Folder><Folder name="DualCDC"><File path="Demos\Device\LowLevel\DualCDC\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualCDC\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualCDC\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.c"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.h"></File><File path="Demos\Device\LowLevel\DualCDC\DualCDC.txt"></File><File path="Demos\Device\LowLevel\DualCDC\LUFA DualCDC.inf"></File><File path="Demos\Device\LowLevel\DualCDC\makefile"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDISConstants.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File></Folder><Folder name="USBtoSerial"><Folder name="Lib"><File path="Demos\Device\LowLevel\USBtoSerial\Lib\RingBuff.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\Lib\RingBuff.h"></File></Folder><File path="Demos\Device\LowLevel\USBtoSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\USBtoSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Demos\Device\LowLevel\USBtoSerial\makefile"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.c"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.h"></File><File path="Demos\Device\LowLevel\USBtoSerial\USBtoSerial.txt"></File></Folder><File path="Demos\Device\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="SideShow"><File path="Demos\Device\Incomplete\Sideshow\SideshowContent.h"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\SideshowContent.c"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="CDCHost"><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.c"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.h"></File><File path="Demos\Host\ClassDriver\CDCHost\CDCHost.txt"></File><File path="Demos\Host\ClassDriver\CDCHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\CDCHost\makefile"></File></Folder></Folder><Folder name="LowLevel"><Folder name="CDCHost"><File path="Demos\Host\LowLevel\CDCHost\CDCHost.c"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.h"></File><File path="Demos\Host\LowLevel\CDCHost\CDCHost.txt"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\CDCHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\CDCHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\CDCHost\makefile"></File></Folder><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\SCSI_Codes.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File></Folder><File path="Demos\Host\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.h"></File></Folder><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File></Folder><Folder name="PrinterHost"><File path="Demos\Host\Incomplete\PrinterHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\PrinterHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\PrinterHost\makefile"></File><File path="Demos\Host\Incomplete\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\Incomplete\PrinterHost\PrinterHost.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="OTG"><Folder name="TestApp"><File path="Demos\OTG\TestApp\Descriptors.c"></File><File path="Demos\OTG\TestApp\Descriptors.h"></File><File path="Demos\OTG\TestApp\Doxygen.conf"></File><File path="Demos\OTG\TestApp\makefile"></File><File path="Demos\OTG\TestApp\TestApp.c"></File><File path="Demos\OTG\TestApp\TestApp.h"></File><File path="Demos\OTG\TestApp\TestApp.txt"></File><File path="Demos\OTG\TestApp\TestEvents.c"></File><File path="Demos\OTG\TestApp\TestEvents.h"></File></Folder><File path="Demos\OTG\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\FunctionAttributes.h"></File><File path="LUFA\Common\BoardTypes.h"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="LowLevel"><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.c"></File><File path="LUFA\Drivers\USB\LowLevel\LowLevel.h"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.c"></File><File path="LUFA\Drivers\USB\LowLevel\Pipe.h"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\DevChapter9.h"></File><File path="LUFA\Drivers\USB\LowLevel\Device.h"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.c"></File><File path="LUFA\Drivers\USB\LowLevel\Endpoint.h"></File><File path="LUFA\Drivers\USB\LowLevel\Host.c"></File><File path="LUFA\Drivers\USB\LowLevel\Host.h"></File><File path="LUFA\Drivers\USB\LowLevel\HostChapter9.c"></File><File path="LUFA\Drivers\USB\LowLevel\OTG.h"></File></Folder><Folder name="HighLevel"><File path="LUFA\Drivers\USB\HighLevel\USBTask.h"></File><File path="LUFA\Drivers\USB\HighLevel\Events.c"></File><File path="LUFA\Drivers\USB\HighLevel\Events.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.c"></File><File path="LUFA\Drivers\USB\HighLevel\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBTask.c"></File><File path="LUFA\Drivers\USB\HighLevel\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\HighLevel\StdRequestType.h"></File><File path="LUFA\Drivers\USB\HighLevel\StreamCallbacks.h"></File><File path="LUFA\Drivers\USB\HighLevel\USBMode.h"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\HighLevel\ConfigDescriptor.h"></File></Folder><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\HID.c"></File><File path="LUFA\Drivers\USB\Class\Device\HID.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISConstants.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Device\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDI.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Host\HID.c"></File><File path="LUFA\Drivers\USB\Class\Host\HID.h"></File><File path="LUFA\Drivers\USB\Class\Host\Audio.c"></File><File path="LUFA\Drivers\USB\Class\Host\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImage.h"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\Audio.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDC.h"></File><File path="LUFA\Drivers\USB\Class\Common\HID.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImage.h"></File></Folder><File path="LUFA\Drivers\USB\Class\Audio.h"></File><File path="LUFA\Drivers\USB\Class\CDC.h"></File><File path="LUFA\Drivers\USB\Class\HID.h"></File><File path="LUFA\Drivers\USB\Class\MassStorage.h"></File><File path="LUFA\Drivers\USB\Class\MIDI.h"></File><File path="LUFA\Drivers\USB\Class\RNDIS.h"></File><File path="LUFA\Drivers\USB\Class\StillImage.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File></Folder><Folder name="Board"><Folder name="USBKEY"><File path="LUFA\Drivers\Board\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\USBKEY\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\USBKEY\LEDs.h"></File><File path="LUFA\Drivers\Board\USBKEY\Buttons.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\STK526\AT45DB642D.h"></File><File path="LUFA\Drivers\Board\STK526\LEDs.h"></File><File path="LUFA\Drivers\Board\STK526\Buttons.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\STK525\AT45DB321C.h"></File><File path="LUFA\Drivers\Board\STK525\LEDs.h"></File><File path="LUFA\Drivers\Board\STK525\Buttons.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\ATAVRUSBRF01\LEDs.h"></File><File path="LUFA\Drivers\Board\ATAVRUSBRF01\Buttons.h"></File></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AT90USBXXX67"><File path="LUFA\Drivers\Peripheral\AT90USBXXX67\ADC.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\Serial.c"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialStream.c"></File><File path="LUFA\Drivers\Peripheral\SerialStream.h"></File></Folder></Folder><Folder name="DriverStubs"><File path="LUFA\DriverStubs\Dataflash.h"></File><File path="LUFA\DriverStubs\Joystick.h"></File><File path="LUFA\DriverStubs\LEDs.h"></File><File path="LUFA\DriverStubs\Buttons.h"></File></Folder><Folder name="ManPages"><File path="LUFA\ManPages\AboutLUFA.txt"></File><File path="LUFA\ManPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\ManPages\ChangeLog.txt"></File><File path="LUFA\ManPages\CompileTimeTokens.txt"></File><File path="LUFA\ManPages\DevelopingWithLUFA.txt"></File><File path="LUFA\ManPages\DeviceSupport.txt"></File><File path="LUFA\ManPages\DirectorySummaries.txt"></File><File path="LUFA\ManPages\Donating.txt"></File><File path="LUFA\ManPages\FutureChanges.txt"></File><File path="LUFA\ManPages\GettingStarted.txt"></File><File path="LUFA\ManPages\Groups.txt"></File><File path="LUFA\ManPages\LibraryResources.txt"></File><File path="LUFA\ManPages\LUFAPoweredProjects.txt"></File><File path="LUFA\ManPages\MainPage.txt"></File><File path="LUFA\ManPages\MigrationInformation.txt"></File><File path="LUFA\ManPages\VIDAndPIDValues.txt"></File><File path="LUFA\ManPages\WritingBoardDrivers.txt"></File><File path="LUFA\ManPages\ConfiguringApps.txt"></File><File path="LUFA\ManPages\CompilingApps.txt"></File><File path="LUFA\ManPages\ProgrammingApps.txt"></File><File path="LUFA\ManPages\LibraryApps.txt"></File><File path="LUFA\ManPages\Licence.txt"></File></Folder><Folder name="Scheduler"><File path="LUFA\Scheduler\Scheduler.c"></File><File path="LUFA\Scheduler\Scheduler.h"></File></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File></Folder><Folder name="Projects"><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><File path="Projects\MissileLauncher\ConfigDescriptor.c"></File><File path="Projects\MissileLauncher\ConfigDescriptor.h"></File><File path="Projects\MissileLauncher\Doxygen.conf"></File><File path="Projects\MissileLauncher\makefile"></File><File path="Projects\MissileLauncher\MissileLauncher.c"></File><File path="Projects\MissileLauncher\MissileLauncher.h"></File><File path="Projects\MissileLauncher\MissileLauncher.txt"></File></Folder><File path="Projects\makefile"></File></Folder><Folder name="Bootloaders"><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File></Folder><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File></Folder><Folder name="TeensyHID"><File path="Bootloaders\TeensyHID\Descriptors.c"></File><File path="Bootloaders\TeensyHID\Descriptors.h"></File><File path="Bootloaders\TeensyHID\makefile"></File><File path="Bootloaders\TeensyHID\TeensyHID.c"></File><File path="Bootloaders\TeensyHID\TeensyHID.h"></File><File path="Bootloaders\TeensyHID\TeensyHID.txt"></File></Folder><File path="Bootloaders\makefile"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
*\r
* \section Sec_ChangeLogXXXXXX Version XXXXXX\r
*\r
- * - Deprecated psuedo-scheduler and removed dynamic memory allocator from the library (first no longer needed and second unused)\r
+ * <b>New:</b>\r
* - Added new class drivers and matching demos to the library for rapid application development\r
* - Added incomplete device and host mode demos for later enhancement\r
- * - Changed bootloaders to use FLASHEND rather than the existence of RAMPZ to determine if far FLASH pointers are needed\r
* - Error status LEDs shown when device endpoint configuration fails to complete in all demos and projects\r
- * - Low level API MIDI device demo no longer blocks if a note change event is sent while the endpoint is not ready\r
- * - Fixes to MassStorageHost for better device compatibility (increase command timeout, change MassStore_WaitForDataReceived()\r
- * to only unfreeze and check one data pipe at a time)\r
- * - Internal per-device preprocessing conditions changed to per-device series rather than per controller group for finer-grain\r
- * internal control\r
* - Added new USB_Host_SetDeviceConfiguration() convenience function for easy configuration selection of devices while in USB\r
* host mode\r
* - Added new USB_Host_ClearPipeStall() convenience function to clear a stall condition on an attached device's endpoint\r
* - Added new USB_Host_GetDeviceDescriptor() convenience function to retrieve the attached device's Device descriptor\r
* - Added USB Missle Launcher project, submitted by Dave Fletcher\r
+ * - Added new USE_INTERNAL_SERIAL define for using the unique serial numbers in some AVR models as the USB device's serial number,\r
+ * added NO_INTERNAL_SERIAL compile time option to turn off new serial number reading code\r
+ * - Added new DATAFLASH_CHIP_MASK() macro to the Dataflash driver, which returns the Dataflash select mask for the given chip index\r
+ * - Updated MassStorage device block write routines to use ping-pong Dataflash buffering to increase throughput by around 30%\r
+ * \r
+ * <b>Changed:</b>\r
+ * - Deprecated psuedo-scheduler and removed dynamic memory allocator from the library (first no longer needed and second unused)\r
+ * - Low level API MIDI device demo no longer blocks if a note change event is sent while the endpoint is not ready\r
+ * - Internal per-device preprocessing conditions changed to per-device series rather than per controller group for finer-grain\r
+ * internal control\r
* - Pipe_GetErrorFlags() now returns additional error flags for overflow and underflow errors\r
+ * - Extended USB_GetDeviceConfigDescriptor() routine to require the configuration number within the device to fetch\r
+ * - Pipe stream functions now automatically set the correct pipe token, so that bidirectional pipes can be used\r
+ * - Pipe_ConfigurePipe() now automatically defaults IN pipes to accepting infinite IN requests, this can still be changed by calling\r
+ * the existing Pipe_SetFiniteINRequests() function\r
+ * - Dataflash_WaitWhileBusy() now always ensures that the dataflash is ready for the next command immediately after returning,\r
+ * no need to call Dataflash_ToggleSelectedChipCS() afterwards\r
+ * - Changed F_CLOCK entries in project makefiles to alias to F_CPU by default, as this is the most common case\r
+ *\r
+ * <b>Fixed:</b>\r
+ * - Changed bootloaders to use FLASHEND rather than the existence of RAMPZ to determine if far FLASH pointers are needed to fix\r
+ * bootloaders on some of the USB AVR devices where avr-libc erronously defines RAMPZ\r
+ * - Fixes to MassStorageHost for better device compatibility (increase command timeout, change MassStore_WaitForDataReceived()\r
+ * to only unfreeze and check one data pipe at a time) to prevent incorrect enumerations and freezes\r
* - Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is\r
* cleared to prevent endpoint type corruption\r
* - Fix documentation mentioning Pipe_GetCurrentToken() function when real name is Pipe_GetPipeToken()\r
- * - Extended USB_GetDeviceConfigDescriptor() routine to require the configuration number within the device to fetch\r
- * - Added new USE_INTERNAL_SERIAL define for using the unique serial numbers in some AVR models as the USB device's serial number,\r
- * added NO_INTERNAL_SERIAL compile time option to turn off new serial number reading code\r
* - Fixed ADC driver for the ATMEGA32U4 and ATMEGA16U4 (thanks to Opendous Inc.)\r
* - Fixed CDCHost demo unfreezing the pipes at the point of configuration, rather than use\r
- * - Pipe stream functions now automatically set the correct pipe token, so that bidirectional pipes can be used\r
- * - Pipe_ConfigurePipe() now automatically defaults IN pipes to accepting infinite IN requests, this can still be changed by calling\r
- * the existing Pipe_SetFiniteINRequests() function\r
* - Fixed MassStorage demo not clearing the reset flag when a Mass Storage Reset is issued while not processing a command\r
* - Fixed USB_Host_SendControlRequest() not re-suspending the USB bus when initial device ready-wait fails\r
* - Fixed USB Pad regulator not being disabled on some AVR models when the USB_OPT_REG_DISABLED option is used\r
- * - Dataflash_WaitWhileBusy() now always ensures that the dataflash is ready for the next command immediately after returning,\r
- * no need to call Dataflash_ToggleSelectedChipCS() afterwards\r
- * - Added new DATAFLASH_CHIP_MASK() macro to the Dataflash driver, which returns the Dataflash select mask for the given chip index\r
- * - Updated MassStorage device block write routines to use ping-pong Dataflash buffering to increase throughput by around 30%\r
*\r
*\r
* \section Sec_ChangeLog090605 Version 090605\r
* -# Convert Host mode demos to class drivers\r
* -# Re-enable Host mode Class driver builds after completion\r
* -# Update Host mode Class Driver demo .txt files\r
- * - Add standardized descriptor names to device and host class driver structures, controlled by USE_NONSTANDARD_DESCRIPTOR_NAMES\r
+ * - Add standardized descriptor names to device and host class driver structures\r
+ * - Remove USE_NONSTANDARD_DESCRIPTOR_NAMES, make all typedefs unions to allow either naming scheme to be used\r
+ * - Add in INTERRUPT_CONTROL_PIPE to use HSOFI to trigger calls to the host state machine\r
+ * - Remove FAST_STREAM_TRANSFERS as they have little effect\r
+ * - Make Suspend host state suspend USB bus frames\r
+ * - Add in Stream functions for PROGMEM, EEPROM -- move to templated system\r
* - Debug mode for pipe/endpoint calls\r
* - Test and document new FAST_STREAM_TRANSFERS compile time option\r
*\r
* - Add detailed overviews of how each demo works\r
* - Master LUFA include file rather than per-module includes\r
* - Stream reads - return number of bytes not read?\r
+ * - Convert CDC demos to use stdio streams?\r
* - Add multiple-report HID demo to the library\r
* - Add dual role Mouse Host/Keyboard Device demo to the library\r
* - Add hub support to match Atmel's stack\r
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_CLOCK = 16000000
+F_CLOCK = $(F_CPU)
# Output format. (can be srec, ihex, binary)
#\r
# If no clock division is performed on the input clock inside the AVR (via the\r
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
-F_CLOCK = 8000000\r
+F_CLOCK = $(F_CPU)\r
\r
\r
# Output format. (can be srec, ihex, binary)\r