/* USB Device Set Address Function Parameters: adr: USB Device Address setup: Called in setup stage (!=0), else after status stage Return Value: None  */
void USBD_SetAddress(uint32_t adr, uint32_t setup)
/* USB Device Set Address Function Parameters: adr: USB Device Address setup: Called in setup stage (!=0), else after status stage Return Value: None  */
void USBD_SetAddress(uint32_t adr, uint32_t setup)
{
    if (setup) {
        return;
    }
    if (adr) {
        UDPHS->UDPHS_CTRL |= (UDPHS_CTRL_FADDR_EN | adr);
    } else {
        UDPHS->UDPHS_CTRL &= ~(UDPHS_CTRL_FADDR_EN | UDPHS_CTRL_DEV_ADDR_Msk);
    }
}