Skip to content

Commit

Permalink
Fixed USB reconnect issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Stricker committed Jan 28, 2020
1 parent cd36cdc commit b09ad13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Logical/USBdevice/UsbDevice/USBdevice.st
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ PROGRAM _CYCLIC
FOR idx:=1 TO USB_MAX_CNT DO
// Compare old and new data
IF(brsmemcmp(ADR(usb_data_old[node]), ADR(usb_data[idx]), SIZEOF(usb_data[idx])) = 0) AND
(USB.PAR.ignore_dongle = FALSE OR (usb_data[node].productId <> BRproductId AND usb_data[node].vendorId <> BRvendorId)) THEN
(USB.PAR.ignore_dongle = FALSE OR (USB.PAR.ignore_dongle = TRUE AND usb_data[idx].productId <> BRproductId AND usb_data[idx].vendorId <> BRvendorId)) THEN
// Clear data, mark as linked and exit loop
brsmemset(ADR(usb_data[idx]), 0, SIZEOF(usb_data[idx]));
is_linked := TRUE;
Expand Down

0 comments on commit b09ad13

Please sign in to comment.