Skip to content

Fix usb_everdrive_poll for compilers using signed char#113

Merged
buu342 merged 1 commit intobuu342:masterfrom
Thar0:ed64-poll-fix
Jun 15, 2023
Merged

Fix usb_everdrive_poll for compilers using signed char#113
buu342 merged 1 commit intobuu342:masterfrom
Thar0:ed64-poll-fix

Conversation

@Thar0
Copy link
Copy Markdown
Contributor

@Thar0 Thar0 commented Jun 14, 2023

Description

Fixes usb_everdrive_poll so that it will always compute the correct packet size on compilers where the default signedness of char is signed, as is the case in the libdragon toolchain. See #112 for more specifics on why this doesn't work as-is.

Related Issue

#112

Motivation and Context

Sending packets of specific sizes over Everdrive USB to programs built with a compiler where char defaults to signed currently does not work. I ran into this while working on a project involving doing just that.

How Has This Been Tested?

Previously, a packet of length 0x80 - 0xFF (inclusive) would appear to never arrive. After this change such packets arrive as expected.

Screenshots (if appropriate):

@buu342
Copy link
Copy Markdown
Owner

buu342 commented Jun 15, 2023

Thank you for the PR + bug fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants