Skip to content

Commit cc4d159

Browse files
committed
Optimize usb_GetEndpointTransferType
1 parent e2472b0 commit cc4d159

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/usbdrvce/usbdrvce.asm

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,14 +1681,13 @@ usb_GetEndpointAddress:
16811681
usb_GetEndpointTransferType:
16821682
pop hl
16831683
ex (sp),iy.endpoint
1684-
ld a,(iy.endpoint.transferInfo)
1685-
and a,endpoint.transferInfo.type
1686-
ld c,a
16871684
xor a,a
16881685
cp a,iyl
1689-
sbc a,a
1690-
cpl
1691-
or a,c
1686+
cpl ; A = -1 = USB_UNKNOWN_TRANSFER
1687+
jq z,.unknown_transfer
1688+
ld a,(iy.endpoint.transferInfo)
1689+
and a,endpoint.transferInfo.type
1690+
.unknown_transfer:
16921691
jp (hl)
16931692

16941693
;-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)