diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/periph_instances.h.j2 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/templates/periph_instances.h.j2 b/templates/periph_instances.h.j2 index 05c59df..3d236b7 100644 --- a/templates/periph_instances.h.j2 +++ b/templates/periph_instances.h.j2 @@ -1,11 +1,17 @@ #pragma once -{% for header in headers %}#include "{{ header }}"{% endfor %} +{% for header in (headers if headers else []) %} +#include "{{ header }}" +{% endfor %} -{% for instance in instances %} +{% for instance in (instances if instances else []) %} constexpr {{ instance.type }} {{ instance.name }}{ {% for arg in instance.args %} {{ arg | hex }}, {% endfor %} }; {% endfor %} + +{% for alias, ref in (aliases.items() if aliases else {}) %} +constexpr auto {{ alias }} = {{ ref }}; +{% endfor %} |