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

Default pin definitions for multiarch support #124

Closed
amotl opened this issue Feb 19, 2019 · 1 comment
Closed

Default pin definitions for multiarch support #124

amotl opened this issue Feb 19, 2019 · 1 comment

Comments

@amotl
Copy link
Contributor

amotl commented Feb 19, 2019

Hi there,

along the lines of the multiarch improvements coming from #123, I am wondering if there would be a least common denominator for a (default) pin definition which would be appropriate for all of the several boards this library will support? I.e., does every board actually have A0, A1, A2, D2 or D3pins and such?

Would it make sense to improve this detail with respect to the provided examples and the documentation or am I chasing ghosts here?

Feel free to close this right away if you consider this nonsense ;].

With kind regards,
Andreas.

@amotl
Copy link
Contributor Author

amotl commented Feb 20, 2019

I learned at #96 (comment) that we really should just use the digital pins as this would be totally sufficient. So while investigating I learned that Arduino Core for AVR defines PD0-PD7 constants and Arduino Core for ESP8266 defines D0-D7. The other architectures lack corresponding pin definitions as constants completely.

Previously, I defined D2 and D3 as compiler build flags in platformio.ini as a polyfill to support the other architectures, because I haven't known better.

From the status quo, I conclude it is not appropriate using cross-platform constants for digital pins in userspace code. Please object if I got something wrong here.

To further simplify things, I just decided to remove anything related to digital pin definitions completely by 83c9f51. Please let me know and reopen if you believe we should do otherwise.

@amotl amotl closed this as completed Feb 20, 2019
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