Added new *_ENUMERROR_PipeConfigurationFailed error codes for the *_Host_ConfigurePipes() routines.
}
if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
- DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
+ DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false;
}
}
if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
- DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
+ DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false;
}
}
if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
- DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
+ DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false;
}
}
if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
- DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
+ DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false;
}
for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
{
+ uint16_t Size;
+ uint8_t Type;
+ uint8_t Token;
+ uint8_t EndpointAddress;
+ uint8_t InterruptPeriod;
+ bool DoubleBanked;
+
if (PipeNum == CDCInterfaceInfo->Config.DataINPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
- CDCInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataINEndpoint->EndpointSize;
+ EndpointAddress = DataINEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_IN;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = CDCInterfaceInfo->Config.DataINPipeDoubleBank;
+ InterruptPeriod = 0;
CDCInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
}
else if (PipeNum == CDCInterfaceInfo->Config.DataOUTPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
- CDCInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataOUTEndpoint->EndpointSize;
+ EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_OUT;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = CDCInterfaceInfo->Config.DataOUTPipeDoubleBank;
+ InterruptPeriod = 0;
CDCInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
}
else if (PipeNum == CDCInterfaceInfo->Config.NotificationPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- NotificationEndpoint->EndpointAddress, NotificationEndpoint->EndpointSize,
- CDCInterfaceInfo->Config.NotificationPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
- Pipe_SetInterruptPeriod(NotificationEndpoint->PollingIntervalMS);
+ Size = NotificationEndpoint->EndpointSize;
+ EndpointAddress = NotificationEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_IN;
+ Type = EP_TYPE_INTERRUPT;
+ DoubleBanked = CDCInterfaceInfo->Config.NotificationPipeDoubleBank;
+ InterruptPeriod = NotificationEndpoint->PollingIntervalMS;
CDCInterfaceInfo->State.NotificationPipeSize = NotificationEndpoint->EndpointSize;
}
+ else
+ {
+ continue;
+ }
+
+ if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
+ DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
+ {
+ return CDC_ENUMERROR_PipeConfigurationFailed;
+ }
+
+ if (InterruptPeriod)
+ Pipe_SetInterruptPeriod(InterruptPeriod);
}
CDCInterfaceInfo->State.ControlInterfaceNumber = CDCControlInterface->InterfaceNumber;
CDC_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */
CDC_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */
CDC_ENUMERROR_NoCompatibleInterfaceFound = 2, /**< A compatible CDC interface was not found in the device's Configuration Descriptor. */
+ CDC_ENUMERROR_PipeConfigurationFailed = 3, /**< One or more pipes for the specified interface could not be configured correctly. */
};
/* Function Prototypes: */
for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
{
+ uint16_t Size;
+ uint8_t Type;
+ uint8_t Token;
+ uint8_t EndpointAddress;
+ uint8_t InterruptPeriod;
+ bool DoubleBanked;
+
if (PipeNum == HIDInterfaceInfo->Config.DataINPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
- HIDInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
- Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
-
- HIDInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
+ Size = DataINEndpoint->EndpointSize;
+ EndpointAddress = DataINEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_IN;
+ Type = EP_TYPE_INTERRUPT;
+ DoubleBanked = HIDInterfaceInfo->Config.DataINPipeDoubleBank;
+ InterruptPeriod = DataINEndpoint->PollingIntervalMS;
+
+ HIDInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
}
else if (PipeNum == HIDInterfaceInfo->Config.DataOUTPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_INTERRUPT, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
- HIDInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
- Pipe_SetInterruptPeriod(DataOUTEndpoint->PollingIntervalMS);
-
- HIDInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
+ Size = DataOUTEndpoint->EndpointSize;
+ EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_OUT;
+ Type = EP_TYPE_INTERRUPT;
+ DoubleBanked = HIDInterfaceInfo->Config.DataOUTPipeDoubleBank;
+ InterruptPeriod = DataOUTEndpoint->PollingIntervalMS;
+
+ HIDInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
HIDInterfaceInfo->State.DeviceUsesOUTPipe = true;
}
+ else
+ {
+ continue;
+ }
+
+ if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
+ DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
+ {
+ return HID_ENUMERROR_PipeConfigurationFailed;
+ }
+
+ if (InterruptPeriod)
+ Pipe_SetInterruptPeriod(InterruptPeriod);
}
HIDInterfaceInfo->State.InterfaceNumber = HIDInterface->InterfaceNumber;
HID_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */
HID_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */
HID_ENUMERROR_NoCompatibleInterfaceFound = 2, /**< A compatible HID interface was not found in the device's Configuration Descriptor. */
+ HID_ENUMERROR_PipeConfigurationFailed = 3, /**< One or more pipes for the specified interface could not be configured correctly. */
};
/* Function Prototypes: */
for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
{
+ uint16_t Size;
+ uint8_t Type;
+ uint8_t Token;
+ uint8_t EndpointAddress;
+ bool DoubleBanked;
+
if (PipeNum == MIDIInterfaceInfo->Config.DataINPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
- MIDIInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataINEndpoint->EndpointSize;
+ EndpointAddress = DataINEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_IN;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = MIDIInterfaceInfo->Config.DataINPipeDoubleBank;
MIDIInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
}
else if (PipeNum == MIDIInterfaceInfo->Config.DataOUTPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
- MIDIInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataOUTEndpoint->EndpointSize;
+ EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_OUT;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = MIDIInterfaceInfo->Config.DataOUTPipeDoubleBank;
MIDIInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
}
+ else
+ {
+ continue;
+ }
+
+ if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
+ DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
+ {
+ return MIDI_ENUMERROR_PipeConfigurationFailed;
+ }
}
MIDIInterfaceInfo->State.InterfaceNumber = MIDIInterface->InterfaceNumber;
MIDI_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */
MIDI_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */
MIDI_ENUMERROR_NoCompatibleInterfaceFound = 2, /**< A compatible MIDI interface was not found in the device's Configuration Descriptor. */
+ MIDI_ENUMERROR_PipeConfigurationFailed = 3, /**< One or more pipes for the specified interface could not be configured correctly. */
};
/* Function Prototypes: */
for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
{
+ uint16_t Size;
+ uint8_t Type;
+ uint8_t Token;
+ uint8_t EndpointAddress;
+ bool DoubleBanked;
+
if (PipeNum == MSInterfaceInfo->Config.DataINPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
- MSInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataINEndpoint->EndpointSize;
+ EndpointAddress = DataINEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_IN;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = MSInterfaceInfo->Config.DataINPipeDoubleBank;
MSInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
}
else if (PipeNum == MSInterfaceInfo->Config.DataOUTPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
- MSInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
-
+ Size = DataOUTEndpoint->EndpointSize;
+ EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_OUT;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = MSInterfaceInfo->Config.DataOUTPipeDoubleBank;
+
MSInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
}
+ else
+ {
+ continue;
+ }
+
+ if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
+ DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
+ {
+ return MS_ENUMERROR_PipeConfigurationFailed;
+ }
}
MSInterfaceInfo->State.InterfaceNumber = MassStorageInterface->InterfaceNumber;
MS_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */
MS_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */
MS_ENUMERROR_NoCompatibleInterfaceFound = 2, /**< A compatible Mass Storage interface was not found in the device's Configuration Descriptor. */
+ MS_ENUMERROR_PipeConfigurationFailed = 3, /**< One or more pipes for the specified interface could not be configured correctly. */
};
/* Function Prototypes: */
for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
{
+ uint16_t Size;
+ uint8_t Type;
+ uint8_t Token;
+ uint8_t EndpointAddress;
+ bool DoubleBanked;
+
if (PipeNum == PRNTInterfaceInfo->Config.DataINPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
- PRNTInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataINEndpoint->EndpointSize;
+ EndpointAddress = DataINEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_IN;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = PRNTInterfaceInfo->Config.DataINPipeDoubleBank;
PRNTInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
}
else if (PipeNum == PRNTInterfaceInfo->Config.DataOUTPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
- PRNTInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataOUTEndpoint->EndpointSize;
+ EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_OUT;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = PRNTInterfaceInfo->Config.DataOUTPipeDoubleBank;
PRNTInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
}
+ else
+ {
+ continue;
+ }
+
+ if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
+ DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
+ {
+ return PRNT_ENUMERROR_PipeConfigurationFailed;
+ }
}
PRNTInterfaceInfo->State.InterfaceNumber = PrinterInterface->InterfaceNumber;
PRNT_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */
PRNT_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */
PRNT_ENUMERROR_NoCompatibleInterfaceFound = 2, /**< A compatible Printer interface was not found in the device's Configuration Descriptor. */
+ PRNT_ENUMERROR_PipeConfigurationFailed = 3, /**< One or more pipes for the specified interface could not be configured correctly. */
};
/* Function Prototypes: */
for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
{
+ uint16_t Size;
+ uint8_t Type;
+ uint8_t Token;
+ uint8_t EndpointAddress;
+ uint8_t InterruptPeriod;
+ bool DoubleBanked;
+
if (PipeNum == RNDISInterfaceInfo->Config.DataINPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
- RNDISInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataINEndpoint->EndpointSize;
+ EndpointAddress = DataINEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_IN;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = RNDISInterfaceInfo->Config.DataINPipeDoubleBank;
+ InterruptPeriod = 0;
RNDISInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
}
else if (PipeNum == RNDISInterfaceInfo->Config.DataOUTPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
- RNDISInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataOUTEndpoint->EndpointSize;
+ EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_OUT;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = RNDISInterfaceInfo->Config.DataOUTPipeDoubleBank;
+ InterruptPeriod = 0;
RNDISInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
}
else if (PipeNum == RNDISInterfaceInfo->Config.NotificationPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- NotificationEndpoint->EndpointAddress, NotificationEndpoint->EndpointSize,
- RNDISInterfaceInfo->Config.NotificationPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
- Pipe_SetInterruptPeriod(NotificationEndpoint->PollingIntervalMS);
+ Size = NotificationEndpoint->EndpointSize;
+ EndpointAddress = NotificationEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_IN;
+ Type = EP_TYPE_INTERRUPT;
+ DoubleBanked = RNDISInterfaceInfo->Config.NotificationPipeDoubleBank;
+ InterruptPeriod = NotificationEndpoint->PollingIntervalMS;
RNDISInterfaceInfo->State.NotificationPipeSize = NotificationEndpoint->EndpointSize;
}
+ else
+ {
+ continue;
+ }
+
+ if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
+ DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
+ {
+ return CDC_ENUMERROR_PipeConfigurationFailed;
+ }
+
+ if (InterruptPeriod)
+ Pipe_SetInterruptPeriod(InterruptPeriod);
}
RNDISInterfaceInfo->State.ControlInterfaceNumber = RNDISControlInterface->InterfaceNumber;
RNDIS_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */
RNDIS_ENUMERROR_InvalidConfigDescriptor = 1, /**< The device returned an invalid Configuration Descriptor. */
RNDIS_ENUMERROR_NoCompatibleInterfaceFound = 2, /**< A compatible RNDIS interface was not found in the device's Configuration Descriptor. */
+ RNDIS_ENUMERROR_PipeConfigurationFailed = 3, /**< One or more pipes for the specified interface could not be configured correctly. */
};
/* Macros: */
for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
{
+ uint16_t Size;
+ uint8_t Type;
+ uint8_t Token;
+ uint8_t EndpointAddress;
+ uint8_t InterruptPeriod;
+ bool DoubleBanked;
+
if (PipeNum == SIInterfaceInfo->Config.DataINPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize,
- SIInterfaceInfo->Config.DataINPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataINEndpoint->EndpointSize;
+ EndpointAddress = DataINEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_IN;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = SIInterfaceInfo->Config.DataINPipeDoubleBank;
+ InterruptPeriod = 0;
SIInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
}
else if (PipeNum == SIInterfaceInfo->Config.DataOUTPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize,
- SIInterfaceInfo->Config.DataOUTPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
+ Size = DataOUTEndpoint->EndpointSize;
+ EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_OUT;
+ Type = EP_TYPE_BULK;
+ DoubleBanked = SIInterfaceInfo->Config.DataOUTPipeDoubleBank;
+ InterruptPeriod = 0;
SIInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
}
else if (PipeNum == SIInterfaceInfo->Config.EventsPipeNumber)
{
- Pipe_ConfigurePipe(PipeNum, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- EventsEndpoint->EndpointAddress, EventsEndpoint->EndpointSize,
- SIInterfaceInfo->Config.EventsPipeDoubleBank ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE);
- Pipe_SetInterruptPeriod(EventsEndpoint->PollingIntervalMS);
+ Size = EventsEndpoint->EndpointSize;
+ EndpointAddress = EventsEndpoint->EndpointAddress;
+ Token = PIPE_TOKEN_IN;
+ Type = EP_TYPE_INTERRUPT;
+ DoubleBanked = SIInterfaceInfo->Config.EventsPipeDoubleBank;
+ InterruptPeriod = EventsEndpoint->PollingIntervalMS;
SIInterfaceInfo->State.EventsPipeSize = EventsEndpoint->EndpointSize;
}
+ else
+ {
+ continue;
+ }
+
+ if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
+ DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
+ {
+ return SI_ENUMERROR_PipeConfigurationFailed;
+ }
+
+ if (InterruptPeriod)
+ Pipe_SetInterruptPeriod(InterruptPeriod);
}
SIInterfaceInfo->State.InterfaceNumber = StillImageInterface->InterfaceNumber;
SI_ENUMERROR_NoCompatibleInterfaceFound = 2, /**< A compatible Still Image interface was not found in the device's
* Configuration Descriptor.
*/
+ SI_ENUMERROR_PipeConfigurationFailed = 3, /**< One or more pipes for the specified interface could not be configured correctly. */
};
/* Function Prototypes: */
*
* <b>Changed:</b>
* - Core:
- * - None
+ * - Refactored Host mode Class Driver *_Host_ConfigurePipes() routines to be more space efficient when compiled
+ * - Added new *_ENUMERROR_PipeConfigurationFailed error codes for the *_Host_ConfigurePipes() routines
* - Library Applications:
* - Changed the XPLAINBridge software UART to use the regular CTC mode instead of the alternative CTC mode
* via the Input Capture register, to reduce user confusion