mirror of
https://github.com/ArteryTek/AT32F413_Firmware_Library.git
synced 2026-05-21 09:22:02 +00:00
update version to v2.1.5
This commit is contained in:
@@ -239,13 +239,17 @@ void usbd_clear_stall(usbd_core_type *udev, uint8_t ept_addr)
|
||||
{
|
||||
/* in endpoint */
|
||||
ept_info = &udev->ept_in[ept_addr & 0x7F];
|
||||
USB_SET_TXSTS(ept_info->eptn, USB_TX_VALID);
|
||||
USB_CLEAR_TXDTS(ept_info->eptn);
|
||||
if(USB->ept_bit[ept_info->eptn].txsts == USB_TX_STALL)
|
||||
USB_SET_TXSTS(ept_info->eptn, USB_TX_NAK);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* out endpoint */
|
||||
ept_info = &udev->ept_out[ept_addr & 0x7F];
|
||||
USB_SET_RXSTS(ept_info->eptn, USB_RX_VALID);
|
||||
USB_CLEAR_RXDTS(ept_info->eptn);
|
||||
if(USB->ept_bit[ept_info->eptn].rxsts == USB_RX_STALL)
|
||||
USB_SET_RXSTS(ept_info->eptn, USB_RX_VALID);
|
||||
}
|
||||
ept_info->stall = 0;
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ static usb_sts_type usbd_set_configuration(usbd_core_type *udev)
|
||||
udev->class_handler->clear_handler(udev);
|
||||
usbd_ctrl_send_status(udev);
|
||||
}
|
||||
else if(config_value == udev->dev_config)
|
||||
else if(config_value != udev->dev_config)
|
||||
{
|
||||
udev->class_handler->clear_handler(udev);
|
||||
udev->dev_config = config_value;
|
||||
|
||||
Reference in New Issue
Block a user