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

Increased size of nbr in ServoPin_t to enable usage of alternative Pin Mappings #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tscheskn
Copy link

When using alternative Pin Mappings a Mask of 0xN00 is used to get the ALT_N mapping of a pin. This increases the pin number above 256. Therefore the uint8_t that is used in ServoPin_t is to small.

e.g. servo.attach(PB0 | 0x100) would fail, also the wrong pin number would be given to HardwareTimer.setMode() later.

This change has been tested on a Nucleo F446RE with the ALT_1 Mappings on Pins PA1(Timer5), PB0(Timer3), and PB8(Timer4).

…n Mappings

e.g. servo.attach(PB0 | ALT1) would fail, also the wrong pin number would be given to HardwareTimer.setMode() later
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.

1 participant