Description
Source
Call Graph
Start Line: 1072
void USBD_SetAddress(unsigned char address)
{
TRACE_INFO_WP("SetAddr(%d) ", address);
// Set address
AT91C_BASE_UDP->UDP_FADDR = AT91C_UDP_FEN | address;
// If the address is 0, the device returns to the Default state
if (address == 0) {
AT91C_BASE_UDP->UDP_GLBSTATE = 0;
deviceState = USBD_STATE_DEFAULT;
}
// If the address is non-zero, the device enters the Address state
else {
AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_FADDEN;
deviceState = USBD_STATE_ADDRESS;
}
}