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

Add a GPIO Group to STM32 GPIO #17

Closed

Conversation

strongly-typed
Copy link
Collaborator

How and where should a test to the CI be added?

This is very basic and can be extended to write as well.
Using some more template and constexpr function magic this can be
extended to more than three pins.
@salkinium
Copy link
Member

See http://modm.io/guide/testing/.
You can just add it in the generic folder and it'll just get compiled, just like before. Manual call:

 cd examples
 ../tools/scripts/examples_compile.sh generic

I plan to compile the generic examples for all boards at least, but that's not been implemented yet.

@salkinium
Copy link
Member

salkinium commented May 18, 2018

I don't agree with this PR on the point that the canonical interface of this is modm::platform::SoftwareGpioPort. I would rather see that improved to merge port access in a generic way than introduce such a specific new interface and implementation.
I'd recommend you keep this in your own code base/fork for now while I check how difficult it is to implement this generically in SoftwareGpioPort.

@salkinium
Copy link
Member

while I check how difficult it is to implement this generically in SoftwareGpioPort.

This is fairly easy to implement with C++17 fold expressions, which in combination with the relaxed constexpr function rules, flattens the recursive requirement of variadic arguments. constexpr if makes the resulting code gen very efficient. Is using C++17 an issue for your use-case?

@salkinium
Copy link
Member

I'm closing this in favor of #19.

@salkinium salkinium closed this May 22, 2018
@strongly-typed strongly-typed deleted the feature/gpiogroup branch September 8, 2018 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants