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

Change the constructor to take in the PIN_PXXX macros in the PIN # #4

Closed
prices opened this issue Oct 15, 2020 · 0 comments
Closed

Comments

@prices
Copy link
Member

prices commented Oct 15, 2020

Well to keep the api oblivious to ports you could get the pins group from the wiring:
./wiring_digital.c: uint8_t pinPort = GetPort(ulPin);

Or keep the API the same, but either way you would have to convert the pin's absolute number to its group specific number, like digitalWrite does:
void digitalWrite( uint32_t ulPin, uint32_t ulVal )
{
uint8_t pinPort = GetPort(ulPin);
uint8_t pinNum = GetPin(ulPin);

Thanks again for your efforts.

Originally posted by @naprave in #1 (comment)

prices added a commit that referenced this issue Oct 15, 2020
@prices prices closed this as completed Oct 15, 2020
@prices prices reopened this Oct 15, 2020
@prices prices closed this as completed in dfb0d68 Oct 15, 2020
@prices prices mentioned this issue Oct 15, 2020
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