dcd_set_address include status response, usbd control stall both control in and out

This commit is contained in:
hathach
2019-03-13 23:14:48 +07:00
parent 195a44172a
commit eda56769b9
16 changed files with 63 additions and 55 deletions

View File

@@ -182,6 +182,9 @@ void dcd_set_address (uint8_t rhport, uint8_t dev_addr)
USB_OTG_DeviceTypeDef * dev = DEVICE_BASE;
dev->DCFG |= (dev_addr << USB_OTG_DCFG_DAD_Pos) & USB_OTG_DCFG_DAD_Msk;
// Response with status after changing device address
dcd_edpt_xfer(rhport, tu_edpt_addr(0, TUSB_DIR_IN), NULL, 0);
}
void dcd_set_config (uint8_t rhport, uint8_t config_num)