28
28
.vertical div {
29
29
writing-mode : vertical-lr;
30
30
}
31
- .doccol {
32
- color : rgb (92 , 184 , 92 );
33
- }
34
31
.headerlink {
35
32
font-size : 50% ;
36
33
}
92
89
</ div >
93
90
</ div >
94
91
< nav class ="menu ">
95
- {% for peripheral in device.peripherals %}
96
- < a href ="#{{ peripheral.name }} "> {{ peripheral.name }}</ a >
97
- {% endfor %}
92
+ {%- for peripheral in device.peripherals %}
93
+ < a href ="#{{ peripheral.name }} "> {{ peripheral.name }}</ a >
94
+ {%- endfor %}
98
95
</ nav >
99
96
{% for peripheral in device.peripherals %}{% assign pname = peripheral.name %}
100
97
< div class ="peripheral ">
101
- < h3 >
102
- < a name ="{{ pname }} "> </ a >
98
+ < h3 id ="{{ pname }} ">
103
99
{{ pname }}
104
100
< a class ="headerlink " href ="#{{ pname }} ">
105
101
< span class ="glyphicon glyphicon-link "> </ span >
@@ -119,41 +115,46 @@ <h3>
119
115
< details class ="register-map " id ="{{ pname }}-register-map ">
120
116
< summary > Toggle register map</ summary >
121
117
< table class ="table table-bordered register-map-table ">
122
- < tbody > < tr >
118
+ < tr >
123
119
< th > Offset</ th >
124
120
< th > Name</ th >
125
- {% for i in (0..31) reversed %}
121
+ {%- for i in (0..31) reversed %}
126
122
< th class ="vertical "> < div > {{ i }}</ div > </ th >
127
- {% endfor %}
123
+ {%- endfor %}
124
+ </ tr >
125
+ {%- for register in peripheral.registers %}
126
+ < tr >
127
+ < td > {{ register.offset }}{% if register.size != 32 %} ({{ register.size }}-bit){% endif %}</ td >
128
+ < td > {{ register.name }}</ td >
129
+ {%- for row in register.table %}
130
+ {%- if row %}
131
+ {%- for field in row.fields %}
132
+ {%- unless field.name %}
133
+ {%- for _ in (1..field.width) %}
134
+ < td {% if field.separated %} class ="separated "{% endif %} > </ td >
135
+ {%- endfor %}
136
+ {%- endunless %}
137
+ {%- if field.name %}
138
+ < td colspan ="{{ field.width }} " class ="vertical{% if field.separated %} separated{% endif %} ">
139
+ < div > < a class ="fieldlink " href ="#{{ pname }}:{{ register.name }}:{{ field.name }} "> {{ field.name }}</ a > </ div >
140
+ </ td >
141
+ {%- endif %}
142
+ {%- endfor %}
143
+ {%- else %}
144
+ {%- for _ in (1..16) %}
145
+ < td > </ td >
146
+ {%- endfor %}
147
+ {%- endif %}
148
+ {%- endfor %}
128
149
</ 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 >
150
+ {%- endfor %}
151
+ </ table >
150
152
</ details >
151
153
< details class ="registers " id ="{{ pname }}-registers ">
152
154
< summary > Toggle registers</ summary >
153
155
{% for register in peripheral.registers %}
154
156
< div class ="register ">
155
- < h4 >
156
- < a name ="{{ pname }}:{{ register.name }} "> </ a >
157
+ < h4 id ="{{ pname }}:{{ register.name }} ">
157
158
{{ register.name }}
158
159
< a class ="headerlink " href ="#{{ pname }}:{{ register.name }} ">
159
160
< span class ="glyphicon glyphicon-link "> </ span >
@@ -177,61 +178,58 @@ <h4>
177
178
</ p >
178
179
< div class ="bitfield ">
179
180
< table class ="table table-striped table-bordered bitfield ">
180
- < tbody > {% for row in register.table %}{% if row %}
181
+ {%- for row in register.table %}
182
+ {%- if row %}
181
183
< tr >
182
- {% for header in row.headers %}
184
+ {%- for header in row.headers %}
183
185
< th > {{ header }}</ th >
184
- {% endfor %}
186
+ {%- endfor %}
185
187
</ tr >
186
188
< tr >
187
- {% for field in row.fields %}
189
+ {%- for field in row.fields %}
188
190
< td colspan ="{{ field.width }} "{% if field.separated %} class ="separated "{% endif %} >
189
- {% if field.name %}
190
- < 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 >
191
+ {%- if field.name %}
192
+ < a class ="fieldlink{% if field.doc %} text-success{% endif %} " href ="#{{ pname }}:{{ register.name }}:{{ field.name }} ">
193
+ {{ field.name }}
194
+ </ a >
197
195
< br >
198
196
{{ field.access }}
199
- {% endif %}
197
+ {%- endif %}
200
198
</ td >
201
- {% endfor %}
199
+ {%- endfor %}
202
200
</ tr >
203
- {% endif %}{% endfor %}
204
- </ tbody > </ table >
201
+ {%- endif %}
202
+ {%- endfor %}
203
+ </ table >
205
204
</ div >
206
205
{% endif %}
207
206
< details class ="fields " id ="{{ pname }}-{{ register.name }}-fields ">
208
207
< summary > Toggle fields</ summary >
209
- {% for field in register.fields %}
210
- < h4 >
211
- < a name ="{{ pname }}:{{ register.name }}:{{ field.name }} ">
212
- </ a >
208
+ {%- for field in register.fields %}
209
+ < h4 id ="{{ pname }}:{{ register.name }}:{{ field.name }} ">
213
210
{{ field.name }}
214
211
< a class ="headerlink " href ="#{{ pname }}:{{ register.name }}:{{ field.name }} ">
215
212
< span class ="glyphicon glyphicon-link "> </ span >
216
213
</ a >
217
214
</ h4 >
218
215
< p >
219
- {% if field.width > 1 %}
216
+ {%- if field.width > 1 %}
220
217
Bits {{ field.offset }}-{{ field.msb }}:
221
- {% else %}
218
+ {%- else %}
222
219
Bit {{ field.offset }}:
223
- {% endif %}
224
- {{ field.description }}.</ p >
225
- {% if field.doc %}
220
+ {%- endif %}
221
+ {{ field.description }}.
222
+ </ p >
223
+ {%- if field.doc %}
226
224
< p > {{ field.doc }}</ p >
227
- {% endif %}
228
- {% endfor %}
225
+ {%- endif %}
226
+ {%- endfor %}
229
227
</ details >
230
228
</ div >
231
- {% endfor %}
229
+ {%- endfor %}
232
230
</ details >
233
231
</ div >
234
- {% endfor %}
232
+ {%- endfor %}
235
233
</ div >
236
234
237
235
< script >
0 commit comments