blob: a4965b0e716787f9266b0c7ba3e468493cbd927f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// This file is auto-generated from a template!
// You should reconsider editing!
#pragma once
namespace rcc {
{% for bus, devices in buses.items() %}
enum {{ bus }}_dev {
{% for name, num in devices.items() %}
{{ name }} = 1 << {{ num }},
{% endfor %}
};
template <typename T>
void enable(const T& rcc, {{ bus }}_dev dev) {
rcc->{{ bus.split('_')[0] }}ENR{{ bus.split('_')[1] if '_' in bus else '' }} |= dev;
}
{% endfor %}
}
|