Conversation
This should be implicit given the provided values, but I'm making it explicit here to indicate intent (using a single byte from the USB data) and match usage elsewhere such as the receive() function.
Again, not really necessary because these should be implicit given the previous values and the type. But making them explicit to indicate intent. Using numbers indexed from 0 here to allow the user to do a for loop to set all of the buttons from say a packed 16-bit value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Making some implicit things explicit in order to indicate intent, and make sure these are consistent between different builds and configurations.
Originally I started this branch to create a
Noneoption for theXInputReceiveTypeto take care of a meta programming issue where you don't have a "NULL" option for a volatile flag taken from the arguments for a receive callback. But after much hemming and hawing I decided against it, as there is no known "safe" value that is guaranteed to be unused, and the user can always use a larger type like a signed int with -1.