-
-
Notifications
You must be signed in to change notification settings - Fork 732
bitRead and bitWrite documentation ambiguity #924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @mjbmikeb2 , thanks for raising the issue. I looked into it, and made some changes to the documentation that hopefully explains things a bit better:
Changes here: #933 |
Typo in https://www.arduino.cc/reference/en/language/functions/bits-and-bytes/bitwrite/ "variables up to an unsigned long (32 bits / 8 bytes)." Should say 4 bytes. "variables up to an unsigned long (32 bits / 4 bytes)." |
Hi there @mjbmikeb2 , thanks for spotting it, just been corrected! #960 |
bitRead says "Reads a bit of a number."
Is that all signed and unsigned numbers of any size?
bitWrite says, "Writes a bit of a numeric variable"
Again, is that all signed and unsigned numbers of any size?
According to this thread
https://forum.arduino.cc/t/bitread-and-bitwrite-for-numbers-bigger-than-a-byte/1160471
bitWrite doesn't work for 64 bit numbers.
I don't know if this is a bug or a feature. Either way can the documentation please be updated to say what datatypes are currently supported.
Thanks.
The text was updated successfully, but these errors were encountered: