update version to v2.2.0

This commit is contained in:
Artery-MCU
2024-12-27 18:00:22 +08:00
parent f2cb360c3d
commit b71bd119f4
875 changed files with 361265 additions and 217891 deletions

View File

@@ -238,13 +238,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;
}

View File

@@ -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;