Skip to content

Commit 184ab7a

Browse files
committed
usb: fix DUSB Request-to-Send var type attribute header byte. Fix #509
The OS does not want some newer vartypes (like exact-math ones) to have an "older" vartype attr "header" byte (like 0x07), making the transfer fail. We use 0x0F as this makes all CE vars transferable. Verified with various files to work as expected. See also debrouxl/tilibs#90 for more details and a less CE-specific fix.
1 parent fe7fe3d commit 184ab7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/usb/dusb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ int usb_dusb_device(usb_event_t *event) {
15051505
*buffer++ = DUSB_ATTR_VAR_TYPE_SIZE >> 8 & 0xFF;
15061506
*buffer++ = DUSB_ATTR_VAR_TYPE_SIZE >> 0 & 0xFF;
15071507
*buffer++ = 0xF0;
1508-
*buffer++ = command->vartype == CALC_VAR_TYPE_FLASH_APP ? 0x0F : 0x07;
1508+
*buffer++ = 0x0F; // this technically depends on the OwnerPID, but we only care about the CE here...
15091509
*buffer++ = 0;
15101510
*buffer++ = command->vartype;
15111511

0 commit comments

Comments
 (0)