drivers/adt7310: Replace binary literal with hex literal #11450
Merged
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.
Contribution description
This PR is related to PR #11352, where I suggest to add support for Linux'
/dev/spidev
devices to the native cpu. As discussed, enabling SPI causes thetests/driver_adt7310
test to be run with the gnu and llvm toolchain. With the current configuration, these toolchains don't like binary literals in the code and raise a warning/error.So I suggest to change the binary literal for
ADT7310_EXPECTED_MANUF_ID
to a hexadecimal one, so that I can then rebase the other PR and the Murdock build will no longer fail for this test.Testing procedure
I don't own an ADT7310 temperature sensor to test the change by myself, but I assume changing
0b1100000
to the equivalent0bC0
in the code will have no impact besides removing compiler warnings. (The value is mentioned in table 10 of the datasheet)Issues/PRs references
Required for PR #11352