make: Introduce periph_gpio_irq feature#9845
Conversation
Makefile.dep
Outdated
|
|
||
| # Enable periph_gpio when periph_gpio_irq is required | ||
| ifneq (,$(filter periph_gpio_irq,$(USEMODULE))) | ||
| USEMODULE += periph_gpio |
There was a problem hiding this comment.
In that case, should it not be FEATURES_REQUIRED += ?
It has the same result of having the name put in USEMODULE but also triggers the FEATURES dependency checks.
| FEATURES_PROVIDED += periph_cpuid | ||
| FEATURES_PROVIDED += periph_hwrng | ||
| FEATURES_PROVIDED += periph_gpio | ||
| FEATURES_PROVIDED += periph_gpio_irq |
There was a problem hiding this comment.
This one is on a different line while other are put on the same one.
There was a problem hiding this comment.
I was experimenting with this CPU, then updated the others via sed.
There was a problem hiding this comment.
Maybe put it on the same line to be coherent, people like to copy paste afterwards.
b201017 to
f5adb94
Compare
Ok, that is what I was wondering. So would be a following tracking PR/issue. |
|
Any test I could run just to validate the wsn430 ? |
|
I like this a lot. tests/minimal and the coming OTA bootloader will loose RAM weight. |
|
@kaspar030 and also ROM size, the IRQ handlers for GPIO interrupts will not be linked in the binary. |
|
@cladmi do you have the board? if so you could try tests/periph_gpio and fiddle with some wires on the GPIO pins |
|
But anyway, if the linking is OK for wsn430, then the functions are still there, so it should be fine even without on hardware testing if it was working before. Is the name periph_gpio_irq fine or should it be periph_gpio_int? (since the init function is named gpio_init_int) A follow up to this PR is to add |
|
I prefer I only have the board on IoT-LAB so no direct access… :/ |
|
We tried with @kYc0o on We successfully ran |
f5adb94 to
efc5f2a
Compare
|
Squashed |
|
Now we have "periph_gpio_irq" as module, but "gpio_init_int" as function. I suggest we rename the latter to "gpio_irq_init()", but provide a define (or static inline wrapper) for the old name. |
Good idea! 👍 |
Contribution description
Introduce a new feature flag
periph_gpio_irqfor when a driver/application requires GPIO interrupts. This allows the GPIO drivers to avoid allocating space in RAM for interrupt context. See the included change to the msp430fxyz gpio driver.Testing procedure
No code is modified, only the header and makefiles (except for the example in msp430fxyz). If the compilation is OK, then everything should be fine.
Issues/PRs references
This could fix the build failures in #8711
Based on
#9844