Description
Source
Call Graph
Start Line: 981
void USBD_Unhalt(unsigned char bEndpoint)
{
Endpoint *pEndpoint = &(endpoints[bEndpoint]);
// Check if the endpoint is enabled
if (pEndpoint->state != UDP_ENDPOINT_DISABLED) {
TRACE_DEBUG_WP("Unhalt%d ", bEndpoint);
// Return endpoint to Idle state
pEndpoint->state = UDP_ENDPOINT_IDLE;
// Clear FORCESTALL flag
CLEAR_CSR(bEndpoint, AT91C_UDP_FORCESTALL);
// Reset Endpoint Fifos, beware this is a 2 steps operation
AT91C_BASE_UDP->UDP_RSTEP |= 1 << bEndpoint;
AT91C_BASE_UDP->UDP_RSTEP &= ~(1 << bEndpoint);
}
}