Skip to content

Arduino word function used in typedef #76

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

Closed
NevynUK opened this issue Dec 4, 2016 · 2 comments
Closed

Arduino word function used in typedef #76

NevynUK opened this issue Dec 4, 2016 · 2 comments

Comments

@NevynUK
Copy link

NevynUK commented Dec 4, 2016

The Arduino web site defines word() as a function for casting bytes to a word.

This port has word defined as typedef unsigned int word on line 120 of Arduino.h.

This is breaking the Sparkfun TSL2561 libraray code.

Regards,
Mark

@me-no-dev
Copy link
Member

hmm... thanks for noticing this! I really wonder how that define got there, especially since the correct methods are implemented :)

@hcs-svn
Copy link

hcs-svn commented Dec 9, 2016

removing "typedef unsigned int word;" breaks a lot of my code.
The avr core Arduino.h has both:

Line 121:
typedef unsigned int word;

and

Line 238:
uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);
#define word(...) makeWord(VA_ARGS)

if you have both you can do:
word w = word(1, 2);

me-no-dev added a commit that referenced this issue Dec 12, 2016
fixes: #76
fixes: #5
fixes: #91
Lzw655 pushed a commit to Lzw655/arduino-esp32 that referenced this issue Oct 12, 2023
jq is not preinstalled on a fresh Ubuntu installation.
blue-2357 pushed a commit to blue-2357/arduino-esp32 that referenced this issue Jul 17, 2024
blue-2357 pushed a commit to blue-2357/arduino-esp32 that referenced this issue Jul 17, 2024
brentru pushed a commit to adafruit/arduino-esp32 that referenced this issue Oct 22, 2024
…spressif#76)

Adafruit SAMD Boards doesn't have a dependency on Arduino SAMD Boards, so this only slows down the CI run.
dash0820 added a commit to dash0820/arduino-esp32-stripped that referenced this issue Mar 10, 2025
dash0820 added a commit to dash0820/arduino-esp32-stripped that referenced this issue Mar 10, 2025
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

No branches or pull requests

3 participants