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

Cannot specify SPI data rate on Teensy 4 #890

Open
woundedlion opened this issue Sep 18, 2019 · 2 comments

Comments

@woundedlion
Copy link

commented Sep 18, 2019

The SPI_DATA_RATE template parameter to addLeds() is declared as a uint8_t. On Teensy 4, DATA_RATE_MHZ and DATA_RATE_KHZ are defined to pass the raw clock rate in Hz to the Controller class, yielding values larger than 255. The value is truncated resulting in an incorrect/unusable SPI clock rate. I fixed this by redefining as uint32_t.

@embedded-creations

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2019

Thanks for your fix, I tried it and it worked for me with setting the clock rate for APA102 LEDs. I changed SPI_DATA_RATE here:

https://github.com/FastLED/FastLED/blob/master/FastLED.h#L223

@woundedlion

This comment has been minimized.

Copy link
Author

commented Sep 20, 2019

Sure, posted a PR here: #891

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.