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

hal::stm32f1 pin configuration should throw if the pin is already configured #92

Open
kammce opened this issue Jan 20, 2025 · 1 comment
Labels
✨ enhancement New feature or request

Comments

@kammce
Copy link
Member

kammce commented Jan 20, 2025

This would allow applications to detect if there are pin conflicts in the system. By doing this at the pin configuration level, no other APIs in the code need to do any sort of checking themselves.

@kammce kammce added the ✨ enhancement New feature or request label Jan 20, 2025
@kammce
Copy link
Member Author

kammce commented Jan 20, 2025

Already configured means not the default. The default should be "general purpose input with pull up" but this will need to be determined.

The behavior should be that pin configure checks if the pin is set to default, if it is, then configure it to the desired values. If it is not set to default, then throw an exception.

Configuring a pin multiple times as general purpose input with pull up is acceptable and will be allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant