diff options
-rw-r--r-- | firmware/usbstack/usb_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c index be49df0e48..7b80d0bcab 100644 --- a/firmware/usbstack/usb_core.c +++ b/firmware/usbstack/usb_core.c | |||
@@ -821,7 +821,7 @@ void usb_core_transfer_complete(int endpoint,int dir,int status,int length) | |||
821 | break; | 821 | break; |
822 | 822 | ||
823 | default: | 823 | default: |
824 | completion_event=&ep_data[endpoint].completion_event[dir!=0]; | 824 | completion_event=&ep_data[endpoint].completion_event[EP_DIR(dir)]; |
825 | 825 | ||
826 | completion_event->endpoint=endpoint; | 826 | completion_event->endpoint=endpoint; |
827 | completion_event->dir=dir; | 827 | completion_event->dir=dir; |
@@ -838,7 +838,7 @@ void usb_core_transfer_complete(int endpoint,int dir,int status,int length) | |||
838 | void usb_core_control_request(struct usb_ctrlrequest* req) | 838 | void usb_core_control_request(struct usb_ctrlrequest* req) |
839 | { | 839 | { |
840 | struct usb_transfer_completion_event_data* completion_event = | 840 | struct usb_transfer_completion_event_data* completion_event = |
841 | &ep_data[EP_CONTROL].completion_event[1]; | 841 | &ep_data[EP_CONTROL].completion_event[EP_DIR(USB_DIR_IN)]; |
842 | 842 | ||
843 | completion_event->endpoint=EP_CONTROL; | 843 | completion_event->endpoint=EP_CONTROL; |
844 | completion_event->dir=0; | 844 | completion_event->dir=0; |