forked from xoseperez/espurna
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
light: fix out-of-bounds access when using GPIO16
As noticed in the xoseperez#2472 Internal implemementation still lacks the support for the GPIO16, as it needs to use 'special' IO16 registers (and due to the fact that the 'normal' registers only fit in an u16[16], from 0 to 15, so internals need to change as well) One possible way is to attach certain implementation funcs to the struct handling the isr, avoiding a bunch of in-line checks for `pin == 16` Another option is to just use Core's `analogWrite`, which hides the implementation from us and should work pretty seamlessly. (...but, currently has 2 different waveform generator types, and it is not really clear which one is a better default, as it needs to be set at build-time)
- Loading branch information
Showing
2 changed files
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters