mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
68424a924c
This adds a simple macro to check (at C level) whether a given expression is proven to be compile time constant and suitable for constant folding. This allows writing code like this: ```C int gpio_read(gpio_t pin) { if (IS_CT_CONSTANT(pin)) { /* this implementation should even be able to use the port and * pin number as immediate in inline assembly */ } else { /* less efficient implementation that cannot use port and pin * number as immediate in inline assembly */ } } ``` |
||
---|---|---|
.. | ||
Makefile | ||
tests-kernel_defines.c | ||
tests-kernel_defines.h |