92
92
</ div >
93
93
</ div >
94
94
< nav class ="menu ">
95
- {% for peripheral in device.peripherals %}
96
- < a href ="#{{ peripheral.name }} "> {{ peripheral.name }}</ a >
97
- {% endfor %}
95
+ {%- for peripheral in device.peripherals %}
96
+ < a href ="#{{ peripheral.name }} "> {{ peripheral.name }}</ a >
97
+ {%- endfor %}
98
98
</ nav >
99
99
{% for peripheral in device.peripherals %}{% assign pname = peripheral.name %}
100
100
< div class ="peripheral ">
@@ -119,34 +119,40 @@ <h3>
119
119
< details class ="register-map " id ="{{ pname }}-register-map ">
120
120
< summary > Toggle register map</ summary >
121
121
< table class ="table table-bordered register-map-table ">
122
- < tbody > < tr >
122
+ < tr >
123
123
< th > Offset</ th >
124
124
< th > Name</ th >
125
- {% for i in (0..31) reversed %}
125
+ {%- for i in (0..31) reversed %}
126
126
< th class ="vertical "> < div > {{ i }}</ div > </ th >
127
- {% endfor %}
127
+ {%- endfor %}
128
128
</ tr >
129
- {% for register in peripheral.registers %}
130
- < tr >
131
- < td > {{ register.offset }}{% if register.size != 32 %} ({{ register.size }}-bit){% endif %}</ td >
132
- < td > {{ register.name }}</ td >
133
- {% for row in register.table %}{% if row %}
134
- {% for field in row.fields %}
135
- {% unless field.name %}
136
- {% for _ in (1..field.width) %}
137
- < td {% if field.separated %} class ="separated "{% endif %} > </ td >
138
- {% endfor %}
139
- {% endunless %}
140
- {% if field.name %}
141
- < td colspan ="{{ field.width }} " class ="vertical{% if field.separated %} separated{% endif %} ">
142
- < div > < a class ="fieldlink " href ="#{{ pname }}:{{ register.name }}:{{ field.name }} "> {{ field.name }}</ a > </ div >
143
- </ td >
144
- {% endif %}
145
- {% endfor %}
146
- {% else %}{% for _ in (1..16) %}< td > </ td > {% endfor %}{% endif %}{% endfor %}
147
- </ tr >
148
- {% endfor %}
149
- </ tbody > </ table >
129
+ {%- for register in peripheral.registers %}
130
+ < tr >
131
+ < td > {{ register.offset }}{% if register.size != 32 %} ({{ register.size }}-bit){% endif %}</ td >
132
+ < td > {{ register.name }}</ td >
133
+ {%- for row in register.table %}
134
+ {%- if row %}
135
+ {%- for field in row.fields %}
136
+ {%- unless field.name %}
137
+ {%- for _ in (1..field.width) %}
138
+ < td {% if field.separated %} class ="separated "{% endif %} > </ td >
139
+ {%- endfor %}
140
+ {%- endunless %}
141
+ {%- if field.name %}
142
+ < td colspan ="{{ field.width }} " class ="vertical{% if field.separated %} separated{% endif %} ">
143
+ < div > < a class ="fieldlink " href ="#{{ pname }}:{{ register.name }}:{{ field.name }} "> {{ field.name }}</ a > </ div >
144
+ </ td >
145
+ {%- endif %}
146
+ {%- endfor %}
147
+ {%- else %}
148
+ {%- for _ in (1..16) %}
149
+ < td > </ td >
150
+ {%- endfor %}
151
+ {%- endif %}
152
+ {%- endfor %}
153
+ </ tr >
154
+ {%- endfor %}
155
+ </ table >
150
156
</ details >
151
157
< details class ="registers " id ="{{ pname }}-registers ">
152
158
< summary > Toggle registers</ summary >
@@ -177,36 +183,36 @@ <h4>
177
183
</ p >
178
184
< div class ="bitfield ">
179
185
< table class ="table table-striped table-bordered bitfield ">
180
- < tbody > {% for row in register.table %}{% if row %}
186
+ {%- for row in register.table %}
187
+ {%- if row %}
181
188
< tr >
182
- {% for header in row.headers %}
189
+ {%- for header in row.headers %}
183
190
< th > {{ header }}</ th >
184
- {% endfor %}
191
+ {%- endfor %}
185
192
</ tr >
186
193
< tr >
187
- {% for field in row.fields %}
194
+ {%- for field in row.fields %}
188
195
< td colspan ="{{ field.width }} "{% if field.separated %} class ="separated "{% endif %} >
189
- {% if field.name %}
196
+ {%- if field.name %}
190
197
< a class ="fieldlink " href ="#{{ pname }}:{{ register.name }}:{{ field.name }} ">
191
- {% if field.doc %}
192
- < span class ="doccol ">
193
- {% else %}
194
- < span >
195
- {% endif %}
196
- {{ field.name }}</ span > </ a >
198
+ < span {% if field.doc %} class ="doccol "{%- endif %} >
199
+ {{ field.name }}
200
+ </ span >
201
+ </ a >
197
202
< br >
198
203
{{ field.access }}
199
- {% endif %}
204
+ {%- endif %}
200
205
</ td >
201
- {% endfor %}
206
+ {%- endfor %}
202
207
</ tr >
203
- {% endif %}{% endfor %}
204
- </ tbody > </ table >
208
+ {%- endif %}
209
+ {%- endfor %}
210
+ </ table >
205
211
</ div >
206
212
{% endif %}
207
213
< details class ="fields " id ="{{ pname }}-{{ register.name }}-fields ">
208
214
< summary > Toggle fields</ summary >
209
- {% for field in register.fields %}
215
+ {%- for field in register.fields %}
210
216
< h4 >
211
217
< a name ="{{ pname }}:{{ register.name }}:{{ field.name }} ">
212
218
</ a >
@@ -216,22 +222,23 @@ <h4>
216
222
</ a >
217
223
</ h4 >
218
224
< p >
219
- {% if field.width > 1 %}
225
+ {%- if field.width > 1 %}
220
226
Bits {{ field.offset }}-{{ field.msb }}:
221
- {% else %}
227
+ {%- else %}
222
228
Bit {{ field.offset }}:
223
- {% endif %}
224
- {{ field.description }}.</ p >
225
- {% if field.doc %}
229
+ {%- endif %}
230
+ {{ field.description }}.
231
+ </ p >
232
+ {%- if field.doc %}
226
233
< p > {{ field.doc }}</ p >
227
- {% endif %}
228
- {% endfor %}
234
+ {%- endif %}
235
+ {%- endfor %}
229
236
</ details >
230
237
</ div >
231
- {% endfor %}
238
+ {%- endfor %}
232
239
</ details >
233
240
</ div >
234
- {% endfor %}
241
+ {%- endfor %}
235
242
</ div >
236
243
237
244
< script >
0 commit comments