{\r
case Bluetooth_Init:\r
Pipe_SelectPipe(BLUETOOTH_EVENTS_PIPE);\r
- Pipe_SetInfiniteINRequests();\r
\r
memset(&Bluetooth_Connection, 0x00, sizeof(Bluetooth_Connection));\r
\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
PIPE_BANK_SINGLE);\r
\r
- Pipe_SetInfiniteINRequests();\r
Pipe_SetInterruptPeriod(EndpointData->PollingIntervalMS);\r
\r
/* Set the flag indicating that the events notification pipe has been found */\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 << BLUETOOTH_DATA_IN_PIPE);\r
}\r
Pipe_ConfigurePipe(CDC_NOTIFICATIONPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
\r
- Pipe_SetInfiniteINRequests();\r
Pipe_SetInterruptPeriod(EndpointData->PollingIntervalMS);\r
\r
/* Set the flag indicating that the notification pipe has been found */\r
/* Configure the data IN pipe */\r
Pipe_ConfigurePipe(CDC_DATAPIPE_IN, EP_TYPE_BULK, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
-\r
- Pipe_SetInfiniteINRequests();\r
\r
/* Set the flag indicating that the data IN pipe has been found */\r
FoundEndpoints |= (1 << CDC_DATAPIPE_IN);\r
/* Configure the HID data IN pipe */\r
Pipe_ConfigurePipe(HID_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
-\r
- Pipe_SetInfiniteINRequests();\r
\r
FoundEndpoints |= (1 << HID_DATA_IN_PIPE);\r
}\r
Pipe_ConfigurePipe(KEYBOARD_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
\r
- Pipe_SetInfiniteINRequests();\r
- \r
/* Valid data found, return success */\r
return SuccessfulConfigRead;\r
}\r
Pipe_ConfigurePipe(KEYBOARD_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
\r
- Pipe_SetInfiniteINRequests();\r
- \r
/* Valid data found, return success */\r
return SuccessfulConfigRead;\r
}\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
PIPE_BANK_DOUBLE);\r
\r
- Pipe_SetInfiniteINRequests();\r
-\r
/* Set the flag indicating that the data IN pipe has been found */\r
FoundEndpoints |= (1 << MASS_STORE_DATA_IN_PIPE);\r
}\r
Pipe_ConfigurePipe(MOUSE_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
\r
- Pipe_SetInfiniteINRequests();\r
- \r
/* Valid data found, return success */\r
return SuccessfulConfigRead;\r
}\r
Pipe_ConfigurePipe(MOUSE_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
\r
- Pipe_SetInfiniteINRequests();\r
- \r
/* Valid data found, return success */\r
return SuccessfulConfigRead;\r
}\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
PIPE_BANK_DOUBLE); \r
\r
- Pipe_SetInfiniteINRequests();\r
Pipe_SetInterruptPeriod(EndpointData->PollingIntervalMS);\r
\r
/* Set the flag indicating that the events pipe has been found */\r
EndpointData->EndpointAddress, EndpointData->EndpointSize,\r
PIPE_BANK_DOUBLE);\r
\r
- Pipe_SetInfiniteINRequests();\r
-\r
/* Set the flag indicating that the data IN pipe has been found */\r
FoundEndpoints |= (1 << SIMAGE_DATA_IN_PIPE);\r
}\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
CDCInterfaceInfo->State.NotificationPipeSize = EndpointData->EndpointSize;\r
\r
- Pipe_SetInfiniteINRequests();\r
Pipe_SetInterruptPeriod(EndpointData->PollingIntervalMS);\r
\r
FoundEndpoints |= CDC_FOUND_DATAPIPE_NOTIFICATION;\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
CDCInterfaceInfo->State.DataINPipeSize = EndpointData->EndpointSize;\r
\r
- Pipe_SetInfiniteINRequests();\r
- Pipe_Unfreeze();\r
- \r
FoundEndpoints |= CDC_FOUND_DATAPIPE_IN;\r
}\r
else\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
CDCInterfaceInfo->State.DataOUTPipeSize = EndpointData->EndpointSize;\r
\r
- Pipe_Unfreeze();\r
- \r
FoundEndpoints |= CDC_FOUND_DATAPIPE_OUT;\r
}\r
}\r
break;\r
}\r
\r
- Pipe_SetInfiniteINRequests();\r
- \r
USB_ControlRequest = (USB_Request_Header_t)\r
{\r
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
UPCFG0X = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));\r
UPCFG1X = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));\r
\r
+ if (Token == PIPE_TOKEN_IN)\r
+ Pipe_SetInfiniteINRequests();\r
+\r
return Pipe_IsConfigured();\r
}\r
\r
*\r
* A newly configured pipe is frozen by default, and must be unfrozen before use via the \ref Pipe_Unfreeze()\r
* before being used. Pipes should be kept frozen unless waiting for data from a device while in IN mode, or\r
- * sending data to the device in OUT mode.\r
+ * sending data to the device in OUT mode. IN type pipes are also automatically configured to accept infinite\r
+ * numbers of IN requests without automatic freezing - this can be overridden by a call to\r
+ * \ref Pipe_SetFiniteINRequests().\r
*\r
* \note The default control pipe does not have to be manually configured, as it is automatically\r
* configured by the library internally.\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
* - 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 \ref Pipe_SetFiniteINRequests() function\r
*\r
*\r
* \section Sec_ChangeLog090605 Version 090605\r
Pipe_ConfigurePipe(HID_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,\r
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);\r
\r
- Pipe_SetInfiniteINRequests();\r
- \r
FoundEndpoints |= (1 << HID_DATA_IN_PIPE);\r
}\r
else\r