aboutsummaryrefslogtreecommitdiffstats
path: root/templates/headers.h.tmpl
blob: ad6a0f73371a990102274da7ffcc50927385b088 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef {{ name.upper() }}_MAP_H
#define {{ name.upper() }}_MAP_H

/* {{ name }} Memory Map Structs */

/* WARNING: Currently assumes perfect packing */

{% for sec_name, values in sections.iteritems() %}
typedef struct {
{% for val in values %}
    {{ val.ctype() }} {{ val.slug }};
{% endfor %}
} {{ name }}_{{ sec_name }}_map;
#define {{ name }}_{{ sec_name }}_offset    {{ values[0].addr_pp() }}
/* Usage (?)
 *      void *uint32_t {{ name }}_{{ sec_name }}_map...
 */
{% endfor %}

#endif