Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

periph_usbdev: remove deprecated event flag #20488

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions cpu/sam0_common/periph/usbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ static bool _ep_out_flags_set(UsbDeviceEndpoint *ep_reg)
{
return ep_reg->EPINTFLAG.reg &
ep_reg->EPINTENSET.reg &
(USB_DEVICE_EPINTENSET_TRFAIL0 |
USB_DEVICE_EPINTENSET_TRCPT0 |
(USB_DEVICE_EPINTENSET_TRCPT0 |
USB_DEVICE_EPINTENSET_RXSTP |
USB_DEVICE_EPINTENSET_STALL0);
}
Expand All @@ -205,8 +204,7 @@ static bool _ep_in_flags_set(UsbDeviceEndpoint *ep_reg)
{
return ep_reg->EPINTFLAG.reg &
ep_reg->EPINTENSET.reg &
(USB_DEVICE_EPINTENSET_TRFAIL1 |
USB_DEVICE_EPINTENSET_TRCPT1 |
(USB_DEVICE_EPINTENSET_TRCPT1 |
USB_DEVICE_EPINTENSET_STALL1);
}

Expand Down Expand Up @@ -741,10 +739,6 @@ static void _usbdev_ep_esr(usbdev_ep_t *ep)
ep_reg->EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_RXSTP;
event = USBDEV_EVENT_TR_COMPLETE;
}
else if (ep_reg->EPINTFLAG.bit.TRFAIL0) {
ep_reg->EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_TRFAIL0;
event = USBDEV_EVENT_TR_FAIL;
}
else if (ep_reg->EPINTFLAG.bit.STALL0) {
ep_reg->EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_STALL0;
event = USBDEV_EVENT_TR_STALL;
Expand All @@ -760,10 +754,6 @@ static void _usbdev_ep_esr(usbdev_ep_t *ep)
ep_reg->EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_TRCPT1;
event = USBDEV_EVENT_TR_COMPLETE;
}
else if (ep_reg->EPINTFLAG.bit.TRFAIL1) {
ep_reg->EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_TRFAIL1;
event = USBDEV_EVENT_TR_FAIL;
}
else if (ep_reg->EPINTFLAG.bit.STALL1) {
ep_reg->EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_STALL1;
event = USBDEV_EVENT_TR_STALL;
Expand Down
10 changes: 0 additions & 10 deletions drivers/include/periph/usbdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,6 @@ typedef enum {
*/
USBDEV_EVENT_TR_STALL,

/**
* @brief Transaction fail event.
*
* @deprecated This event is deprecated as only a limited number of devices
* implement and doesn't offer value for upper layer code. This
* event will be removed after the 2022.07 release.
*
* An endpoint should emit this event after a nack reply to the host.
*/
USBDEV_EVENT_TR_FAIL,
/* expand list if required */
} usbdev_event_t;

Expand Down
Loading