Skip to content

Fix truncated SPI_DATA_RATE template parameter to addLeds with Teensy 4 - #891

Merged
kriegsman merged 1 commit into
FastLED:masterfrom
woundedlion:bug/890
Jan 23, 2020
Merged

kriegsman merged 1 commit into
FastLED:masterfrom
woundedlion:bug/890

Conversation

@woundedlion

@woundedlion woundedlion commented Sep 18, 2019 •

Copy link
Copy Markdown
Contributor

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.

@kriegsman
kriegsman merged commit 0251e67 into FastLED:master Jan 23, 2020
@kriegsman

Copy link
Copy Markdown
Member

Thank you for the contribution and the help with FastLED!

@woundedlion
woundedlion deleted the bug/890 branch January 24, 2020 04:26
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

Successfully merging this pull request may close these issues.

2 participants