Skip to content
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

Support expressions as arguments in invocations #42

Open
begeistert opened this issue Sep 26, 2023 · 1 comment
Open

Support expressions as arguments in invocations #42

begeistert opened this issue Sep 26, 2023 · 1 comment

Comments

@begeistert
Copy link

begeistert commented Sep 26, 2023

Support expressions as arguments in invocations

Some Arduino examples for the NeoPixel use this line of code as part of the constructor

Adafruit_NeoPixel strip(numPixels, neoPixelPin, NEO_GRB + NEO_KHZ800);

However, this syntax is not allowed, and is denoted as a syntax error, specifically the sum NEO_GRB + NEO_KHZ800, this syntax is important because this is the common way to set the arguments to the NeoPixel driver constructor

References

NeoPixel Examples

@begeistert
Copy link
Author

Heres the an example of the constant that is used in the constructor
#define NEO_RBG ((0 << 6) | (0 << 4) | (2 << 2) | (1)) ///< Transmit as R,B,G

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

1 participant